mirror of
https://github.com/photonstorm/phaser
synced 2024-12-24 12:03:36 +00:00
34 lines
No EOL
686 B
HTML
34 lines
No EOL
686 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>hello phaser!</title>
|
|
<script src="//cdn.jsdelivr.net/phaser/2.2.2/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> |