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 );
|
Arrays.fill( chars, null );
|
||||||
|
|
||||||
for (Actor actor : all) {
|
for (Actor actor : all) {
|
||||||
//if multiple things act at the same time, hero should go first.
|
//Order of actions when time is equal:
|
||||||
if (actor.time < now || (actor instanceof Hero && actor.time == now)) {
|
//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;
|
now = actor.time;
|
||||||
current = actor;
|
current = actor;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user