Code edit (1 edits merged)
Please save this source code
User prompt
in the box update method, before checking the alive state, set self.alive to false if the box's y value goes above: `STAGE_HEIGHT + BOX_HEIGHT / 2`
Code edit (3 edits merged)
Please save this source code
User prompt
add an isPaused = false variable to the interface class, which when true prevents non-interface update ticks
User prompt
Add a global TERMINAL_VELOCITY = 20 and make sure boxes and the player never exceeds this value while falling
User prompt
Replace both PLAYER_GRAVITY and BOX_GRAVITY with a single GRAVITY global of 0.5. Make sure to update old references in the box and player class
Code edit (7 edits merged)
Please save this source code
User prompt
remove all console.log commands in the tnt explode function
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
set the player hitbox alpha to 0
Code edit (1 edits merged)
Please save this source code
User prompt
when the player rotates, rotate the player graphics instead
User prompt
when checking box collision, use the player hitbox instead of the player itself
Code edit (13 edits merged)
Please save this source code
User prompt
add a hitbox to the player
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: self is undefined' in this line: 'self.build('basic', .5, .5, 3);' Line Number: 195
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
when a TNT box countdown expires, create an ExplosionEffect centered on the TNT as a child of the game variable, and add it to the effectsList
Code edit (1 edits merged)
Please save this source code
User prompt
create an effectList array in the game class, iterate through it in the on tick calling their update function; if it returns truthy, remove and delete the effect
Code edit (9 edits merged)
Please save this source code
User prompt
create an explosion effect class
===================================================================
--- original.js
+++ change.js
@@ -146,11 +146,8 @@
self.shadow = shadowGraphics;
}
function update(args) {
var destroyNextTick = false;
- if (self.y > STAGE_HEIGHT + BOX_HEIGHT / 2) {
- self.alive = false;
- }
var upperBox = column.boxes[self.index + 1];
var shadowVisible = upperBox && upperBox.falling;
self.shadow.visible = shadowVisible;
if (shadowVisible) {
@@ -176,8 +173,11 @@
}
if (self.active) {
self.activation(args);
}
+ if (self.y > STAGE_HEIGHT + BOX_HEIGHT / 2) {
+ self.alive = false;
+ }
if (!self.alive) {
column.remove(self);
return true;
}
Pixel art, side view of a concrete factory floor . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pixel art, square with cute eyes . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pixel art, square with the texture of a tnt . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a crate, side view . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a crate, flat side view . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a crate, flat side view . Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pixel art of a golden christmas present. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pixel art of a green christmas present with red ribbons. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pixel art of an elaborate green christmas present with red ribbons. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a metal background.
pixel art of a crate made of stone with a label of coal on the side, flat side view. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a square tnt explosion. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.