added name to citizen, changed houses
This commit is contained in:
13
citizen.pde
13
citizen.pde
@@ -5,13 +5,15 @@ boolean b_smallerImage = true; //use a cropped, smaller version of the 1920x1080
|
|||||||
boolean b_loadSun = false; //load sun from web-api instead of local json file (local file is adressed to january 4th 2019. might implement a check that downloads today's information only once...
|
boolean b_loadSun = false; //load sun from web-api instead of local json file (local file is adressed to january 4th 2019. might implement a check that downloads today's information only once...
|
||||||
|
|
||||||
void mouseClicked(){
|
void mouseClicked(){
|
||||||
mensch.goTo(73);
|
mensch.goTo(112);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Citizen{
|
class Citizen{
|
||||||
int i_xSpawn, i_ySpawn, i_xPos, i_yPos, i_diameter;
|
int i_xSpawn, i_ySpawn, i_xPos, i_yPos, i_diameter;
|
||||||
boolean b_linked;
|
boolean b_linked;
|
||||||
int i_home;
|
int i_home;
|
||||||
|
String S_name;
|
||||||
|
|
||||||
|
|
||||||
// berufsfeld: webdesigner, pädagoge, schmuckdesigner, schmied
|
// berufsfeld: webdesigner, pädagoge, schmuckdesigner, schmied
|
||||||
// berufsstatus: beamter, selbstständiger, unternehmer, angestellter, grundschüler, gymnasiast, hauptschüler, realschüler, azubi, student, rentner
|
// berufsstatus: beamter, selbstständiger, unternehmer, angestellter, grundschüler, gymnasiast, hauptschüler, realschüler, azubi, student, rentner
|
||||||
@@ -20,8 +22,9 @@ class Citizen{
|
|||||||
|
|
||||||
//names of pathfinding algorithms: greedy best first search, uniform cost search, a star search
|
//names of pathfinding algorithms: greedy best first search, uniform cost search, a star search
|
||||||
|
|
||||||
Citizen(int home){
|
Citizen(int home, String name){
|
||||||
i_home = home;
|
i_home = home;
|
||||||
|
S_name = name;
|
||||||
i_diameter = 15;
|
i_diameter = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,6 +47,8 @@ class Citizen{
|
|||||||
|
|
||||||
void display(){
|
void display(){
|
||||||
ellipse(i_xPos, i_yPos, i_diameter, i_diameter);
|
ellipse(i_xPos, i_yPos, i_diameter, i_diameter);
|
||||||
|
textSize(10);
|
||||||
|
text(S_name, i_xPos, i_yPos-10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,8 +71,8 @@ void setup() {
|
|||||||
initWeather();
|
initWeather();
|
||||||
|
|
||||||
|
|
||||||
mensch = new Citizen(112);
|
mensch = new Citizen(59, "Pe");
|
||||||
mensch.spawn(112);
|
mensch.spawn(59);
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw() {
|
void draw() {
|
||||||
|
|||||||
Reference in New Issue
Block a user