-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.js
More file actions
32 lines (25 loc) · 702 Bytes
/
main.js
File metadata and controls
32 lines (25 loc) · 702 Bytes
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
32
var game = new Phaser.Game(240, 160, Phaser.CANVAS, 'metroid', { preload: preload, create: create, update: update, render: render }, false, false),
g = game,
samus = new Samus(game),
map = new Map(game);
g.s = samus;
g.m = map;
function preload() {
map.preload();
samus.preload();
}
function create() {
game.physics.startSystem(Phaser.Physics.ARCADE);
game.stage.backgroundColor = '#000000';
samus.create();
map.create();
}
function update() {
map.update();
samus.update();
}
function render () {
samus.render();
// game.debug.text(game.time.physicsElapsed, 32, 32);
// game.debug.bodyInfo(player, 16, 24);
}