v1.0.1: fixed some characters occupying cells before they were placed
This commit is contained in:
parent
8b9821d78f
commit
b8fa887384
|
@ -103,9 +103,9 @@ public class DemonSpawner extends Mob {
|
||||||
spawn.pos = Random.element( candidates );
|
spawn.pos = Random.element( candidates );
|
||||||
spawn.state = spawn.HUNTING;
|
spawn.state = spawn.HUNTING;
|
||||||
|
|
||||||
|
GameScene.add( spawn, 1 );
|
||||||
Dungeon.level.occupyCell(spawn);
|
Dungeon.level.occupyCell(spawn);
|
||||||
|
|
||||||
GameScene.add( spawn, 1 );
|
|
||||||
if (sprite.visible) {
|
if (sprite.visible) {
|
||||||
Actor.addDelayed(new Pushing(spawn, pos, spawn.pos), -1);
|
Actor.addDelayed(new Pushing(spawn, pos, spawn.pos), -1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,9 +123,9 @@ public class Ghoul extends Mob {
|
||||||
|
|
||||||
child.pos = Random.element( candidates );
|
child.pos = Random.element( candidates );
|
||||||
|
|
||||||
|
GameScene.add( child );
|
||||||
Dungeon.level.occupyCell(child);
|
Dungeon.level.occupyCell(child);
|
||||||
|
|
||||||
GameScene.add( child );
|
|
||||||
if (sprite.visible) {
|
if (sprite.visible) {
|
||||||
Actor.addDelayed( new Pushing( child, pos, child.pos ), -1 );
|
Actor.addDelayed( new Pushing( child, pos, child.pos ), -1 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,11 +101,11 @@ public class Swarm extends Mob {
|
||||||
clone.pos = Random.element( candidates );
|
clone.pos = Random.element( candidates );
|
||||||
clone.state = clone.HUNTING;
|
clone.state = clone.HUNTING;
|
||||||
|
|
||||||
Dungeon.level.occupyCell(clone);
|
|
||||||
|
|
||||||
GameScene.add( clone, SPLIT_DELAY );
|
GameScene.add( clone, SPLIT_DELAY );
|
||||||
Actor.addDelayed( new Pushing( clone, pos, clone.pos ), -1 );
|
Actor.addDelayed( new Pushing( clone, pos, clone.pos ), -1 );
|
||||||
|
|
||||||
|
Dungeon.level.occupyCell(clone);
|
||||||
|
|
||||||
HP -= clone.HP;
|
HP -= clone.HP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,8 +106,8 @@ public class Wraith extends Mob {
|
||||||
w.adjustStats( Dungeon.depth );
|
w.adjustStats( Dungeon.depth );
|
||||||
w.pos = pos;
|
w.pos = pos;
|
||||||
w.state = w.HUNTING;
|
w.state = w.HUNTING;
|
||||||
Dungeon.level.occupyCell(w);
|
|
||||||
GameScene.add( w, SPAWN_DELAY );
|
GameScene.add( w, SPAWN_DELAY );
|
||||||
|
Dungeon.level.occupyCell(w);
|
||||||
|
|
||||||
w.sprite.alpha( 0 );
|
w.sprite.alpha( 0 );
|
||||||
w.sprite.parent.add( new AlphaTweener( w.sprite, 1, 0.5f ) );
|
w.sprite.parent.add( new AlphaTweener( w.sprite, 1, 0.5f ) );
|
||||||
|
|
|
@ -53,8 +53,8 @@ public class WoollyBomb extends Bomb {
|
||||||
Sheep sheep = new Sheep();
|
Sheep sheep = new Sheep();
|
||||||
sheep.lifespan = Random.NormalIntRange( 12, 16 );
|
sheep.lifespan = Random.NormalIntRange( 12, 16 );
|
||||||
sheep.pos = i;
|
sheep.pos = i;
|
||||||
Dungeon.level.occupyCell(sheep);
|
|
||||||
GameScene.add(sheep);
|
GameScene.add(sheep);
|
||||||
|
Dungeon.level.occupyCell(sheep);
|
||||||
CellEmitter.get(i).burst(Speck.factory(Speck.WOOL), 4);
|
CellEmitter.get(i).burst(Speck.factory(Speck.WOOL), 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,8 +55,8 @@ public class StoneOfFlock extends Runestone {
|
||||||
Sheep sheep = new Sheep();
|
Sheep sheep = new Sheep();
|
||||||
sheep.lifespan = Random.NormalIntRange( 6, 8 );
|
sheep.lifespan = Random.NormalIntRange( 6, 8 );
|
||||||
sheep.pos = i;
|
sheep.pos = i;
|
||||||
Dungeon.level.occupyCell(sheep);
|
|
||||||
GameScene.add(sheep);
|
GameScene.add(sheep);
|
||||||
|
Dungeon.level.occupyCell(sheep);
|
||||||
CellEmitter.get(i).burst(Speck.factory(Speck.WOOL), 4);
|
CellEmitter.get(i).burst(Speck.factory(Speck.WOOL), 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user