forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflow4.php
More file actions
49 lines (33 loc) · 939 Bytes
/
Copy pathflow4.php
File metadata and controls
49 lines (33 loc) · 939 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE HTML>
<html>
<head>
<title>phaser.js - a new beginning</title>
<?php
require('js.php');
?>
</head>
<body>
<script type="text/javascript">
var MegaGame = {};
MegaGame.MainMenu = function (game) {
// A reference to the local game will always be passed to your state when created
// You should store it somewhere handy for use in your functions, like this ...
this.game = game;
};
MegaGame.MainMenu.prototype = {
preload: function () {
console.log('MainMenu.preload');
this.game.load.image('bladerunner', 'assets/pics/acryl_bladerunner.png');
},
create: function () {
console.log('MainMenu.create');
document.body.appendChild(this.game.cache.getImage('bladerunner'));
}
};
(function () {
// Finally in this example we pass in a custom State object which will be created upon boot
var game = new Phaser.Game(800, 600, Phaser.RENDERER_AUTO, '', MegaGame.MainMenu);
})();
</script>
</body>
</html>