diff --git a/CitizenClass.pde b/CitizenClass.pde index cc18e4b..63491ee 100644 --- a/CitizenClass.pde +++ b/CitizenClass.pde @@ -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(); } } diff --git a/Map.pde b/Map.pde index 705cf71..2ec1657 100644 --- a/Map.pde +++ b/Map.pde @@ -7,6 +7,8 @@ int i_biggestHouseSize; ArrayList houses = new ArrayList(); + + void initHouses() { img_houses.loadPixels(); for (int x = 0; x < img_houses.width; x++) { diff --git a/citizen.pde b/citizen.pde index 470c15b..5753e7f 100644 --- a/citizen.pde +++ b/citizen.pde @@ -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);