Initial commit: Naddie Jump — Monad Edition
This commit is contained in:
31
src/main.js
Normal file
31
src/main.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Game, AUTO } from 'phaser';
|
||||
import { BootScene } from './scenes/BootScene.js';
|
||||
import { MenuScene } from './scenes/MenuScene.js';
|
||||
import { GameScene } from './scenes/GameScene.js';
|
||||
import { GameOverScene } from './scenes/GameOverScene.js';
|
||||
import { GAME_WIDTH, GAME_HEIGHT } from './config/game.config.js';
|
||||
|
||||
const config = {
|
||||
type: AUTO,
|
||||
parent: 'game-container',
|
||||
width: GAME_WIDTH,
|
||||
height: GAME_HEIGHT,
|
||||
backgroundColor: '#0d001a',
|
||||
scale: {
|
||||
mode: Phaser.Scale.FIT,
|
||||
autoCenter: Phaser.Scale.CENTER_BOTH,
|
||||
},
|
||||
physics: {
|
||||
default: 'arcade',
|
||||
arcade: {
|
||||
gravity: { y: 1200 },
|
||||
debug: false,
|
||||
tileBias: 64,
|
||||
},
|
||||
},
|
||||
scene: [BootScene, MenuScene, GameScene, GameOverScene],
|
||||
pixelArt: false,
|
||||
antialias: true,
|
||||
};
|
||||
|
||||
window.game = new Game(config);
|
||||
Reference in New Issue
Block a user