User prompt
Half the wave counter size
User prompt
Move the Wave: text next to the pause button.
User prompt
Move the Wave: text closer to the pause button.
User prompt
Move the Wave: text next to the pause button.
User prompt
Move the Wave: text to the topright corner of the map
User prompt
Place the Wave: text to the left bottom corner of the map
User prompt
Remove block from the game
User prompt
Remove boss enemy from the game
User prompt
Ensure hero is not shoot from the center of the asset but from the left and right edge of the asset
User prompt
Migrate to the latest version of LK
Remix started
Copy Air Force War (UPDATE 3.5)
===================================================================
--- original.js
+++ change.js
@@ -1,57 +1,7 @@
/****
* Classes
****/
-// Define the ArrowSelector class
-var ArrowSelector = Container.expand(function () {
- var self = Container.call(this);
- var colors = [0x4fd54a, 0xff0000, 0x0000ff, 0xffff00]; // Array of colors to choose from
- var currentColorIndex = 0; // Start with the first color
- var leftArrow = self.attachAsset('block', {
- width: 50,
- height: 100,
- color: 0x777777,
- anchorX: 0.5,
- anchorY: 0.5
- });
- var rightArrow = self.attachAsset('block', {
- width: 50,
- height: 100,
- color: 0x777777,
- anchorX: 0.5,
- anchorY: 0.5
- });
- leftArrow.x = 100; // Position left arrow
- leftArrow.y = 2732 - 200; // Position at the bottom of the screen
- rightArrow.x = 2048 - 100; // Position right arrow
- rightArrow.y = 2732 - 200; // Position at the bottom of the screen
- leftArrow.on('down', function () {
- currentColorIndex--;
- if (currentColorIndex < 0) {
- currentColorIndex = colors.length - 1;
- }
- hero.setColor(colors[currentColorIndex]); // Update hero color to the left
- updateHeroColorText(colors[currentColorIndex]); // Update the text displaying the hero's color
- });
- rightArrow.on('down', function () {
- currentColorIndex++;
- if (currentColorIndex >= colors.length) {
- currentColorIndex = 0;
- }
- hero.setColor(colors[currentColorIndex]); // Update hero color to the right
- updateHeroColorText(colors[currentColorIndex]); // Update the text displaying the hero's color
- });
- self.addChild(leftArrow);
- self.addChild(rightArrow);
-});
-// Define the Block class
-var Block = Container.expand(function () {
- var self = Container.call(this);
- var blockGraphics = self.attachAsset('block', {
- anchorX: 0.5,
- anchorY: 0.5
- });
-});
// Define the Enemy class
var Enemy = Container.expand(function () {
var self = Container.call(this);
var enemyGraphics = self.attachAsset('enemy', {
@@ -187,9 +137,8 @@
/****
* Game Code
****/
-var colorSelector = game.addChild(new ArrowSelector());
var stars = [];
for (var i = 0; i < 100; i++) {
var star = new Star();
star.x = Math.random() * 2048;