User prompt
Update the colors array to have 30 tones of the rainbow
User prompt
The rainbow colors are great, however increase the amount of colors in the rainbow to 30
User prompt
use a variable in game to set the color of plates
User prompt
Use tint to set colors of plates, such that they cycle trough the rainbow of colors
User prompt
Instead of stacking topPlate stack newPlate
User prompt
Move the call to stack inside the if statement
User prompt
In the stacker logic, remember that plate is center anchored
User prompt
I think top plate is -2 not -1
User prompt
I don't think top plate is the right element
User prompt
set b = 4
User prompt
set b = 3
User prompt
make plates move twice as fas
User prompt
set b = 5
User prompt
Add the proper () around the stack if statement
User prompt
Only create the new plate if we successful stacked a plate
User prompt
Don’t call the slide method in down
User prompt
When you place a plate make sure the plate overlaps with the plate below it on the x axis
User prompt
Don’t set speed in the slide method
User prompt
When placing a plate, check if the plate overlaps with the plate below it. If not make the game game over
User prompt
Make plates move 50% faster
User prompt
Add half a plate width to the spawn x of plates
User prompt
Plates should spawn such that they are fully outside the screen on the right when they spawn
User prompt
Make sure plates spawn outside the screen
User prompt
Scale plates to be 1000px wide
User prompt
Make sure new plates are also moved up by half the height of a plate
===================================================================
--- original.js
+++ change.js
@@ -3,12 +3,9 @@
var plateGraphics = self.createAsset('plate', 'Plate Graphics', .5, .5);
plateGraphics.width = 1000;
self.colorIndex = 0;
self.updateColor = function () {
- var colors = [];
- for (var i = 0; i < 30; i++) {
- colors.push(Math.floor(Math.random() * 0xFFFFFF));
- }
+ var colors = [0xFF0000, 0xFF1100, 0xFF2200, 0xFF3300, 0xFF4400, 0xFF5500, 0xFF6600, 0xFF7700, 0xFF8800, 0xFF9900, 0xFFAA00, 0xFFBB00, 0xFFCC00, 0xFFDD00, 0xFFEE00, 0xFFFF00, 0xEEFF00, 0xDDFF00, 0xCCFF00, 0xBBFF00, 0xAAFF00, 0x99FF00, 0x88FF00, 0x77FF00, 0x66FF00, 0x55FF00, 0x44FF00, 0x33FF00, 0x22FF00, 0x11FF00, 0x00FF00];
plateGraphics.tint = colors[self.colorIndex % colors.length];
self.colorIndex++;
};
self.updateColor();