mirror of
https://github.com/wassname/phaser.git
synced 2026-09-09 11:28:47 +08:00
Book files
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Creating a game in Phaser, part 1</title>
|
||||
<script src="phaser.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="gameContainer"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
window.onload = function() {
|
||||
|
||||
var game = new Phaser.Game(1024, 768, Phaser.AUTO, 'gameContainer', { preload: preload, create: create });
|
||||
|
||||
function preload () {
|
||||
|
||||
game.load.image('background', 'images/picture.png');
|
||||
|
||||
}
|
||||
|
||||
function create () {
|
||||
|
||||
game.add.sprite(0, 0, 'background');
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user