示例#1
0
    public override void Enter()
    {
        PlayerBehaviorStateMachine SM = (PlayerBehaviorStateMachine)GetStateMachine();

        m_Animator = SM.m_GameObject.GetComponent <Animator>();
        m_Animator.SetBool("Crouch", false);
    }
 void OnDestroy()
 {
     // stop the state machine to ensure all the Exit() gets called
     if (m_PlayerSM != null)
     {
         m_PlayerSM.StopSM();
         m_PlayerSM = null;
     }
 }
 void OnDestroy()
 {
     // stop the state machine to ensure all the Exit() gets called
     if (m_PlayerSM != null)
     {
         m_PlayerSM.StopSM();
         m_PlayerSM = null;
     }
 }
示例#4
0
    public override void Enter()
    {
        PlayerBehaviorStateMachine SM = (PlayerBehaviorStateMachine)GetStateMachine();

        m_Animator = SM.m_GameObject.GetComponent <Animator>();
        m_Animator.SetBool("OnGround", true);
        m_Animator.SetFloat("Jump", 0.0f);
        m_Animator.SetFloat("Turn", 0.0f, 0.1f, Time.deltaTime);
        m_Animator.applyRootMotion = false;
    }
示例#5
0
    public override void Enter()
    {
        PlayerBehaviorStateMachine SM = (PlayerBehaviorStateMachine)GetStateMachine();

        SkinnedMeshRenderer[] renders = SM.m_GameObject.GetComponentsInChildren <SkinnedMeshRenderer>();
        if (renders.Length != 0)
        {
            foreach (SkinnedMeshRenderer render in renders)
            {
                render.enabled = false;
            }
        }
    }
 void Start ()
 {
     // create the state machine and start it
     m_PlayerSM = new PlayerBehaviorStateMachine(this.gameObject);
     m_PlayerSM.StartSM();
 }
 void Start()
 {
     // create the state machine and start it
     m_PlayerSM = new PlayerBehaviorStateMachine(this.gameObject);
     m_PlayerSM.StartSM();
 }