Esempio n. 1
0
        void Awake()
        {
            Fsm = new Fsm(this);

            Fsm.AddState(PATROL_STATE, new PatrolState());
            Fsm.AddState(OBSERVE_STATE, new ObserveState());
        }
Esempio n. 2
0
 public void Awake()
 {
     GameFlowFsm = new Fsm <GameFlowState>();
     GameFlowFsm.Init(true);
     GameFlowFsm.AddState(GameFlowState.EnterGame, new EnterGameState());
     GameFlowFsm.AddState(GameFlowState.LuaLoop, new LuaLoopState());
     GameFlowFsm.ChangeState(GameFlowState.EnterGame);
 }
Esempio n. 3
0
        void Awake()
        {
            eyeVision.onEnter.AddListener(OnObjectInSight);
            eyeVision.onExit.AddListener(OnObjectOutSight);

            Fsm = new Fsm(this);

            Fsm.AddState(PATROL_STATE, new PatrolState());
            Fsm.AddState(OBSERVE_STATE, new ObserveState());
            Fsm.AddState(CHASE_STATE, new ChaseState());
        }
Esempio n. 4
0
    void Awake()
    {
        eyeVision.onEnter.AddListener(OnObjectInSight);
        eyeVision.onExit.AddListener(OnObjectOutSight);


        m_Rid = GetComponent <Rigidbody>();

        Fsm = new Fsm <AiTank>(this);

        Fsm.AddState(PATROL_STATE, new Patrol());
        // Fsm.AddState(OBSERVE_STATE, new Observ());
        Fsm.AddState(CHASE_STATE, new Chase());
        Fsm.AddState(STOP_AI_STATE, new StopAi());
    }
    void Awake()
    {
        rb = GetComponent <Rigidbody>();
        eyeVision.onEnter.AddListener(OnObjectInSight);
        eyeVision.onExit.AddListener(OnObjectOutSight);


        m_Rid = GetComponent <Rigidbody>();

        Fsm = new Fsm <AiBossDargon>(this);

        Fsm.AddState(FirstPoint_STATE, new FirstPoint());
        Fsm.AddState(Around_STATE, new Around());
        Fsm.AddState(Follow_STATE, new Follow());
        // Fsm.AddState(ChangScale_SATE, new ChangScale());
        Fsm.AddState(FirstPoint2_STATE, new FirstPoint2());
        Fsm.AddState(Follow2_STATE, new Follow2());
    }
Esempio n. 6
0
        /// <summary>
        /// Adds the state to the state machine based on the number passed
        /// </summary>
        /// <param name="state">Will add the CurrentState+1 to the state machine</param>
        protected void AddStateAt(int state)
        {
            // ReSharper disable once SwitchStatementMissingSomeCases
            switch (state)
            {
            case 0:
                StateMachine.AddState(new StateOne());
                break;

            case 1:
                StateMachine.AddState(new StateTwo());
                break;

            case 2:
                StateMachine.AddState(new StateThree());
                break;

            case 3:
                StateMachine.AddState(new StateFour());
                break;

            case 4:
                StateMachine.AddState(new StateFive());
                break;
            }
        }
Esempio n. 7
0
    void Awake()
    {
        eyeVision.onEnter.AddListener(OnObjectInSight);
        eyeVision.onExit.AddListener(OnObjectOutSight);


        m_Rid = GetComponent <Rigidbody>();

        Fsm = new Fsm <AiBoss2>(this);

        Fsm.AddState(PATROL_STATE, new Patrol2());
        Fsm.AddState(OBSERVE_STATE, new Observ2());
        Fsm.AddState(CHASE_STATE, new Chase2());
        Fsm.AddState(UPSTONE_STATE, new UpStone());
        Fsm.AddState(Monster_STATE, new StateMonster());
        Fsm.AddState(STATE_PRO, new StatePro());
        Fsm.AddState(OBSER22_STATE, new Observ22());
        Fsm.AddState(CHASE22_STATE, new Chase22());
    }
        private void OnCreateNewState()
        {
            FsmState state = new FsmState();

            m_Fsm.AddState(state);
        }
Esempio n. 9
0
 public void AddProcedure(params IProcedure[] procedures)
 {
     Fsm.AddState(procedures);
 }