V0.2.1 : Clarified actor order of behaviour
This commit is contained in:
parent
d0227aebc8
commit
13cf972982
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user