Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: leaderAsset is undefined' in or related to this line: 'var borderedShape = self.attachAsset('shapeRectangle', {' Line Number: 139
User prompt
Add a borderedShape of shapeRect to the Leader class after the leaderAsset has been created. It should have a black fill and white border
Code edit (3 edits merged)
Please save this source code
User prompt
The update function first increases the y position (from 0, to the height of the leaderAsset) over LEADER_SPAWN_TIME duration, then decrements the countdownTime until it reaches zero, then decreases the y position (until 0) over LEADER_SPAWN_TIME, then returns true.
Code edit (1 edits merged)
Please save this source code
User prompt
Similarly to the particleList, iterate over the leaderList in the tick event
User prompt
Add to the Leader class a countdownTime variable (initially set to LEADER_DURATION) and an empty update function.
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Timeout.tick error: leaderClass is not defined' in or related to this line: 'leaderList.push(spawnPoint.addChild(new LeaderClass({' Line Number: 126
Code edit (7 edits merged)
Please save this source code
User prompt
When spawning a leader, add it to the leaderList
Code edit (2 edits merged)
Please save this source code
User prompt
Add a leaderHat asset to the top of the leaderTroll2 class
User prompt
Rename the leaderHat asset to leaderTrollHat
Code edit (1 edits merged)
Please save this source code
User prompt
To each LeaderTroll
Code edit (2 edits merged)
Please save this source code
User prompt
when the spawnTimer expires, call the global table's spawn function after a random timeout of 0 to LEADER_SPAWN_VAR
Code edit (1 edits merged)
Please save this source code
User prompt
Add a spawn function to the table class which checks if the leaders array is not empty, then randomly pops an item off the array and creates an instance of it
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Add a new global function called handleSpawnTimer, which is called on tick. In the function: decrement the spawnTimer, if the spawnTimer is <= 0 then restart it with the spawnTime value, then multiply the spawnTime by the LEADER_SPAWN_FACTOR
===================================================================
--- original.js
+++ change.js
@@ -122,12 +122,8 @@
border: '#FFFFFF' // White border
});
;
var countdownTime = LEADER_DURATION;
- var leaderAsset = self.attachAsset(imageId, {
- anchorX: 0.5,
- anchorY: 0
- });
self.scale.set(Math.random() < 0.5 ? -1 : 1, 1);
;
self.update = update;
self.slotIndex = config.slotIndex;
logo for a company called "blue lizard entertainment" using a damaged font and frozen elements.
Pixel art of the bam symbol. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of bam comic symbol.
pixel art of pow comic symbol.
pixel art of plastic squeaky hammer.
pixel art of a large, round, red start button.