Labels

Thursday, 31 May 2012

DSDN 142 - Shimmering code (semi interactive)

Move mouse whislt clicking and you'll find out ya self :) It shimmer's when you run the code and half of the objects try to aboid the mouse. Still need to figure out how they all could bounce of the mouse instead of avoiding it.

NEW PART OF CODE:
class Circle {
  float x = 50;
  float y = 500;
  float speedX = 3;
  float speedY = 0.2;

  Circle(float xx, float yy) {
    x = xx;
    y = yy;
  }
  void play() {
    Thecircle();
    movement();
    bouncing();
    force();
    collide();
  }
 
  void collide(){
   if(dist(A,ellipsex,A,ellipsey)<50){
      speedX = speedX * -1;
      }
  
 }



Also I'm thinking of replacing the face with some other

No comments:

Post a Comment