phaser/resources/tutorials/Spanish/02 Creando tu primer juego/part3.html

41 lines
840 B
HTML
Raw Normal View History

2013-12-10 15:49:01 +00:00
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
2013-12-10 16:31:19 +00:00
<title>Phaser - Creando tu primer juego, parte 3</title>
2013-12-10 15:49:01 +00:00
<script type="text/javascript" src="js/phaser.min.js"></script>
<style type="text/css">
body {
margin: 0;
}
</style>
</head>
<body>
<script type="text/javascript">
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });
function preload() {
game.load.image('sky', 'assets/sky.png');
game.load.image('ground', 'assets/platform.png');
game.load.image('star', 'assets/star.png');
game.load.spritesheet('dude', 'assets/dude.png', 32, 48);
}
function create() {
2013-12-10 16:31:19 +00:00
//añadimos un sprite estrella en las coordenadas 0,0
2013-12-10 15:49:01 +00:00
game.add.sprite(0, 0, 'star');
}
function update() {
}
</script>
</body>
</html>