forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathState.js
More file actions
73 lines (61 loc) · 1.66 KB
/
Copy pathState.js
File metadata and controls
73 lines (61 loc) · 1.66 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* State
*
* This is a base State class which can be extended if you are creating your game with TypeScript.
* It provides quick access to common functions such as the camera, cache, input, match, sound and more.
*
* @package Phaser.State
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2013 Photon Storm Ltd.
* @license https://github.com/photonstorm/phaser/blob/master/license.txt MIT License
*/
Phaser.State = function () {
};
Phaser.State.prototype = {
link: function (game) {
this.game = game;
// this.add = game.add;
// this.camera = game.camera;
this.cache = game.cache;
// this.input = game.input;
this.load = game.load;
this.math = game.math;
// this.sound = game.sound;
// this.stage = game.stage;
this.time = game.time;
this.tweens = game.tweens;
// this.world = game.world;
},
/**
* Override this method to add some load operations.
* If you need to use the loader, you may need to use them here.
*/
preload: function () {
},
/**
* This method is called after the game engine successfully switches states.
* Feel free to add any setup code here.(Do not load anything here, override init() instead)
*/
create: function () {
},
/**
* Put update logic here.
*/
update: function () {
},
/**
* Put render operations here.
*/
render: function () {
},
/**
* This method will be called when game paused.
*/
paused: function () {
},
/**
* This method will be called when the state is destroyed
*/
destroy: function () {
}
};