Esempio n. 1
0
 // tätä käytin debuggailutilassa; pelaaja värjäsi tilet joissa oli käynyt jo eri värille
 void visit(PVector point) {
   int x = PApplet.round(point.x);
   int y = PApplet.round(point.y);
   int z = PApplet.round(point.z);
   map[at(x, y, z)] = 0xffffffff;
 }
Esempio n. 2
0
 int at(PVector p) {
   return at(PApplet.round(p.x), PApplet.round(p.y), PApplet.round(p.z));
 }
Esempio n. 3
0
 void dobox(PGraphics pa, PVector p, int color) {
   dobox(pa, PApplet.round(p.x), PApplet.round(p.y), PApplet.round(p.z), color);
 }
Esempio n. 4
0
 // onko kalikkaa tässä kohdassa? peliobjektit tarkistavat putoamisen näin
 boolean hasBlk(PVector point) {
   int x = PApplet.round(point.x); // round
   int y = PApplet.round(point.y);
   int z = PApplet.round(point.z);
   return x >= 0 && y >= 0 && z >= 0 && x < size && y < size && z < size && map[at(x, y, z)] != 0;
 }