示例#1
0
 public static AnimManager SharedInstance()
 {
     if (m_Instance == null) {
         m_Instance = new AnimManager ();
     }
     return m_Instance;
 }
示例#2
0
 /// <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;
         }
     }
 }
示例#3
0
        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;
        }
示例#4
0
        /// <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")) {

                }
            }
        }