added ID to houses

This commit is contained in:
2019-01-03 22:00:25 +01:00
parent 61ffd75549
commit f1ecfeebf0
2 changed files with 6 additions and 7 deletions

View File

@@ -34,9 +34,11 @@ class SpawnArea {
PVector v2_center; PVector v2_center;
int i_size; int i_size;
int i_ID;
void display(){ void display(){
text(i_size,v2_center.x,v2_center.y); //text(i_size,v2_center.x,v2_center.y);
text(i_ID,v2_center.x,v2_center.y);
} }
@@ -50,6 +52,7 @@ class SpawnArea {
} }
SpawnArea(int startX, int startY) { SpawnArea(int startX, int startY) {
i_ID = spawnAreas.size();
int [] pxl = img_houses.pixels; int [] pxl = img_houses.pixels;
int pw = img_houses.width; int pw = img_houses.width;
int ph = img_houses.height; int ph = img_houses.height;

View File

@@ -1,7 +1,5 @@
Citizen mensch;
PImage img_streets; PImage img_streets;
PGraphics pg_map;
boolean b_isRaining; boolean b_isRaining;
@@ -34,8 +32,6 @@ class Citizen{
} }
} }
Citizen mensch;
void setup() { void setup() {
size(400, 300); size(400, 300);
textAlign(CENTER); textAlign(CENTER);
@@ -57,7 +53,7 @@ void setup() {
void draw() { void draw() {
background(255); background(255);
image(img_houses, 0, 0, img_houses.width, img_houses.height); image(img_houses, 0, 0, img_houses.width, img_houses.height);
image(img_streets, 0, 0, img_houses.width, img_houses.height); //image(img_streets, 0, 0, img_houses.width, img_houses.height);
textSize(7); textSize(7);
for (SpawnArea spawn : spawnAreas) { for (SpawnArea spawn : spawnAreas) {
spawn.display(); spawn.display();