mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
62 lines
No EOL
1.2 KiB
HTML
62 lines
No EOL
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="initial-scale=1 maximum-scale=1 user-scalable=0" />
|
|
<title>Phaser Mobile Fullscreen Test</title>
|
|
<style>
|
|
body {
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
</style>
|
|
<script src="../phaser.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="game"></div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var myGame = new Phaser.Game(this, 'game', 320, 200, init, create, update);
|
|
|
|
function init() {
|
|
|
|
myGame.loader.addImageFile('backdrop1', '../assets/pics/atari_fujilogo.png');
|
|
myGame.loader.addImageFile('backdrop2', '../assets/pics/acryl_bladerunner.png');
|
|
|
|
myGame.loader.load();
|
|
|
|
}
|
|
|
|
var pic1;
|
|
var pic2;
|
|
|
|
function create() {
|
|
|
|
console.log('create ttt');
|
|
|
|
pic1 = myGame.add.sprite(0, 0, 'backdrop1');
|
|
//pic2 = myGame.add.sprite(0, 0, 'backdrop2');
|
|
|
|
}
|
|
|
|
function update() {
|
|
|
|
// if (myGame.stage.fullscreen.isLandscape == true)
|
|
// {
|
|
// pic1.visible = true;
|
|
// pic2.visible = false;
|
|
// }
|
|
// else
|
|
// {
|
|
// pic2.visible = true;
|
|
// pic1.visible = false;
|
|
// }
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html> |