Exemple #1
0
    public static CHumanState_Carry Instance()
    {
        if (instance == null)
        {
            instance = new CHumanState_Carry();
        }

        return(instance);
    }
    void FindBody()
    {
        if (m_human.Find.GetComponent <CFind>().FindBodyFlag == true)
        {
            if (m_human.PStateMachine.CurrentState() != CHumanState_Dash.Instance() && m_human.ItemFlag == false)
            {
                if (Input.GetKey(KeyCode.C))
                {
                    m_human.PStateMachine.ChangeState(CHumanState_Carry.Instance(), m_human.PStateMachine.CurrentState().IsEnd);

                    keyIn = 1;
                }
            }
        }
        else
        {
            if (m_human.PStateMachine.CurrentState() == CHumanState_Carry.Instance() || m_human.PStateMachine.CurrentState() == CHumanState_Carry_Motion.Instance())
            {
                m_human.PStateMachine.ChangeState(CHumanState_Main.Instance(), m_human.PStateMachine.CurrentState().IsEnd);
            }
        }
    }