User prompt
Add gravity to overhang plate
User prompt
Update overhang plates to both have speed x and speed y variabels.
User prompt
Update the plate class to set a .color property when updating color
User prompt
Make the overhang plates have the color of the plate that was cut
User prompt
Create a plate element the width of the overhang, when stacking a plate. Make this element bounce off screen.
User prompt
Update the code such that target Y is changed if more than 17 plates are on the screen
User prompt
the hight of the plate should be added not subtracted to the target y of plate container
User prompt
When stacking a plate, if the there are more than 5 plates on the screen add the hight of one plate to the target y of the plate container
User prompt
in tick if plate container y is different than target y, animate the y of the plate container to the target y
User prompt
set targetY of plate container to 0
User prompt
Create a target y for the plate container
User prompt
Create a plate container in game and attached all plates to this container
User prompt
Use proper color math to calculate the less saturated background color
User prompt
I don't think the less saturated color is calculated correctly
User prompt
when updating plate color, change the background color the game to a less natured version of the updated color
User prompt
Fix Bug: 'TypeError: null is not an object (evaluating 'self.parent.changeSaturation')' in this line: 'var lessSatColor = self.parent.changeSaturation(plateGraphics.tint, 0.5);' Line Number: 10
User prompt
When calling updateColor on a plate, use the returned variable to calculate a less saturated version of the color and set that as the current background color of the game
User prompt
Return the new color on the update color function in plate
User prompt
Create a method on game that can take a color and change it's saturation
User prompt
Create a method on game that sets the background color to a less vibration version of the current plate color
User prompt
if the overhang is on the left, add half the overhang width to the newly stacked plates x position
User prompt
Subtract half the overhang width from the newly stacked plate x if the overhang is on the right side
User prompt
If the overhang is on the right side, subtract half the overhang width to the stacked plate x
User prompt
If the overhang happened on the right side, move the stacked plate such that the right edge of the newly stacked plate aligned with the right of the plate below it
User prompt
Create a variable that tracks if the overhang happened on the right or left side of the stack
===================================================================
--- original.js
+++ change.js
@@ -3,12 +3,13 @@
var plateGraphics = self.createAsset('plate', 'Overhang Plate Graphics', .5, .5);
plateGraphics.width = width;
plateGraphics.tint = color;
self.speedX = direction === 'right' ? 15 : -15;
- self.speedY = 0;
+ self.speedY = 0.5;
self.move = function () {
self.x += self.speedX;
self.y += self.speedY;
+ self.speedY += 0.5;
};
});
var Plate = Container.expand(function (targetWidth) {
var self = Container.call(this);