mirror of
https://github.com/photonstorm/phaser
synced 2024-11-30 08:31:01 +00:00
31 lines
No EOL
469 B
PHP
31 lines
No EOL
469 B
PHP
<?php
|
|
$title = "Display a Sprite";
|
|
require('../head.php');
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function () {
|
|
|
|
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });
|
|
|
|
function preload() {
|
|
game.load.image('mushroom', 'assets/sprites/mushroom2.png');
|
|
}
|
|
|
|
function create() {
|
|
|
|
var test = game.add.sprite(200, 200, 'mushroom');
|
|
|
|
}
|
|
|
|
function update() {
|
|
}
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
<?php
|
|
require('../foot.php');
|
|
?>
|