Code edit (2 edits merged)
Please save this source code
User prompt
convert interface text2 to use BorderedText instead
Code edit (3 edits merged)
Please save this source code
User prompt
add a background class
User prompt
Add a fullscreen background before the floor
Code edit (4 edits merged)
Please save this source code
User prompt
Display the following text under the score "Swipe left or right to move" and "Swipe up or tap to jump" under that
User prompt
set initial invulnerability to 0
User prompt
player no longer starts invulnerable
Code edit (1 edits merged)
Please save this source code
User prompt
player starts with invulnerability equal to INVULNERABILITY_TIME
Code edit (1 edits merged)
Please save this source code
User prompt
flash the player black when invulnerability reaches 60 and 30
User prompt
tint the player gold while it is invulnerable
Code edit (1 edits merged)
Please save this source code
User prompt
decrement player invulnerability in it's update function if it's greater than 0
Code edit (8 edits merged)
Please save this source code
User prompt
Change `invulnerability` from `true` to `0`
User prompt
Rename the player's `invulnerable` variable to `invulnerability` and update checks in other classes
Code edit (7 edits merged)
Please save this source code
User prompt
Increase COLUMN_VOLUME by 1
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Create an interface class that handles the score. It should contain the scoreTxt variable, and should have an increment function that takes in a value
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -10,8 +10,22 @@
});
scoreTxt.anchor.set(.5, 0);
self.addChild(scoreTxt);
;
+ var moveInstructions = new Text2('Swipe left or right to move', {
+ size: 100,
+ fill: "#ffffff"
+ });
+ moveInstructions.anchor.set(.5, 0);
+ moveInstructions.y = scoreTxt.height + 20;
+ self.addChild(moveInstructions);
+ var jumpInstructions = new Text2('Swipe up or tap to jump', {
+ size: 100,
+ fill: "#ffffff"
+ });
+ jumpInstructions.anchor.set(.5, 0);
+ jumpInstructions.y = moveInstructions.y + moveInstructions.height + 10;
+ self.addChild(jumpInstructions);
self.increment = increment;
self.gameOver = gameOver;
;
function increment(value) {
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.