2013-09-13 16:48:47 +00:00
|
|
|
<?php
|
|
|
|
$title = "Test Title";
|
|
|
|
require('../head.php');
|
|
|
|
?>
|
2013-09-12 14:39:52 +00:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
2013-10-07 20:32:34 +00:00
|
|
|
|
2013-09-12 14:39:52 +00:00
|
|
|
|
2013-09-13 16:48:47 +00:00
|
|
|
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });
|
2013-09-12 14:39:52 +00:00
|
|
|
|
|
|
|
function preload() {
|
|
|
|
|
|
|
|
game.load.tilemap('nes', 'assets/maps/mario1.png', 'assets/maps/mario1.json', null, Phaser.Tilemap.JSON);
|
|
|
|
game.load.tilemap('snes', 'assets/maps/smb_tiles.png', 'assets/maps/smb_level1.json', null, Phaser.Tilemap.JSON);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function create() {
|
|
|
|
|
|
|
|
game.stage.backgroundColor = '#5c94fc';
|
|
|
|
|
|
|
|
game.add.tilemap(0, 0, 'nes');
|
|
|
|
game.add.tilemap(0, 168, 'snes');
|
|
|
|
|
|
|
|
game.add.tween(game.camera).to( { x: 5120-800 }, 30000, Phaser.Easing.Linear.None, true, 0, 1000, true);
|
|
|
|
|
|
|
|
game.input.onDown.add(goFull, this);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function goFull() {
|
|
|
|
game.stage.scale.startFullScreen();
|
|
|
|
}
|
|
|
|
|
2013-10-07 20:32:34 +00:00
|
|
|
|
2013-09-12 14:39:52 +00:00
|
|
|
</script>
|
|
|
|
|
2013-09-13 16:48:47 +00:00
|
|
|
<?php
|
|
|
|
require('../foot.php');
|
|
|
|
?>
|