Пример #1
0
    private void MakeFSM()
    {
        mFSMSystem = new NpcFSMSystem();

        NpcRunState runState = new NpcRunState(mFSMSystem, this);

        runState.AddTransition(NpcTransition.Rescued, NpcStateID.Cheerful);

        NpcCheerfulState cheerfulState = new NpcCheerfulState(mFSMSystem, this);

        mFSMSystem.AddState(runState, cheerfulState);
    }
Пример #2
0
 public NpcCheerfulState(NpcFSMSystem fsm, ICharacter character) : base(fsm, character)
 {
     mStateID = NpcStateID.Cheerful;
 }
Пример #3
0
 public NpcRunState(NpcFSMSystem fsm, ICharacter character) : base(fsm, character)
 {
     mStateID = NpcStateID.Run;
 }
Пример #4
0
 public INpcState(NpcFSMSystem fsm, ICharacter character)
 {
     mFSM       = fsm;
     mCharacter = character;
 }