mirror of
https://github.com/wassname/phaser.git
synced 2026-10-01 12:21:02 +08:00
Preparing new tests
This commit is contained in:
1 parent
3c0c349089
commit
09f57fa346
237 files changed
+13385
-34447
No files matched your search
@@ -1,62 +0,0 @@
|
||||
<!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 Game(this, 'game', 320, 200, init, create, update);
|
||||
|
||||
function init() {
|
||||
|
||||
myGame.stage.fullscreen.go();
|
||||
|
||||
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() {
|
||||
|
||||
pic1 = myGame.createSprite(0, 0, 'backdrop1');
|
||||
pic2 = myGame.createSprite(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>
|
||||
Reference in new issue
Block a user