v0.3.0e: refactored the new findChars() function and re-added a collection of chars to Actor. Better readability and (trivially) better performance.
This commit is contained in:
committed by
Evan Debenham
parent
c55e38a86a
commit
2aee4fe3c6
@@ -170,10 +170,8 @@ public class King extends Mob {
|
||||
Sample.INSTANCE.play( Assets.SND_CHALLENGE );
|
||||
|
||||
boolean[] passable = Level.passable.clone();
|
||||
for (Actor actor : Actor.all()) {
|
||||
if (actor instanceof Char) {
|
||||
passable[((Char)actor).pos] = false;
|
||||
}
|
||||
for (Char c : Actor.chars()) {
|
||||
passable[c.pos] = false;
|
||||
}
|
||||
|
||||
int undeadsToSummon = maxArmySize() - Undead.count;
|
||||
|
||||
Reference in New Issue
Block a user