Files
novafarma/old_logic/src_backup_1768938138/scenes/SplashScene.js
2026-01-21 01:08:21 +01:00

147 lines
4.1 KiB
JavaScript

/**
* SplashScene.js
*
* Hipodevil666 Studios™ Splash Screen
* First screen players see when launching the game
*
* Features:
* - Studio branding
* - Fade in/out animation
* - Auto-transition to main menu (3 seconds)
* - Style 32 (Neon Noir) aesthetic
*
* Created: Jan 10, 2026
* Author: David "HIPO" Kotnik
* Studio: Hipodevil666 Studios™
*/
export default class SplashScene extends Phaser.Scene {
constructor() {
super({ key: 'SplashScene' });
}
preload() {
// Preload splash screen assets (if any)
// For now, using text-based splash
}
create() {
const { width, height } = this.cameras.main;
// Dark background (Neon Noir style)
this.cameras.main.setBackgroundColor('#0a0a0f');
// Studio logo text
const studioText = this.add.text(
width / 2,
height / 2 - 40,
'Hipodevil666 Studios™',
{
fontFamily: 'Arial, sans-serif',
fontSize: '48px',
fontStyle: 'bold',
color: '#ff00ff', // Neon magenta
stroke: '#000000',
strokeThickness: 4,
shadow: {
offsetX: 0,
offsetY: 0,
color: '#ff00ff',
blur: 20,
fill: true
}
}
).setOrigin(0.5);
// "Presents" text
const presentsText = this.add.text(
width / 2,
height / 2 + 40,
'Presents',
{
fontFamily: 'Arial, sans-serif',
fontSize: '24px',
fontStyle: 'italic',
color: '#00ffff', // Neon cyan
stroke: '#000000',
strokeThickness: 2,
shadow: {
offsetX: 0,
offsetY: 0,
color: '#00ffff',
blur: 15,
fill: true
}
}
).setOrigin(0.5);
// Decorative elements (Neon Noir style)
const topLine = this.add.graphics();
topLine.lineStyle(2, 0xff00ff, 1);
topLine.lineBetween(width / 2 - 300, height / 2 - 80, width / 2 + 300, height / 2 - 80);
topLine.setAlpha(0);
const bottomLine = this.add.graphics();
bottomLine.lineStyle(2, 0x00ffff, 1);
bottomLine.lineBetween(width / 2 - 300, height / 2 + 80, width / 2 + 300, height / 2 + 80);
bottomLine.setAlpha(0);
// Set initial alpha to 0 for fade-in
studioText.setAlpha(0);
presentsText.setAlpha(0);
// FADE IN animation (0.8s)
this.tweens.add({
targets: [studioText, topLine],
alpha: 1,
duration: 800,
ease: 'Power2'
});
this.tweens.add({
targets: [presentsText, bottomLine],
alpha: 1,
duration: 800,
delay: 400,
ease: 'Power2'
});
// Pulsing glow effect
this.tweens.add({
targets: studioText,
scaleX: 1.02,
scaleY: 1.02,
duration: 1500,
yoyo: true,
repeat: -1,
ease: 'Sine.easeInOut'
});
// FADE OUT and transition (after 3 seconds total)
this.time.delayedCall(2200, () => {
this.tweens.add({
targets: [studioText, presentsText, topLine, bottomLine],
alpha: 0,
duration: 800,
ease: 'Power2',
onComplete: () => {
// Transition to main menu (or BootScene if needed)
this.scene.start('BootScene');
}
});
});
// Skip on click/tap (accessibility)
this.input.on('pointerdown', () => {
this.scene.start('BootScene');
});
// Skip on any key press (accessibility)
this.input.keyboard.once('keydown', () => {
this.scene.start('BootScene');
});
console.log('🎮 Hipodevil666 Studios™ Splash Screen loaded!');
}
}