User prompt
create a new asset for bossbullet2 and assign to boss2 bullets
User prompt
move powerups asset 200 pixel higher but leave diamon icon in its place
User prompt
in level2, use enemy3 instead of enemy2
User prompt
after boss 2 is destroyed, show powerupmenu again, and after powerupmenu is closed move to next level
User prompt
use different asset for boss in level2 name it boss2
User prompt
only apply tint on hitpoints to block and not enemy2
User prompt
blocks will have tints depending on the hitpoints left
User prompt
do not increase level when boss is destroyed
User prompt
only increase level when boss is destroyed
User prompt
console log level
User prompt
Bossbullet should rotate on its axis
User prompt
Make boss and bossbullets ossilarion smaller
User prompt
Boss and bossbullets should increase and decrease their size
User prompt
Icrease and decrease size of boss and bossbullet
User prompt
When powerupscreen is closed move to next level
User prompt
In the code, add a number to identify each level
User prompt
Add level number to each level
Code edit (1 edits merged)
Please save this source code
User prompt
Add level 3
User prompt
add down event to close button in powerup menu. when touched, close powerup menu
User prompt
add a close button to the powerup menu
User prompt
create level 2. level 2 will start once the powerup menu is close
Code edit (1 edits merged)
Please save this source code
User prompt
once pwoerupmenu is closed, level 2 should start
User prompt
lets create a level structure. each levell will have x amount of waves (that will be configured) x amounts of enemy2 and a boss. once the boss is killed, the powerup menu will be dipsplayed.
===================================================================
--- original.js
+++ change.js
@@ -49,9 +49,9 @@
self.scale.x -= 0.001;
self.scale.y -= 0.001;
}
if (LK.ticks % 30 == 0) {
- var newBullet = new BossBullet();
+ var newBullet = new BossBullet2();
newBullet.x = self.x;
newBullet.y = self.y + self.height / 2;
bullets.push(newBullet);
game.addChild(newBullet);
@@ -77,8 +77,28 @@
self.scale.y -= 0.001;
}
};
});
+var BossBullet2 = Container.expand(function () {
+ var self = Container.call(this);
+ var bulletGraphics = self.attachAsset('bossbullet2', {
+ anchorX: 0.5,
+ anchorY: 0.5
+ });
+ self.speed = 5;
+ self.update = function () {
+ self.y += self.speed;
+ self.rotation += 0.1; // Add rotation to the boss bullet
+ // Logic to increase and decrease boss bullet size
+ if (LK.ticks % 120 < 60) {
+ self.scale.x += 0.001;
+ self.scale.y += 0.001;
+ } else {
+ self.scale.x -= 0.001;
+ self.scale.y -= 0.001;
+ }
+ };
+});
// Bullet class
var Bullet = Container.expand(function () {
var self = Container.call(this);
var bulletGraphics = self.attachAsset('bullet', {
@@ -281,9 +301,9 @@
anchorX: 0.5,
anchorY: 0.5
});
powerup1.x = screenGraphics.x - 300;
- powerup1.y = screenGraphics.y - 100;
+ powerup1.y = screenGraphics.y + 100;
self.addChild(powerup1);
powerup1.down = function (x, y, obj) {
console.log("Powerup1 touched");
if (diamondCount >= 10) {
@@ -335,9 +355,9 @@
anchorX: 0.5,
anchorY: 0.5
});
powerup2.x = screenGraphics.x;
- powerup2.y = screenGraphics.y - 100;
+ powerup2.y = screenGraphics.y + 100;
self.addChild(powerup2);
powerup2.down = function (x, y, obj) {
console.log("Powerup2 touched");
if (diamondCount >= 20) {
@@ -386,9 +406,9 @@
anchorX: 0.5,
anchorY: 0.5
});
powerup3.x = screenGraphics.x + 300;
- powerup3.y = screenGraphics.y - 100;
+ powerup3.y = screenGraphics.y + 100;
self.addChild(powerup3);
powerup3.down = function (x, y, obj) {
console.log("Powerup3 touched");
if (diamondCount >= 30) {
8-bit. cartoon. white star.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon 8 bit fairy dust. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Cartoon, 8bit, fireball. Black border. Cicular.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
cartoon, 8 bit, shield. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8bit, cartoon, axe. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
dark electric ball, 8bit, cartoon.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8bit, cartoon, treasure chest frame. very big empty center. only a fine border of chest. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
shoot
Sound effect
boom
Sound effect
Hit
Sound effect
backgroundmusic
Sound effect
bossbullet
Sound effect
bossappear
Sound effect
hit
Sound effect
diamondcollect
Sound effect
hooray
Sound effect
nono
Sound effect
letsgo
Sound effect
death
Sound effect
yes
Sound effect