Response title
This is preview!




Click on Join Now to Sign Up
class block
{
//EVERY BLOCK has these pieces of data
float xstart, xend;
float xpos, ypos;
//Declaring
//Constructor
block (float xstart,float xend, float tempY)
{
rectMode(CENTER);
ypos = tempY;
}
//Functionality
//Display
void display(){
fill(0);
rect(map(mouseX,0,width,xstart,xend),ypos,30,5);
}
}
//DECLARING
block uno;
void setup()
{
size(500,500);
smooth();
noStroke();
uno = new block(100,400,250);
}
void draw(){
background(255);
uno.display();
}