|
@@ -20,6 +20,17 @@ Decomposition
|
|
|
$this.totalScore = 0;
|
|
$this.totalScore = 0;
|
|
|
//Create variable to compare binColor with candyColor
|
|
//Create variable to compare binColor with candyColor
|
|
|
$this.binColor = 0;
|
|
$this.binColor = 0;
|
|
|
|
|
+if ($this.scene.state() = "PLAY") {
|
|
|
|
|
+ createTimer(2000, function() {
|
|
|
|
|
+ var candyColor = random(2);
|
|
|
|
|
+ var nCandy = candy.clone();
|
|
|
|
|
+ nCandy.color = candyColor;
|
|
|
|
|
+ nCandy.frameIndex(candyColor);
|
|
|
|
|
+ nCandy.x(58) =
|
|
|
|
|
+ nCandy.y(154) =
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
//boolean used to check which arrow is pressed
|
|
//boolean used to check which arrow is pressed
|
|
|
bins.keyDown = false;
|
|
bins.keyDown = false;
|
|
|
|
|
|