diff --git a/assets/video/god-ahead-01.mp4 b/assets/video/god-ahead-01.mp4 new file mode 100644 index 0000000..8df35e7 Binary files /dev/null and b/assets/video/god-ahead-01.mp4 differ diff --git a/assets/video/god-idle-01.mp4 b/assets/video/god-idle-01.mp4 new file mode 100644 index 0000000..d53881f Binary files /dev/null and b/assets/video/god-idle-01.mp4 differ diff --git a/assets/video/god-sin-enters-01.mp4 b/assets/video/god-sin-enters-01.mp4 new file mode 100644 index 0000000..594f438 Binary files /dev/null and b/assets/video/god-sin-enters-01.mp4 differ diff --git a/assets/video/god-sin-exits-01.mp4 b/assets/video/god-sin-exits-01.mp4 new file mode 100644 index 0000000..50f638b Binary files /dev/null and b/assets/video/god-sin-exits-01.mp4 differ diff --git a/assets/video/sin-idle-02.mp4 b/assets/video/sin-idle-02.mp4 new file mode 100644 index 0000000..ea43b35 Binary files /dev/null and b/assets/video/sin-idle-02.mp4 differ diff --git a/assets/video/sin-victory-01.mp4 b/assets/video/sin-victory-01.mp4 new file mode 100644 index 0000000..99ac42a Binary files /dev/null and b/assets/video/sin-victory-01.mp4 differ diff --git a/assets/video/sin-winning-01.mp4 b/assets/video/sin-winning-01.mp4 new file mode 100644 index 0000000..377b839 Binary files /dev/null and b/assets/video/sin-winning-01.mp4 differ diff --git a/assets/video/sin-winning-02.mp4 b/assets/video/sin-winning-02.mp4 new file mode 100644 index 0000000..848abfe Binary files /dev/null and b/assets/video/sin-winning-02.mp4 differ diff --git a/assets/video/sin-winning-03.mp4 b/assets/video/sin-winning-03.mp4 new file mode 100644 index 0000000..02e75b1 Binary files /dev/null and b/assets/video/sin-winning-03.mp4 differ diff --git a/scenes/BootScene.js b/scenes/BootScene.js index 79b0be1..8e529f1 100644 --- a/scenes/BootScene.js +++ b/scenes/BootScene.js @@ -6,6 +6,9 @@ export default class BootScene extends Phaser.Scene { preload() { this.load.spritesheet('symbols', 'assets/symbol_sprites.png', { frameWidth: 200, frameHeight: 100 }); this.load.image('bg-gates', 'assets/gates.png'); + this.load.video('god-idle-01', 'assets/video/god-idle-01.mp4', true); + this.load.video('god-sin-enters-01', 'assets/video/god-sin-enters-01.mp4', true); + this.load.video('sin-idle-02', 'assets/video/sin-idle-02.mp4', true); } create() { diff --git a/scenes/GameScene.js b/scenes/GameScene.js index 3b465b6..058d09d 100644 --- a/scenes/GameScene.js +++ b/scenes/GameScene.js @@ -13,6 +13,26 @@ export default class GameScene extends Phaser.Scene { // Background image — stretched to fill the canvas this.add.image(800, 450, 'bg-gates').setDisplaySize(1600, 900); + // ── Left section: Character video panel ────────────────────────────────── + // Centered at x=160 (within the 360px left of the slot machine), y=490 + // (below the title gradient which ends at y=230). Size: 300x480. + this._vidX = 160; + this._vidY = 490; + const vidX = this._vidX; + const vidY = this._vidY; + const vidW = 300; + const vidH = 480; + this._characterState = 'god-idle'; + + const vidFrame = this.add.graphics(); + vidFrame.fillStyle(0x0c0620, 0.65); + vidFrame.fillRoundedRect(vidX - vidW / 2 - 8, vidY - vidH / 2 - 8, vidW + 16, vidH + 16, 14); + vidFrame.lineStyle(1, 0xffd700, 0.3); + vidFrame.strokeRoundedRect(vidX - vidW / 2 - 8, vidY - vidH / 2 - 8, vidW + 16, vidH + 16, 14); + + this.characterVideo = this.add.video(vidX, vidY, 'god-idle-01'); + this.characterVideo.play(true); + // Gradient backdrop behind title — opaque on left, fades to transparent const titleBg = this.add.graphics(); titleBg.fillGradientStyle(0x000000, 0x000000, 0x000000, 0x000000, 0.62, 0, 0.62, 0); @@ -112,6 +132,7 @@ export default class GameScene extends Phaser.Scene { GameState.lordFunds += lordGain; this.game.events.emit('funds-updated'); this.lordVial.animateUpdate(GameState.lordFunds, lordBox.x, 115, () => { + this._checkCharacterState(); GameState.spinning = false; this.game.events.emit('spin-complete'); }); @@ -132,6 +153,7 @@ export default class GameScene extends Phaser.Scene { GameState.sinTotal += GameState.spinCost; this.game.events.emit('funds-updated'); this.sinVial.animateUpdate(GameState.sinTotal, sinBox.x, 115, () => { + this._checkCharacterState(); GameState.spinning = false; this.game.events.emit('spin-complete'); }); @@ -139,4 +161,22 @@ export default class GameScene extends Phaser.Scene { ); } } + + _checkCharacterState() { + if (this._characterState !== 'god-idle') return; + if (GameState.sinTotal < GameState.lordFunds + 200) return; + + this._characterState = 'sin-entering'; + this.characterVideo.stop(); + this.characterVideo.destroy(); + + this.characterVideo = this.add.video(this._vidX, this._vidY, 'god-sin-enters-01'); + this.characterVideo.play(false); + this.characterVideo.once('complete', () => { + this._characterState = 'sin-idle'; + this.characterVideo.destroy(); + this.characterVideo = this.add.video(this._vidX, this._vidY, 'sin-idle-02'); + this.characterVideo.play(true); + }); + } }