mirror of
https://github.com/photonstorm/phaser
synced 2024-12-04 02:20:23 +00:00
39 lines
No EOL
824 B
PHP
39 lines
No EOL
824 B
PHP
<?php
|
|
$title = "Test Title";
|
|
require('../head.php');
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
(function () {
|
|
|
|
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });
|
|
|
|
function preload() {
|
|
|
|
game.load.image('grid', 'assets/tests/debug-grid-1920x1920.png');
|
|
game.load.image('atari', 'assets/sprites/atari800xl.png');
|
|
|
|
}
|
|
|
|
function create() {
|
|
|
|
game.add.sprite(0, 0, 'grid');
|
|
|
|
atari1 = game.add.sprite(300, 300, 'atari');
|
|
|
|
// Input Enable the sprites
|
|
atari1.inputEnabled = true;
|
|
|
|
// Allow dragging
|
|
// enableDrag parameters = (lockCenter, bringToTop, pixelPerfect, alphaThreshold, boundsRect, boundsSprite)
|
|
atari1.input.enableDrag(true);
|
|
|
|
}
|
|
|
|
})();
|
|
</script>
|
|
|
|
<?php
|
|
require('../foot.php');
|
|
?>
|