mirror of
https://github.com/wassname/phaser.git
synced 2026-08-12 12:20:38 +08:00
Updated every test to use the new GameObjectFactory syntax
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
function create() {
|
||||
myGame.world.setSize(2000, 2000);
|
||||
for(var i = 0; i < 1000; i++) {
|
||||
myGame.createSprite(myGame.world.randomX, myGame.world.randomY, 'melon');
|
||||
myGame.add.sprite(myGame.world.randomX, myGame.world.randomY, 'melon');
|
||||
}
|
||||
}
|
||||
function update() {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
for (var i = 0; i < 1000; i++)
|
||||
{
|
||||
myGame.createSprite(myGame.world.randomX, myGame.world.randomY, 'melon');
|
||||
myGame.add.sprite(myGame.world.randomX, myGame.world.randomY, 'melon');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
}
|
||||
var balls;
|
||||
function create() {
|
||||
balls = myGame.createGroup();
|
||||
balls = myGame.add.group();
|
||||
myGame.input.onTap.add(tapped, this);
|
||||
}
|
||||
function tapped(pointer, doubleTap) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
function create() {
|
||||
|
||||
balls = myGame.createGroup();
|
||||
balls = myGame.add.group();
|
||||
|
||||
myGame.input.onTap.add(tapped, this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user