Add audio assets and integrate sound effects with enhanced visual feedback
This commit is contained in:
parent
b17cb86c55
commit
4bcbfbd9c9
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -5,6 +5,10 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Overrun</title>
|
<title>Overrun</title>
|
||||||
<style>
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: 'FutureImperfect';
|
||||||
|
src: url('assets/fonts/FutureImperfect-2gmo.otf') format('opentype');
|
||||||
|
}
|
||||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
body {
|
body {
|
||||||
background: #000;
|
background: #000;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ export class Player {
|
||||||
this.hp = this.stats.maxHp;
|
this.hp = this.stats.maxHp;
|
||||||
this.lives = 3;
|
this.lives = 3;
|
||||||
this.invincible = false;
|
this.invincible = false;
|
||||||
|
this._dead = false;
|
||||||
this._fireCooldown = 0;
|
this._fireCooldown = 0;
|
||||||
this._baseFireInterval = 250; // ms between shots
|
this._baseFireInterval = 250; // ms between shots
|
||||||
this._isMoving = false;
|
this._isMoving = false;
|
||||||
|
|
@ -69,6 +70,7 @@ export class Player {
|
||||||
get active() { return this.sprite?.active ?? false; }
|
get active() { return this.sprite?.active ?? false; }
|
||||||
|
|
||||||
update(delta) {
|
update(delta) {
|
||||||
|
if (this._dead) return;
|
||||||
this._move();
|
this._move();
|
||||||
this._rotateFacing(delta);
|
this._rotateFacing(delta);
|
||||||
this._handleFire(delta);
|
this._handleFire(delta);
|
||||||
|
|
@ -120,6 +122,7 @@ export class Player {
|
||||||
}
|
}
|
||||||
|
|
||||||
_spawnBullet() {
|
_spawnBullet() {
|
||||||
|
this.scene.sound.play('sfx-shoot', { volume: 0.4 });
|
||||||
const bx = this.x + Math.cos(this.facing) * GUN_TIP_DIST;
|
const bx = this.x + Math.cos(this.facing) * GUN_TIP_DIST;
|
||||||
const by = this.y + Math.sin(this.facing) * GUN_TIP_DIST;
|
const by = this.y + Math.sin(this.facing) * GUN_TIP_DIST;
|
||||||
const bullet = this.scene.add.circle(bx, by, BULLET_SIZE, 0xffff00);
|
const bullet = this.scene.add.circle(bx, by, BULLET_SIZE, 0xffff00);
|
||||||
|
|
@ -149,32 +152,140 @@ export class Player {
|
||||||
|
|
||||||
if (this.hp <= 0) {
|
if (this.hp <= 0) {
|
||||||
this.hp = 0;
|
this.hp = 0;
|
||||||
|
this._hitFlash(true);
|
||||||
this._loseLife();
|
this._loseLife();
|
||||||
|
} else {
|
||||||
|
this._hitFlash(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_hitFlash(isLifeLost) {
|
||||||
|
this.scene.sound.play('sfx-take-damage', { volume: 0.5 });
|
||||||
|
const scene = this.scene;
|
||||||
|
const W = scene.scale.width;
|
||||||
|
const H = scene.scale.height;
|
||||||
|
|
||||||
|
scene.cameras.main.shake(isLifeLost ? 300 : 80, isLifeLost ? 0.016 : 0.005);
|
||||||
|
|
||||||
|
const alpha = isLifeLost ? 0.55 : 0.28;
|
||||||
|
const duration = isLifeLost ? 400 : 220;
|
||||||
|
const flash = scene.add.rectangle(W / 2, H / 2, W, H, 0xff0000, alpha).setDepth(49);
|
||||||
|
scene.tweens.add({ targets: flash, alpha: 0, duration, onComplete: () => flash.destroy() });
|
||||||
|
|
||||||
|
if (!isLifeLost) {
|
||||||
|
this.sprite.setTint(0xff4444);
|
||||||
|
scene.time.delayedCall(100, () => { if (this.sprite?.active) this.sprite.clearTint(); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_loseLife() {
|
_loseLife() {
|
||||||
|
const livesBeforeDeath = this.lives;
|
||||||
this.lives--;
|
this.lives--;
|
||||||
|
|
||||||
if (this.lives <= 0) {
|
if (this.lives <= 0) {
|
||||||
this.scene.events.emit('game-over');
|
this.scene.events.emit('game-over');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.scene.sound.play('sfx-death', { volume: 0.6 });
|
||||||
|
|
||||||
this.hp = this.stats.maxHp;
|
this.hp = this.stats.maxHp;
|
||||||
|
this.invincible = true;
|
||||||
|
this._dead = true;
|
||||||
|
this.sprite.body.setVelocity(0, 0);
|
||||||
|
this.sprite.anims.stop();
|
||||||
|
|
||||||
|
// Spin and fade out
|
||||||
|
this.scene.tweens.add({
|
||||||
|
targets: this.sprite,
|
||||||
|
angle: '+=720',
|
||||||
|
alpha: 0,
|
||||||
|
duration: 600,
|
||||||
|
ease: 'Power2',
|
||||||
|
onComplete: () => {
|
||||||
|
const W = this.scene.scale.width;
|
||||||
|
const H = this.scene.scale.height;
|
||||||
|
this.sprite.setPosition(W / 2, H / 2);
|
||||||
|
this.sprite.setAngle(0);
|
||||||
|
this.sprite.setAlpha(1);
|
||||||
|
this._dead = false;
|
||||||
|
this.scene.sound.play('sfx-new-life', { volume: 0.6 });
|
||||||
this._startInvincibility();
|
this._startInvincibility();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
this._showLivesOverlay(livesBeforeDeath, this.lives);
|
||||||
}
|
}
|
||||||
|
|
||||||
_startInvincibility() {
|
_startInvincibility() {
|
||||||
this.invincible = true;
|
this.invincible = true;
|
||||||
|
// Blink for ~5 seconds: 17 cycles × 300ms = 5.1s
|
||||||
this.scene.tweens.add({
|
this.scene.tweens.add({
|
||||||
targets: this.sprite,
|
targets: this.sprite,
|
||||||
alpha: 0,
|
alpha: 0,
|
||||||
duration: 150,
|
duration: 150,
|
||||||
yoyo: true,
|
yoyo: true,
|
||||||
repeat: 4,
|
repeat: 16,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
this.sprite.setAlpha(1);
|
this.sprite.setAlpha(1);
|
||||||
this.invincible = false;
|
this.invincible = false;
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_showLivesOverlay(oldLives, newLives) {
|
||||||
|
const scene = this.scene;
|
||||||
|
const W = scene.scale.width;
|
||||||
|
const H = scene.scale.height;
|
||||||
|
const cx = W / 2;
|
||||||
|
const cy = H * 0.3;
|
||||||
|
|
||||||
|
const baseStyle = {
|
||||||
|
fontFamily: 'FutureImperfect',
|
||||||
|
fontSize: '52px',
|
||||||
|
stroke: '#000000', strokeThickness: 6,
|
||||||
|
};
|
||||||
|
|
||||||
|
const label = scene.add.text(cx, cy, 'Lives: ', { ...baseStyle, fill: '#ffffff' })
|
||||||
|
.setOrigin(1, 0.5).setDepth(60);
|
||||||
|
const oldText = scene.add.text(cx, cy, String(oldLives), { ...baseStyle, fill: '#ff4444' })
|
||||||
|
.setOrigin(0, 0.5).setDepth(60);
|
||||||
|
|
||||||
|
// Shake old count, then fade it out, then show new count
|
||||||
|
scene.tweens.add({
|
||||||
|
targets: oldText,
|
||||||
|
x: oldText.x + 12,
|
||||||
|
duration: 50,
|
||||||
|
yoyo: true,
|
||||||
|
repeat: 7,
|
||||||
|
delay: 400,
|
||||||
|
onComplete: () => {
|
||||||
|
scene.tweens.add({
|
||||||
|
targets: oldText,
|
||||||
|
alpha: 0,
|
||||||
|
duration: 180,
|
||||||
|
onComplete: () => {
|
||||||
|
oldText.destroy();
|
||||||
|
const newText = scene.add.text(cx, cy, String(newLives), { ...baseStyle, fill: '#44ff88' })
|
||||||
|
.setOrigin(0, 0.5).setDepth(60).setAlpha(0);
|
||||||
|
scene.tweens.add({
|
||||||
|
targets: newText,
|
||||||
|
alpha: 1,
|
||||||
|
duration: 200,
|
||||||
|
onComplete: () => {
|
||||||
|
scene.time.delayedCall(900, () => {
|
||||||
|
scene.tweens.add({
|
||||||
|
targets: [label, newText],
|
||||||
|
alpha: 0,
|
||||||
|
duration: 1200,
|
||||||
|
onComplete: () => { label.destroy(); newText.destroy(); },
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ export class BaseEnemy {
|
||||||
|
|
||||||
_die() {
|
_die() {
|
||||||
this._dying = true;
|
this._dying = true;
|
||||||
|
if (this._deathSound) this.scene.sound.play(this._deathSound, { volume: 0.5 });
|
||||||
this.scene.events.emit('enemy-killed', { xp: this.xp, x: this.x, y: this.y });
|
this.scene.events.emit('enemy-killed', { xp: this.xp, x: this.x, y: this.y });
|
||||||
|
|
||||||
// Stop movement and hide HP bar immediately
|
// Stop movement and hide HP bar immediately
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ export class BomberEnemy extends BaseEnemy {
|
||||||
this._offsetAngle = Math.random() * Math.PI * 2;
|
this._offsetAngle = Math.random() * Math.PI * 2;
|
||||||
this._wobble = 0.3 + Math.random() * 0.4;
|
this._wobble = 0.3 + Math.random() * 0.4;
|
||||||
this._exploded = false;
|
this._exploded = false;
|
||||||
|
this._deathSound = 'sfx-death-bomber';
|
||||||
}
|
}
|
||||||
|
|
||||||
update(delta) {
|
update(delta) {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ export class ChaseEnemy extends BaseEnemy {
|
||||||
contactDamage: 12,
|
contactDamage: 12,
|
||||||
});
|
});
|
||||||
this._deathPulseColor = 0x00ff44;
|
this._deathPulseColor = 0x00ff44;
|
||||||
|
this._deathSound = 'sfx-death-chaser';
|
||||||
}
|
}
|
||||||
|
|
||||||
update(delta) {
|
update(delta) {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ export class ShooterEnemy extends BaseEnemy {
|
||||||
this._shootTimer = SHOOT_INTERVAL * Math.random(); // stagger first shot
|
this._shootTimer = SHOOT_INTERVAL * Math.random(); // stagger first shot
|
||||||
this.projectiles = scene.add.group();
|
this.projectiles = scene.add.group();
|
||||||
this._deathPulseColor = 0x9900ff;
|
this._deathPulseColor = 0x9900ff;
|
||||||
|
this._deathSound = 'sfx-death-shooter';
|
||||||
}
|
}
|
||||||
|
|
||||||
_die() {
|
_die() {
|
||||||
|
|
@ -64,6 +65,7 @@ export class ShooterEnemy extends BaseEnemy {
|
||||||
}
|
}
|
||||||
|
|
||||||
_fireProjectile() {
|
_fireProjectile() {
|
||||||
|
this.scene.sound.play('sfx-shooter-shoot', { volume: 0.35 });
|
||||||
const angle = Phaser.Math.Angle.Between(this.x, this.y, this.player.x, this.player.y);
|
const angle = Phaser.Math.Angle.Between(this.x, this.y, this.player.x, this.player.y);
|
||||||
const proj = this.scene.add.circle(this.x, this.y, 6, PROJECTILE_COLOR);
|
const proj = this.scene.add.circle(this.x, this.y, 6, PROJECTILE_COLOR);
|
||||||
this.scene.physics.add.existing(proj);
|
this.scene.physics.add.existing(proj);
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ export class SprayerEnemy extends BaseEnemy {
|
||||||
this._shootTimer = SHOOT_INTERVAL * Math.random();
|
this._shootTimer = SHOOT_INTERVAL * Math.random();
|
||||||
this.projectiles = scene.add.group();
|
this.projectiles = scene.add.group();
|
||||||
this._deathPulseColor = 0x00ffcc;
|
this._deathPulseColor = 0x00ffcc;
|
||||||
|
this._deathSound = 'sfx-death-sprayer';
|
||||||
}
|
}
|
||||||
|
|
||||||
_die() {
|
_die() {
|
||||||
|
|
@ -63,6 +64,7 @@ export class SprayerEnemy extends BaseEnemy {
|
||||||
}
|
}
|
||||||
|
|
||||||
_fireSpray() {
|
_fireSpray() {
|
||||||
|
this.scene.sound.play('sfx-sprayer-shoot', { volume: 0.4 });
|
||||||
const baseAngle = Phaser.Math.Angle.Between(this.x, this.y, this.player.x, this.player.y);
|
const baseAngle = Phaser.Math.Angle.Between(this.x, this.y, this.player.x, this.player.y);
|
||||||
for (let i = 0; i < SPRAY_COUNT; i++) {
|
for (let i = 0; i < SPRAY_COUNT; i++) {
|
||||||
// Spread bullets evenly across the arc: indices 0..4 map to -1..+1
|
// Spread bullets evenly across the arc: indices 0..4 map to -1..+1
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ export class SwarmerEnemy extends BaseEnemy {
|
||||||
this._offsetAngle = Math.random() * Math.PI * 2;
|
this._offsetAngle = Math.random() * Math.PI * 2;
|
||||||
this._wobble = Math.random() * 0.5;
|
this._wobble = Math.random() * 0.5;
|
||||||
this._deathPulseColor = 0xff2222;
|
this._deathPulseColor = 0xff2222;
|
||||||
|
this._deathSound = 'sfx-death-swarmer';
|
||||||
}
|
}
|
||||||
|
|
||||||
_die() {
|
_die() {
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ export class GameOverScene extends Phaser.Scene {
|
||||||
this.add.rectangle(W / 2, H / 2, W, H, 0x000000, 0.75);
|
this.add.rectangle(W / 2, H / 2, W, H, 0x000000, 0.75);
|
||||||
|
|
||||||
this.add.text(W / 2, H / 2 - 60, 'GAME OVER', {
|
this.add.text(W / 2, H / 2 - 60, 'GAME OVER', {
|
||||||
|
fontFamily: 'FutureImperfect',
|
||||||
fontSize: '64px',
|
fontSize: '64px',
|
||||||
fill: '#ff3333',
|
fill: '#ff3333',
|
||||||
fontStyle: 'bold',
|
|
||||||
stroke: '#660000',
|
stroke: '#660000',
|
||||||
strokeThickness: 6,
|
strokeThickness: 6,
|
||||||
}).setOrigin(0.5);
|
}).setOrigin(0.5);
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,21 @@ export class GameScene extends Phaser.Scene {
|
||||||
this.load.json('skillTree', './js/data/skillTree.json');
|
this.load.json('skillTree', './js/data/skillTree.json');
|
||||||
this.load.spritesheet('player', './assets/sprites/player.png', { frameWidth: 48, frameHeight: 48 });
|
this.load.spritesheet('player', './assets/sprites/player.png', { frameWidth: 48, frameHeight: 48 });
|
||||||
this.load.spritesheet('enemies', './assets/sprites/enemies.png', { frameWidth: 48, frameHeight: 48 });
|
this.load.spritesheet('enemies', './assets/sprites/enemies.png', { frameWidth: 48, frameHeight: 48 });
|
||||||
|
this.load.audio('music-game', './assets/music/gameBackground.mp3');
|
||||||
|
this.load.audio('sfx-edge-remove', './assets/fx/EdgeRemove.mp3');
|
||||||
|
this.load.audio('sfx-arrow-ping', './assets/fx/ArrowPing.mp3');
|
||||||
|
this.load.audio('sfx-sprayer-shoot', './assets/fx/SprayerShoot.mp3');
|
||||||
|
this.load.audio('sfx-death', './assets/fx/Death.mp3');
|
||||||
|
this.load.audio('sfx-new-life', './assets/fx/NewLife.mp3');
|
||||||
|
this.load.audio('sfx-shoot', './assets/fx/Shoot.mp3');
|
||||||
|
this.load.audio('sfx-take-damage', './assets/fx/TakeDamage.mp3');
|
||||||
|
this.load.audio('sfx-shooter-shoot', './assets/fx/ShooterShoot.mp3');
|
||||||
|
this.load.audio('sfx-enemy-wave', './assets/fx/EnemyWave.mp3');
|
||||||
|
this.load.audio('sfx-death-chaser', './assets/fx/EnemyChaseDeath.mp3');
|
||||||
|
this.load.audio('sfx-death-swarmer', './assets/fx/EnemySwarmerDeath.mp3');
|
||||||
|
this.load.audio('sfx-death-shooter', './assets/fx/EnemyShooterDeath.mp3');
|
||||||
|
this.load.audio('sfx-death-sprayer', './assets/fx/EnemySprayerDeath.mp3');
|
||||||
|
this.load.audio('sfx-death-bomber', './assets/fx/EnemyBomberDeath.mp3');
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
|
|
@ -55,12 +70,16 @@ export class GameScene extends Phaser.Scene {
|
||||||
this._waitingForExit = false;
|
this._waitingForExit = false;
|
||||||
this._pulseEffects = [];
|
this._pulseEffects = [];
|
||||||
|
|
||||||
|
this.events.on('wave-start', () => this.sound.play('sfx-enemy-wave', { volume: 0.5 }));
|
||||||
this.events.on('zone-waves-complete', () => this._startZoneExit());
|
this.events.on('zone-waves-complete', () => this._startZoneExit());
|
||||||
|
|
||||||
this.reticle = new Reticle(this);
|
this.reticle = new Reticle(this);
|
||||||
|
|
||||||
this._setupBarriers();
|
this._setupBarriers();
|
||||||
|
|
||||||
|
this._bgMusic = this.sound.add('music-game', { loop: true, volume: 0.8 });
|
||||||
|
this._bgMusic.play();
|
||||||
|
|
||||||
this.waveManager.start();
|
this.waveManager.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -191,6 +210,7 @@ export class GameScene extends Phaser.Scene {
|
||||||
// ── Zone exit (Smash TV style) ─────────────────────────────────────────────
|
// ── Zone exit (Smash TV style) ─────────────────────────────────────────────
|
||||||
|
|
||||||
_startZoneExit() {
|
_startZoneExit() {
|
||||||
|
this.sound.play('sfx-edge-remove', { volume: 0.6 });
|
||||||
// Explode edge barriers first, then allow exit
|
// Explode edge barriers first, then allow exit
|
||||||
this.barrierManager.explodeEdgeBarriers(() => {
|
this.barrierManager.explodeEdgeBarriers(() => {
|
||||||
this._waitingForExit = true;
|
this._waitingForExit = true;
|
||||||
|
|
@ -230,6 +250,9 @@ export class GameScene extends Phaser.Scene {
|
||||||
drawRight(W - MARGIN, cy);
|
drawRight(W - MARGIN, cy);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this._arrowPing = this.sound.add('sfx-arrow-ping', { loop: true, volume: 0.4 });
|
||||||
|
this._arrowPing.play();
|
||||||
|
|
||||||
// Blink the arrows
|
// Blink the arrows
|
||||||
this._exitArrowsTween = this.tweens.add({
|
this._exitArrowsTween = this.tweens.add({
|
||||||
targets: g,
|
targets: g,
|
||||||
|
|
@ -262,6 +285,8 @@ export class GameScene extends Phaser.Scene {
|
||||||
this._exitArrowsTween?.stop();
|
this._exitArrowsTween?.stop();
|
||||||
this._exitArrowsGfx?.destroy();
|
this._exitArrowsGfx?.destroy();
|
||||||
this._exitText?.destroy();
|
this._exitText?.destroy();
|
||||||
|
this._arrowPing?.stop();
|
||||||
|
this._arrowPing = null;
|
||||||
this._exitArrowsGfx = null;
|
this._exitArrowsGfx = null;
|
||||||
this._exitText = null;
|
this._exitText = null;
|
||||||
}
|
}
|
||||||
|
|
@ -341,7 +366,8 @@ export class GameScene extends Phaser.Scene {
|
||||||
|
|
||||||
this.add.rectangle(W / 2, H / 2, W, H, 0x000000, 0.7).setDepth(30);
|
this.add.rectangle(W / 2, H / 2, W, H, 0x000000, 0.7).setDepth(30);
|
||||||
this.add.text(W / 2, H / 2 - 40, 'VICTORY!', {
|
this.add.text(W / 2, H / 2 - 40, 'VICTORY!', {
|
||||||
fontSize: '72px', fill: '#ffdd00', fontStyle: 'bold'
|
fontFamily: 'FutureImperfect',
|
||||||
|
fontSize: '72px', fill: '#ffdd00',
|
||||||
}).setOrigin(0.5).setDepth(31);
|
}).setOrigin(0.5).setDepth(31);
|
||||||
|
|
||||||
const prompt = this.add.text(W / 2, H / 2 + 60, 'Press R to return to menu', {
|
const prompt = this.add.text(W / 2, H / 2 + 60, 'Press R to return to menu', {
|
||||||
|
|
@ -364,6 +390,8 @@ export class GameScene extends Phaser.Scene {
|
||||||
this.player?.destroy();
|
this.player?.destroy();
|
||||||
this.waveManager?.reset();
|
this.waveManager?.reset();
|
||||||
this.hud?.destroy();
|
this.hud?.destroy();
|
||||||
|
this._bgMusic?.stop();
|
||||||
|
this._bgMusic = null;
|
||||||
this._enemyProjectiles = [];
|
this._enemyProjectiles = [];
|
||||||
this._pulseEffects = [];
|
this._pulseEffects = [];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ export class IntroScene extends Phaser.Scene {
|
||||||
this.add.rectangle(W / 2, H / 2, W, H, 0x000000);
|
this.add.rectangle(W / 2, H / 2, W, H, 0x000000);
|
||||||
|
|
||||||
this.add.text(W / 2, H / 2 - 100, 'OVERRUN', {
|
this.add.text(W / 2, H / 2 - 100, 'OVERRUN', {
|
||||||
|
fontFamily: 'FutureImperfect',
|
||||||
fontSize: '72px',
|
fontSize: '72px',
|
||||||
fill: '#00ccff',
|
fill: '#00ccff',
|
||||||
fontStyle: 'bold',
|
|
||||||
stroke: '#003366',
|
stroke: '#003366',
|
||||||
strokeThickness: 6,
|
strokeThickness: 6,
|
||||||
}).setOrigin(0.5);
|
}).setOrigin(0.5);
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ export class SkillTreeUI {
|
||||||
|
|
||||||
// Title
|
// Title
|
||||||
const title = this.scene.add.text(W / 2, H / 2 - 160, `LEVEL UP!`, {
|
const title = this.scene.add.text(W / 2, H / 2 - 160, `LEVEL UP!`, {
|
||||||
fontSize: '36px', fill: '#ffdd44', fontStyle: 'bold'
|
fontFamily: 'FutureImperfect',
|
||||||
|
fontSize: '36px', fill: '#ffdd44',
|
||||||
}).setOrigin(0.5).setDepth(21);
|
}).setOrigin(0.5).setDepth(21);
|
||||||
this._elements.push(title);
|
this._elements.push(title);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue