User prompt
After collecting 20 gold, make the upgrade button shine and active
User prompt
Make an improvement by spendig gold and pressing the upgrade button, increse bullett speed
User prompt
With pressing the upgrade button, make possible, to shoot faster for gold
User prompt
Move the upgrade button to the right down corner
User prompt
move the upgrade button to the left down corner
User prompt
Make an improvement option for the game. The marksman can improve his crossbow for gold, making it shoot faster
User prompt
Place the gold counter to the left down corner
User prompt
Place the gold counter on the top left corner
User prompt
Add a gold counter to the game, after succesfully shooting an enemy the markman can earn a gold coin
User prompt
Please make a background
User prompt
Give it a background, a cartoon style road to a spooky Halloween castle, moving in the background, making the imagination of moving
User prompt
make the bullett (arrow) rotate when the marksman turn
User prompt
Make enemies attack from all directions
User prompt
Make the markman able shoot at all direction
User prompt
Please place the marksman to the fix pont the center of the screen and allow it to turn
User prompt
Please make a front side for the hero, allow it to turn
User prompt
Please at the start of the game place the markman in the center of the screen, and make enemies attack from all directions. Make the marksman able to shoot at all directions
User prompt
Please fix the bug: 'Uncaught TypeError: Cannot read properties of undefined (reading 'addEventListener')' in or related to this line: 'document.addEventListener('keydown', function (event) {' Line Number: 91
User prompt
I want teh marksman to move wth keyboard or mouse
Initial prompt
Combat Marskman
===================================================================
--- original.js
+++ change.js
@@ -9,9 +9,9 @@
anchorY: 0.5
});
self.x = x;
self.y = y;
- self.speed = bulletSpeed;
+ self.speed = 10;
self.angle = angle;
self.rotation = angle; // Rotate the bullet when it is created
self.update = function () {
self.x += Math.cos(self.angle) * self.speed;
@@ -91,11 +91,9 @@
/****
* Game Code
****/
-// Initialize bullet speed
// Update gold
-var bulletSpeed = 10;
function updateGold() {
goldTxt.setText('Gold: ' + gold);
}
game.move = function (x, y, obj) {
@@ -139,15 +137,8 @@
anchorY: 0.5
});
upgradeButton.x = 2048 - 100;
upgradeButton.y = 2732 - 100;
- upgradeButton.down = function () {
- if (gold > 0) {
- bulletSpeed += 1;
- gold -= 1;
- updateGold();
- }
- };
game.addChild(upgradeButton);
}
// Update score
function updateScore() {
@@ -195,7 +186,12 @@
var newEnemy = new Enemy();
game.addChild(newEnemy);
enemies.push(newEnemy);
}
+ // Check if gold is equal to or more than 20
+ if (gold >= 20) {
+ // Make the upgrade button shine
+ LK.effects.flashObject(upgradeButton, 0xffff00, 1000);
+ }
};
// Initialize game
initGame();
\ No newline at end of file
A ghost in cartoon style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cartoon style upward arrow. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cartoon spooky night road from above. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A man with a crowwbow in a hat from above cartoon style. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cartoon style bat. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A cartoon style zombie. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
A simple arrow made of wood with iron head in bright colour. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon vampire. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.