User prompt
remove the "SecondEnemy"
User prompt
let the danger2 move twice as fast
User prompt
create instances of the `Danger2` class at appropriate intervals (similar to how `LeftDanger`, `RightDanger`, and `SecondEnemy` are created and added), set their initial positions, and then add them to the game using `game.addChild()`
User prompt
for the Danger2 use the sprite named "Danger2"
User prompt
Make a second enemy with same behavour as first. Spawn it half as often. make it move twice as fast
User prompt
Create a color mask that change the color of the ExtraPointsBallon to blue
User prompt
Fix Bug: 'TypeError: LK.effects.shakeScreen is not a function' in or related to this line: 'LK.effects.shakeScreen(500);' Line Number: 215
User prompt
when the player collide with ExtraPointsBallon, make a cool screenshake
User prompt
spawns some objects that can give the player extra 10 point when colliding. Let the objects slowly fall down from the top of the screen. Use the sprite "ExtraPointsBalloon"
User prompt
remember to move ExtraPointsBallon down
User prompt
at random, spawn an ExtraPointsBallon outside the screen at the top. Make it go down like the clouds
User prompt
make a scoring system, that gives point for how lon time the player is alive
User prompt
make a second Danger, called "Danger2" with the same behavour as the Left and Right Danger.
User prompt
For the Danger spawning on left side and going right, flip the sprite
User prompt
remember that the Dangers should go left and right
User prompt
make the left and right Danger spawn
User prompt
cancel the last change
User prompt
make the enemies go down like the clouds
User prompt
create some background clouds and make the illusion that the player is moving up
User prompt
the enemies should randomly come from either left side or right side and move sideways
User prompt
the player moves by dragging
User prompt
The player can mover freely on the entire screen with mouse or finger touch
Initial prompt
GoingUp
===================================================================
--- original.js
+++ change.js
@@ -1,24 +1,8 @@
/****
* Classes
****/
// SecondEnemy class
-var SecondEnemy = Container.expand(function () {
- var self = Container.call(this);
- var dangerGraphics = self.attachAsset('danger', {
- anchorX: 0.5,
- anchorY: 0.5
- });
- dangerGraphics.scale.x = -1;
- self.speed = 6;
- self.direction = Math.random() < 0.5 ? -1 : 1;
- self.move = function () {
- self.x += self.speed;
- if (self.x > 2048) {
- self.x = -self.width;
- }
- };
-});
var ExtraPointsBalloon = Container.expand(function () {
var self = Container.call(this);
var balloonGraphics = self.attachAsset('ExtraPointsBalloon', {
anchorX: 0.5,
@@ -191,16 +175,8 @@
leftDanger.y = Math.random() * 2732;
dangers.push(leftDanger);
game.addChild(leftDanger);
}
- // Spawn SecondEnemy
- if (LK.ticks % 360 === 0) {
- var secondEnemy = new SecondEnemy();
- secondEnemy.x = -secondEnemy.width;
- secondEnemy.y = Math.random() * 2732;
- dangers.push(secondEnemy);
- game.addChild(secondEnemy);
- }
// Spawn RightDanger
if (LK.ticks % 120 === 0) {
var rightDanger = new RightDanger();
rightDanger.x = 2048 + rightDanger.width;
a pixel cloud. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a pixel hot air balloon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simpel pixel biplane sideview. Blank background, 2d. No shadows.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a simple red balloon on a string. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
a 2d ufo sideview. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.