| 123456789101112131415161718192021222324 |
- /**
- One of 3 random candies drops down the chute onto the conveyor belt and
- into one of the bins. The player uses the arrow keys to shift the bins so
- that the candy drops into the matching colored bin. There is already a Boolean
- key check (bins.keyDown) to detect if either of the arrows has been pressed.
- The code for moving the bins is already attached to the group. Ninjas should
- reference the timer code from Rain Catcher and Whack a Ninja.
- Decomposition
- * Candy move down the chute
- * Candy changes direction to moves along belt
- * Arrow keys control chutes
- * Timer is used to spawn new candies
- * Check if the correct color dropped in bins
- */
- //*************Scene Object - Initialize When Scene Starts***********//
- //Create score variable
- $this.totalScore = 0;
- //Create variable to match binColor with candyColor
- $this.binColor = 0;
- //boolean used to check which arrow is pressed
- bins.keyDown = false;
|