public static AnimManager SharedInstance() { if (m_Instance == null) { m_Instance = new AnimManager (); } return m_Instance; }
/// <summary> /// Raises the animation exit event. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> private void OnAnimExit(AnimManager sender, AnimEventArgs e) { if (e.animator == this.m_Animator) { if (e.info.IsName ("Plain")) { m_LockInput = false; } } }
void Start() { m_AnimManager = AnimManager.SharedInstance (); m_AnimManager.OnEnter += OnAnimEnter; m_AnimManager.OnExit += OnAnimExit; m_Controller = GetComponent<CharacterController> (); m_Animator = GetComponent<Animator> (); if (m_Animator.layerCount >= 2) m_Animator.SetLayerWeight (1, 1); m_Animator.speed = 1.5f; }
/// <summary> /// Raises the animation enter event. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> private void OnAnimEnter(AnimManager sender, AnimEventArgs e) { if (e.animator == this.m_Animator) { if (e.info.IsName ("Plain")) { } } }