-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
31 lines (29 loc) · 786 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { WorldOneLevelOne } from './scenes/WorldOneLevelOne.js';
import { MainMenu } from './scenes/MainMenu.js';
import { Preload } from './scenes/Preload.js';
import { NextLevel } from './scenes/NextLevel.js';
import { GameStartCutscene } from './scenes/GameStartCutscene.js';
var gameSettings = {
playerSpeed: 0.25,
}
var config = {
width: window.innerWidth,
height: window.innerHeight,
backgroundColor: 0x000000,
scene: [Preload, MainMenu, GameStartCutscene, WorldOneLevelOne, NextLevel],
pixelArt: true,
physics: {
default: "arcade",
arcade:{
debug: true,
gravity: { y: 500}
},
}
}
var game = new Phaser.Game(config);
let platforms;
let StartGame;
let player;
let cursors;
let playerx;
let playery;