2013-11-29 18:28:55 +00:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<title>hello phaser!</title>
|
2015-02-10 13:32:03 +00:00
|
|
|
<script src="//cdn.jsdelivr.net/phaser/2.2.2/phaser.min.js"></script>
|
2013-11-29 18:28:55 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
window.onload = function() {
|
|
|
|
|
|
|
|
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });
|
|
|
|
|
|
|
|
function preload () {
|
|
|
|
|
|
|
|
game.load.image('logo', 'phaser.png');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function create () {
|
|
|
|
|
|
|
|
var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo');
|
|
|
|
logo.anchor.setTo(0.5, 0.5);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|