Code edit (2 edits merged)
Please save this source code
User prompt
add a 500-pixel banner across top of screen
User prompt
add condition if stack reaches top of screen then stop
User prompt
rotate left hand button image 180 degrees
User prompt
flip left hand arrow image on the vertical
User prompt
Fix Bug: 'ReferenceError: cubeColor is not defined' in this line: 'newCube.color = cubeColor;' Line Number: 49
User prompt
add a grind at top of screen showing 8 hues of tint for cube colour that can be selected
User prompt
add button to stop/start cube falling
User prompt
for right buttons add move while pressed function
User prompt
for left and right buttons add move while pressed function
User prompt
for left and right button add key repeat function
User prompt
for cubes that are stacked lock in to position and do not move
User prompt
remove game started button
Code edit (1 edits merged)
Please save this source code
User prompt
stack cubes from bottom of screen up when they reach the bottom or intersect another cube
User prompt
add condition that cube stops at bottom of screen if it does not intersect another cube
User prompt
Stack cubes when they intersect another cube
User prompt
replace click for new cube with cube release every 5 seconds
User prompt
restrict falling area to screen only
User prompt
move buttons to left and right hand sides of display in middle
User prompt
add in buttons that will move the falling cube left or right
User prompt
add cube drop code in
User prompt
add ability to move cube left or right while it falls
User prompt
addd function to allow cubes to stack in rows at bottom of screen
User prompt
add mouse click to spawn new cube and for it to drop down screen
===================================================================
--- original.js
+++ change.js
@@ -2,13 +2,15 @@
var self = Container.call(this);
var cubeGraphics = self.createAsset('cube', 'Cube Graphics', .5, .5);
self.speed = 0;
self.move = function (direction) {
- self.y += self.speed;
- if (direction === 'left' && self.x - 10 >= 0) {
- self.x -= 10;
- } else if (direction === 'right' && self.x + 10 <= 2048) {
- self.x += 10;
+ if (self.speed !== 0) {
+ self.y += self.speed;
+ if (direction === 'left' && self.x - 10 >= 0) {
+ self.x -= 10;
+ } else if (direction === 'right' && self.x + 10 <= 2048) {
+ self.x += 10;
+ }
}
};
self.stack = function (otherCube) {
if (otherCube) {
arrow pointing left, transparent background, cartoon style, no shadow Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white square, 2d in-game asset, blank background, high contrast, no shadows, single game texture Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
vertical slider. 1000 pixels tall and 50 pixels wide. with numbers 1 at top and 10 at bottom. 2d in-game asset. blank background no shadows. high contrast Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
white square, 2d in-game asset, blank background, high contrast, no shadows, single game texture Single Game Texture. With word DROP in middle Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
background image 2732 high x 2048 wide. high contrast, light cartoon image of colored stacked cubes. out in open fields. Single Game Texture. In-Game asset. 3d. High contrast. No shadows. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
stone square, bevelled edges. 2d in-game asset, blank background, high contrast, no shadows, single-game texture. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Triangle pointing left, transparent background, cartoon style, no shadow Single Game Texture. In-Game asset. 2d. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.