Exemplo n.º 1
0
        virtual public void Play(EnActionID actionID, object contenxt)
        {
            if (m_animator == null)
            {
                Debug.LogError("播放动作失败, m_animator = null.");
                return;
            }

            PlayActionDelegate func;

            if (m_dicActionFunc.TryGetValue(actionID, out func))
            {
                if (func != null)         //定了动作处理函数
                {
                    func(contenxt);
                }
            }
        }
Exemplo n.º 2
0
        override public void Play(EnActionID actionID, object contenxt)
        {
            if (m_animator == null)
            {
                Debug.LogError("播放动作失败, m_animator = null.");
                return;
            }

            PlayActionDelegate func;

            if (m_dicActionFunc.TryGetValue(actionID, out func))
            {
                if (func != null)         //定了动作处理函数
                {
                    func(contenxt);
                }
                else                     //添加了动作列表,但是没有指定处理函数,就让基类来处理
                {
                    base.Play(actionID, contenxt);
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 播放一个动作
        /// </summary>
        /// <param name="actionID"></param>
        /// <param name="context"></param>
        public void PlayAction(EnActionID actionID, object context)
        {
            IAniState curAniState = m_dicStates[m_curState];

            curAniState.Play(actionID, context);
        }