Browse Source

pgraph map, drag and drop, set mouse input to ui

master
Victor Giers 5 years ago
parent
commit
1d16b1f2b5
3 changed files with 9 additions and 10 deletions
  1. 0
    6
      CitizenClass.pde
  2. 2
    0
      Map.pde
  3. 7
    4
      citizen.pde

+ 0
- 6
CitizenClass.pde View File

@@ -147,11 +147,5 @@ class Citizen {
} else {
if (b_randomRun) goTo(int(random(0, width)), int(random(0, height)));
}
//else {
//println("bloop");
// goTo(int(random(0,width)),int(random(0,height)));
//b_moving = false; //this might be problematic if i want movement controlled by different things than goto / nodes
//}
//exploredEdges = pathFinder.getExaminedEdges();
}
}

+ 2
- 0
Map.pde View File

@@ -7,6 +7,8 @@ int i_biggestHouseSize;

ArrayList<House> houses = new ArrayList<House>();



void initHouses() {
img_houses.loadPixels();
for (int x = 0; x < img_houses.width; x++) {

+ 7
- 4
citizen.pde View File

@@ -24,14 +24,18 @@ void setup() {
else img_houses = loadImage(dataPath("map/houses_with_borders.png"));

img_streets = loadImage(dataPath("map/streets.png"));
surface.setSize(img_houses.width, img_houses.height);

initHouses();
initPathFinding();
initWeather();
initCitizen();

}

surface.setSize(img_houses.width, img_houses.height);
void initCitizen(){

//namen: ethuriel, nathaniel, loriel, samuel, aluriel, aleriel, thaliel, suriel, kaliel,
@@ -49,11 +53,10 @@ void setup() {
for (int i = 0; i < citizen.length; i++) {
citizen[i].spawn(int(random(0, houses.size())));
}
//citizen[2].spawn(59);
//citizen[2].spawn(59);
}



void draw() {
//background(255);
background(img_houses);

Loading…
Cancel
Save