playMaker

Author Topic: Help clarify internal differences PlaymakerFSM.BroadcastEvent() vs Fsm.Event()  (Read 1895 times)

Andy22

  • Junior Playmaker
  • **
  • Posts: 99
Hi,

i just noticed some small logic is missing if "PlaymakerFSM.BroadcastEvent" is used vs the "Fsm.Event()" logic with "EventTarget.BroadcastAll".

At the end inside Fsm.Event() this code is run:
Code: [Select]
      if (FsmExecutionStack.ExecutingFsm == this)
        return;

      FsmExecutionStack.PushFsm(this);
      this.UpdateStateChanges();
      FsmExecutionStack.PopFsm();

In comparison "PlaymakerFSM.BroadcastEvent" does not have this "UpdateStateChanges" related code-block.

Since i try to add a more script+data+timer friendly Fsm.Event() call, i wonder what this code does and if its needed or not, compared to just calling "fsm.ProcessEvent()"?


Thx Andy
« Last Edit: December 17, 2013, 12:38:53 PM by Andy22 »