mirror of
https://github.com/wassname/phaser.git
synced 2026-07-28 11:23:50 +08:00
Tidying up source code for release. Also refactored World to use a Group instance, rather tha duplicate functions.
This commit is contained in:
@@ -31,6 +31,10 @@
|
||||
|
||||
game.stage.backgroundColor = '#e3ed49';
|
||||
|
||||
// Testing iOS7 lack of fullscreen. Damnit.
|
||||
document.documentElement['style'].minHeight = '2000px';
|
||||
window.scrollTo(0, document.body.scrollHeight);
|
||||
|
||||
game.input.onDown.add(gofull, this);
|
||||
|
||||
}
|
||||
@@ -40,6 +44,13 @@
|
||||
}
|
||||
|
||||
function update() {
|
||||
|
||||
if (document.getElementsByTagName('body')[0].scrollTop > 1000)
|
||||
{
|
||||
game.stage.backgroundColor = '#87ff55';
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function render() {
|
||||
|
||||
+4
-4
@@ -38,8 +38,8 @@
|
||||
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
var x = (i * 64);
|
||||
s = g.create(x, 0, 'diamond');
|
||||
var x = 50 + (i * 64);
|
||||
s = g.create(x, 100, 'diamond');
|
||||
s.name = 'd' + i;
|
||||
s.anchor.setTo(0.5, 0.5);
|
||||
}
|
||||
@@ -68,8 +68,8 @@
|
||||
|
||||
function update() {
|
||||
|
||||
// g.addAll('angle', 10);
|
||||
g.angle++;
|
||||
g.addAll('angle', 10);
|
||||
// g.angle++;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
function create() {
|
||||
|
||||
game.stage.backgroundColor = '#182d3b';
|
||||
game.input.touch.preventDefault = false;
|
||||
|
||||
music = game.add.audio('boden');
|
||||
music.play();
|
||||
|
||||
Reference in New Issue
Block a user