v0.4.1: fixed some visual bugs involving guards chains

This commit is contained in:
Evan Debenham 2016-07-20 19:24:29 -04:00 committed by Evan Debenham
parent 43f3582e1e
commit 454c82d758

View File

@ -108,14 +108,17 @@ public class Guard extends Mob {
yell( Messages.get(this, "scorpion") ); yell( Messages.get(this, "scorpion") );
sprite.parent.add(new Chains(pos, enemy.pos, new Callback() { sprite.parent.add(new Chains(pos, enemy.pos, new Callback() {
public void call() { public void call() {
Actor.addDelayed(new Pushing(enemy, enemy.pos, newPosFinal), -1); Actor.addDelayed(new Pushing(enemy, enemy.pos, newPosFinal, new Callback(){
enemy.pos = newPosFinal; public void call() {
Dungeon.level.press(newPosFinal, enemy); enemy.pos = newPosFinal;
Cripple.prolong(enemy, Cripple.class, 4f); Dungeon.level.press(newPosFinal, enemy);
if (enemy == Dungeon.hero) { Cripple.prolong(enemy, Cripple.class, 4f);
Dungeon.hero.interrupt(); if (enemy == Dungeon.hero) {
Dungeon.observe(); Dungeon.hero.interrupt();
} Dungeon.observe();
}
}
}), -1);
next(); next();
} }
})); }));