class Barra{ //datos y variables color c; float xpos; float ypos; float ancho; float alto; //constructor Barra(color unColor, float unaPosX, float unaPosY, float unAncho, float unAlto){ c = unColor; xpos = unaPosX; ypos = unaPosY; ancho = unAncho; alto = unAlto; } //metodos void draw(){ rectMode(RADIUS); fill(c); noStroke(); rect (xpos, ypos, ancho, alto); } void mover(){ xpos = mouseX + random(1600) ; ypos = mouseY; } }