forked from cambridgecoding/flappybird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflappy.js
32 lines (26 loc) · 766 Bytes
/
flappy.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
32
// the Game object used by the phaser.io library
var stateActions = { preload: preload, create: create, update: update };
// Phaser parameters:
// - game width
// - game height
// - renderer (go for Phaser.AUTO)
// - element where the game will be drawn ('game')
// - actions on the game state (or null for nothing)
var game = new Phaser.Game(790, 400, Phaser.AUTO, 'game', stateActions);
/*
* Loads all resources for the game and gives them names.
*/
function preload() {
}
/*
* Initialises the game. This function is only called once.
*/
function create() {
// set the background colour of the scene
game.stage.setBackgroundColor('#048C91');
}
/*
* This function updates the scene. It is called for every new frame.
*/
function update() {
}