V0.2.1 : Clarified actor order of behaviour

This commit is contained in:
Evan Debenham 2014-10-02 00:31:25 -04:00
parent d0227aebc8
commit 13cf972982

View File

@ -150,8 +150,12 @@ public abstract class Actor implements Bundlable {
Arrays.fill( chars, null );
for (Actor actor : all) {
//if multiple things act at the same time, hero should go first.
if (actor.time < now || (actor instanceof Hero && actor.time == now)) {
//Order of actions when time is equal:
//1. Hero
//2. Other Chars
//3. Other Actors (e.g. blobs)
if (actor.time < now || (actor instanceof Hero && actor.time == now)
|| (actor instanceof Char && actor.time == now && !(current instanceof Hero))) {
now = actor.time;
current = actor;
}