Add: AlienGroup
This commit is contained in:
@@ -83,10 +83,10 @@ class Alien extends Phaser.Sprite {
|
||||
|
||||
goOnstage() {
|
||||
// set random position
|
||||
const SPAWN_BOX_LEFT = 50;
|
||||
const SPAWN_BOX_WIDTH = game.world.width - 100;
|
||||
const SPAWN_BOX_TOP = 250;
|
||||
const SPAWN_BOX_HEIGHT = game.world.height - 340;
|
||||
const SPAWN_BOX_LEFT = 80;
|
||||
const SPAWN_BOX_WIDTH = game.world.width - 160;
|
||||
const SPAWN_BOX_TOP = 280;
|
||||
const SPAWN_BOX_HEIGHT = game.world.height - 400;
|
||||
|
||||
this.x = SPAWN_BOX_LEFT + Math.random() * SPAWN_BOX_WIDTH;
|
||||
this.y = SPAWN_BOX_TOP + Math.random() * SPAWN_BOX_HEIGHT;
|
||||
|
||||
Reference in New Issue
Block a user