button class, angle
This commit is contained in:
21
Entities.pde
21
Entities.pde
@@ -1,5 +1,6 @@
|
||||
int i_interactableAmount = 10;
|
||||
|
||||
//entitiy-subklassen: papier .. computer .. mobiles ... books ... lamps ... tables ...
|
||||
Interactable[] interactables = new Interactable[10];
|
||||
|
||||
|
||||
@@ -16,28 +17,42 @@ void initInteractables() {
|
||||
class Entity {
|
||||
String S_name;
|
||||
boolean b_linked;
|
||||
int i(int x) {
|
||||
return (x);
|
||||
};
|
||||
boolean b_selected;
|
||||
boolean b_moving;
|
||||
float f_xPos, f_yPos, f_xSpawn, f_ySpawn;
|
||||
int i_diameter = 10; //ellipse representation on map
|
||||
float f_angle;
|
||||
int i_diameter = 10;
|
||||
int i_nameSize = 12;
|
||||
color c_selected = color(128, 50, 50);
|
||||
color c_color = color(50, 200, 80);
|
||||
color c_stroke = color(255, 255, 255);
|
||||
//PVector v2_direction(int x, int y){
|
||||
// PVector pv = new PVector(f_xPos+x,f_yPos+y);
|
||||
// return (pv);
|
||||
//};
|
||||
PVector v2_direction = new PVector(0,0);
|
||||
|
||||
void spawn(int house) {
|
||||
void spawn(int house) { //generic spawn
|
||||
PVector v2_spawnPoint = houses.get(house).v2_randomSpawnPoint();
|
||||
f_xSpawn = v2_spawnPoint.x;
|
||||
f_ySpawn = v2_spawnPoint.y;
|
||||
f_xPos = f_xSpawn;
|
||||
f_yPos = f_ySpawn;
|
||||
v2_direction.x = f_xPos;
|
||||
v2_direction.y = f_yPos + 10;
|
||||
f_angle = 0;
|
||||
b_linked = true;
|
||||
}
|
||||
void spawn(int x, int y) {
|
||||
void spawn(int x, int y) { //specific spawn
|
||||
f_xSpawn = x;
|
||||
f_ySpawn = y;
|
||||
f_xPos = f_xSpawn;
|
||||
f_yPos = f_ySpawn;
|
||||
v2_direction.x = f_xPos;
|
||||
v2_direction.y = f_yPos + 10;
|
||||
b_linked = true;
|
||||
}
|
||||
void despawn() {
|
||||
|
||||
Reference in New Issue
Block a user