Beispiel #1
0
        public void ChangeState(CrystalCarState state, Fsm targetFsm)
        {
            currentFsm.OnExit();
            this.state = state;
            currentFsm = targetFsm;
            currentFsm.OnEnter();

            DebugUtils.LogWarning(DebugUtils.Type.AI_CrystalCar, string.Format(" {0}'s crystal car {1} enter state {2} ", mark, id, this.state));
        }
Beispiel #2
0
        public void ChangeState(NpcState s, Fsm fsm)
        {
            DebugUtils.Assert(fsm != null, "Can't translate to a null npc state!");

            currentFsm.OnExit();
            currentFsm = fsm;
            state      = s;

            DebugUtils.LogWarning(DebugUtils.Type.AI_Npc, string.Format("{0} {1} enter {2} state", npcType, id, state));
            currentFsm.OnEnter();
        }