Code edit (2 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
increase the animation speed for the enemy_rower
User prompt
enemy_rower needs to have an animation comprised of 2 frames. the second frame is enemy_rower_1. alternate between these frames once every 500 miliseconds
Code edit (3 edits merged)
Please save this source code
User prompt
move the enemy_rower 50 pixels lower
User prompt
attack the asset Enemy_Rower to the Obstacle similar to how you attached the rower to the player. the enemy_rower needs to overlap the obstacle
User prompt
attack the asset Enemy_Rower to the Obstacle similar to how you attached the rower to the player
User prompt
attack the asset Enemy_Rower to the Obstacle
User prompt
I dont see the 2 instances of the enemy_rower attached to the obstacle. this is a bug, attach them to the obstacle
User prompt
attack the asset Enemy_Rower to the Obstacle. but attach 2 of them with a 50 pixels distance between them
Code edit (1 edits merged)
Please save this source code
User prompt
spawn even more coins
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -59,8 +59,19 @@
var obstacleGraphics = self.attachAsset('obstacle', {
anchorX: 0.5,
anchorY: 0.5
});
+ // Attach two Enemy_Rower assets to the Obstacle
+ var enemyRower1 = self.attachAsset('Enemy_Rower', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: -50 // Position the first Enemy_Rower 50 pixels to the left
+ });
+ var enemyRower2 = self.attachAsset('Enemy_Rower', {
+ anchorX: 0.5,
+ anchorY: 0.5,
+ x: 50 // Position the second Enemy_Rower 50 pixels to the right
+ });
self.speed = obstacleSpeed;
self.move = function () {
self.x += self.speed;
// Destroy obstacle when it moves off screen
@@ -175,9 +186,9 @@
var scoreTxt;
var obstacles = []; // Array to keep track of obstacles
var obstacleSpeed = -10;
var coins = []; // Initialize coins array
-var coinSpeed = 15;
+var coinSpeed = 8;
var coinSpawnDirection = 'right'; // Initialize coin spawn direction
var enemies = []; // Initialize enemies array
var maxEnemies = 0; // Initialize maximum number of enemies that can be spawned
var enemySpawnDirection = 'left'; // Initialize enemy spawn direction