State swap example done and working.

This commit is contained in:
Richard Davey
2013-09-13 05:44:04 +01:00
parent fd0a071cb3
commit 7c6e6df91a
13 changed files with 282 additions and 11 deletions
+30
View File
@@ -0,0 +1,30 @@
<!DOCTYPE HTML>
<html>
<head>
<title>phaser.js - a new beginning</title>
<?php
require('js.php');
?>
<script src="Preloader.js"></script>
<script src="MainMenu.js"></script>
<script src="Game.js"></script>
</head>
<body>
<script type="text/javascript">
(function () {
// No parameters given, which means no default state is created or started
var game = new Phaser.Game(800, 600, Phaser.AUTO);
game.state.add('preloader', TestGame.Preloader, true);
game.state.add('mainmenu', TestGame.MainMenu);
game.state.add('game', TestGame.Game);
})();
</script>
</body>
</html>