Add: AlienGroup

This commit is contained in:
2018-05-12 06:26:15 +09:00
parent bca20b33c1
commit 5e88d510f9
2 changed files with 13 additions and 7 deletions
+4 -4
View File
@@ -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;