コード例 #1
0
    void SetState()
    {
        switch (m_synclocalHumanState)
        {
        case (int)StateID.BIKURI:
            m_human.PStateMachine.ChangeState(CHumanState_Bikuri.Instance());
            break;

        case (int)StateID.CARRY:
            m_human.PStateMachine.ChangeState(CHumanState_Carry_Motion.Instance());
            break;

        case (int)StateID.DASH:
            m_human.PStateMachine.ChangeState(CHumanState_Dash_Motion.Instance());
            break;

        case (int)StateID.DEAD:
            m_human.PStateMachine.ChangeState(CHumanState_Dead.Instance());
            break;

        case (int)StateID.GET:
            m_human.PStateMachine.ChangeState(CHumanState_Get.Instance());
            break;

        case (int)StateID.ITEM:
            m_human.PStateMachine.ChangeState(CHumanState_Item.Instance());
            break;

        case (int)StateID.MAIN:
            m_human.PStateMachine.ChangeState(CHumanState_Main.Instance());
            break;

        case (int)StateID.MOVE:
            m_human.PStateMachine.ChangeState(CHumanState_Move_Motion.Instance());
            break;

        case (int)StateID.SET:
            m_human.PStateMachine.ChangeState(CHumanState_Set.Instance());
            break;

        case (int)StateID.USE:
            m_human.PStateMachine.ChangeState(CHumanState_Use.Instance());
            break;
        }

        switch (m_syncGlobalHumanState)
        {
        case (int)StateID.PANIK:
            m_human.PStateMachine.SetGlobalStateState(CHumanState_Perception.Instance());
            break;

        case (int)StateID.WAIT:
            m_human.PStateMachine.SetGlobalStateState(CHumanState_Wait.Instance());
            break;
        }
    }
コード例 #2
0
 void FindCandy()
 {
     if (m_human.Find.GetComponent <CFind>().FindCandyFlag == true)
     {
         if (m_human.CarryFlag == false && m_human.CandyFlag == false)
         {
             m_human.CandyFlag = true;
             m_human.PStateMachine.ChangeState(CHumanState_Get.Instance(), m_human.PStateMachine.CurrentState().IsEnd);
             keyIn = 1;
         }
     }
     m_human.Find.GetComponent <CFind>().FindCandyFlag = false;
 }