help
in
Programming Questions
•
2 years ago
im tying to get it so that it takes progressively more and more clicks to return the circle to zero.
float radius;
int timespressed;
void setup()
{
size(300,300);
radius = 10;
radius ++;
smooth();
}
void draw ()
{
background(0);
// println(radius);
ellipse (150,150, radius ,radius);
int timespressed = ENTER;
if( radius <= 300)
{
radius ++;
}
}
void keyPressed()
{
if((key== ENTER) && (timespressed == 0))
{
radius = 0;
println("hit");
timespressed = 1;
}
if((key== ENTER) && (timespressed == 01))
{
radius = 0;
println("hit");
timespressed = 2;
}
if((key== ENTER) && (timespressed == 2))
{
radius = 0;
println("hit");
timespressed = 3;
}
}
float radius;
int timespressed;
void setup()
{
size(300,300);
radius = 10;
radius ++;
smooth();
}
void draw ()
{
background(0);
// println(radius);
ellipse (150,150, radius ,radius);
int timespressed = ENTER;
if( radius <= 300)
{
radius ++;
}
}
void keyPressed()
{
if((key== ENTER) && (timespressed == 0))
{
radius = 0;
println("hit");
timespressed = 1;
}
if((key== ENTER) && (timespressed == 01))
{
radius = 0;
println("hit");
timespressed = 2;
}
if((key== ENTER) && (timespressed == 2))
{
radius = 0;
println("hit");
timespressed = 3;
}
}
1