Help Pacman!

pacman

Look at how lonely and hungry he is. Won’t you help? My plan was to make Pacman (which I did!) and have it gobble up bouncing balls (which I didn’t do).

Things I have trouble with: multiple classes/variables(?) in Processing

If any of you can help, add some wizardry/magic to it, that’d be very cool. Code below!

 

float pacX=mouseX;
    float pacY=350;
    float count=0;
    float pacsize=20;

    void setup() {
      size(600, 400);
      background(0);
      smooth();
      noCursor(); 
    }

    void draw() {
        pacman();

    }

    void pacman() // Hey look it's Pacman!
    {
      background(0);
      fill(250, 250, 40); //classic yellow color
      arc(pacX, pacY, 50, 50, PI/4, 7*PI/4);
      pacX=mouseX;
      pacY=350;
    }

 

 

 

Leave a Reply