< GMU:Immersive Strategien | Inhalte | Bälle
(Created page with " == Code == == Objekt Ball ==") |
|||
| Line 4: | Line 4: | ||
== Objekt Ball == | == Objekt Ball == | ||
class Ball { | |||
int g; //Größe | |||
float x,y; //Position | |||
int h,s,b,a; //Farbe | |||
float vx,vy; //Geschwindigkeit | |||
Ball() { | |||
g = 100; | |||
s = 100; | |||
b = 100; | |||
} | |||
void maleBall() { | |||
fill(h,s,b); | |||
ellipse(x,y,g,g); | |||
} | |||
} | |||
Revision as of 11:45, 7 February 2011
Code
Objekt Ball
class Ball {
int g; //Größe
float x,y; //Position
int h,s,b,a; //Farbe
float vx,vy; //Geschwindigkeit
Ball() {
g = 100;
s = 100;
b = 100;
}
void maleBall() {
fill(h,s,b);
ellipse(x,y,g,g);
}
}