mirror of
https://github.com/photonstorm/phaser
synced 2024-12-14 07:13:00 +00:00
34 lines
No EOL
654 B
HTML
34 lines
No EOL
654 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>hello phaser!</title>
|
|
<script src="phaser.min.js"></script>
|
|
</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> |