Code edit (3 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: adjustStateBase is not defined' in or related to this line: 'var newStateValues = adjustStateBase(state, stateValues);' Line Number: 944
Code edit (1 edits merged)
Please save this source code
User prompt
instead of adding the victory message to the center gui, add it to the top with a y-value of 200
Code edit (1 edits merged)
Please save this source code
User prompt
change the victory message y position from -300 to -600
Code edit (2 edits merged)
Please save this source code
User prompt
When the boss is defeated, display a bordered text "VICTORY" message in the center of the screen with a large size
User prompt
Add a new empty WeaponBoss class inheriting from Container, that calls gameover when instantiated
Code edit (2 edits merged)
Please save this source code
User prompt
spawn the boss using the spawner instead of creating it manually
User prompt
instead of spawning a boss at the start of the game, spawn it when the countdown reaches 0
Code edit (1 edits merged)
Please save this source code
User prompt
Rename the function to onDestroy
User prompt
in the enemyBoss class, define a self.onDeath function that flashes the screen black, and disables the enemySpawner
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: dy is not defined' in or related to this line: 'self.parent.addChild(new ProjectileEnemy({' Line Number: 902
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: ENEMY_BOSS_HEALTH is not defined' in or related to this line: 'self.health = ENEMY_BOSS_HEALTH;' Line Number: 921
Code edit (3 edits merged)
Please save this source code
User prompt
add ENEMY_BOSS_PROJECTILE_COUNT projectileBoss instances to the boss, uniformly rotated
Code edit (1 edits merged)
Please save this source code
User prompt
add a projectileBoss asset to the ProjectileBoss class
User prompt
Add a new, empty ProjectileBoss class that inherits from the ConfigContainer class
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -852,11 +852,10 @@
y: ENEMY_RANGED_GRAPHICS_OFFSET,
anchorX: 0.6,
anchorY: 0.5
});
- var adjustStateBase = self.adjustState;
self.adjustState = function (state, stateValues) {
- var newStateValues = adjustStateBase.call(self, state, stateValues);
+ var newStateValues = adjustStateBase(state, stateValues);
switch (state) {
case ENEMY_STATE_MOVE:
newStateValues.cooldownAdjustment += ENEMY_RANGED_MOVE_COOLDOWN_ADJUSTMENT;
break;
@@ -889,8 +888,9 @@
});
var EnemyBoss = Enemy.expand(function (config) {
var self = Enemy.call(this, config);
var baseUpdate = self.update;
+ var adjustStateBase = self.adjustState;
var container = self.addChild(new SortingContainer(function (a, b) {
return Math.sin(a.rotation) - Math.sin(b.rotation);
}));
self.speed = ENEMY_BOSS_SPEED;
@@ -907,11 +907,10 @@
y: ENEMY_BOSS_PROJECTILE_OFFSET,
rotation: angle
}));
}
- var adjustStateBase = self.adjustState;
self.adjustState = function (state, stateValues) {
- var newStateValues = adjustStateBase.call(self, state, stateValues);
+ var newStateValues = adjustStateBase(state, stateValues);
switch (state) {
case ENEMY_STATE_ATTACK:
newStateValues.speedFactor = 1;
break;
pixel art cross with blue accents Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a white orb. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a white orb with a halo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a pulsating white heart with a halo. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a dark goo projectile with red highlights. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art tall blue fireball. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of an evil fantasy sword facing downward. Minor red details. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
backgroundAmbient
Sound effect
heroHealed
Sound effect
pickupExperience
Sound effect
heroLeveled
Sound effect
weaponCrossImpact
Sound effect
heroImpact
Sound effect
enemyDeath
Sound effect
pickupWeapon
Sound effect
pickupCrucifix
Sound effect
weaponCrossLaunch
Sound effect
heroDeath
Sound effect
enemyRoar
Sound effect
clockChime
Sound effect