Help with Processing hwk?
in
Programming Questions
•
3 years ago
Hi guys, I'm new to processing( not that new but fairly newbie).
I have this assignment (it's part 1) The first part
and I'm confused about making the balloon move or why it's not showing up.
Here's my code( you guys will prob see dozens of errors immediately)
I have this assignment (it's part 1) The first part
and I'm confused about making the balloon move or why it's not showing up.
Here's my code( you guys will prob see dozens of errors immediately)
Thanks comments, help, anything appreciated.int x = 0;
int y = 0;
int w;
int h;
color c;
int gxSpeed = 1;
int gySpeed = 1;
void setup()
{
size(300, 300);
smooth();
background(255);
}
void draw()
{
drawBalloon(x ,y , w, h, c);
x += gxSpeed;
}
void drawBalloon(int x, int y, int w, int h, color c)
{
fill(c);
ellipse( x , y, w, h);
line(x, y + h /2.0, x + w/ 3.0, y + h/2.0 + h/3.0);
x = int(random(w/2, w - w/2));
y = int(random(h/2, h - h/2));
}
1