Exemple #1
0
        //执行
        public void End()
        {
            if (CurHandle != null)
            {
                CurHandle.OnStart(this);

                //直接设置到结束的,并且需要用当前值作开始值的,这里得计算下当前值,不然下面的Update()计算出来的值可能不正确
                if (m_isUseNowStart && !m_isCatchUseNowStart)
                {
                    if (!ingore)
                    {
                        CurHandle.OnUseNowStart(this);
                    }
                    m_isCatchUseNowStart = true;
                }
                if (!ingore)
                {
                    CurHandle.Update(this, m_animationCurve.Evaluate(1f), false);
                }
                EditorUtil.SetDirty(m_go);
            }

            Clear();
            if (m_onEnd != null)
            {
                m_onEnd();
            }
        }
Exemple #2
0
        //开始,如果结束那么返回true
        public void Start()
        {
            Clear();
            m_beginTime = Now;

            HandleSequence seqHandle = null;

            if (CurHandle != null)
            {
                if (_type == Type.sequence)
                {
                    seqHandle = CurHandle as HandleSequence;
                    seqHandle.Start(this);
                }
                else
                {
                    CurHandle.OnStart(this);
                }
            }

            if (CurHandle != null && m_isUseNowStart)
            {
                if (!ingore)
                {
                    CurHandle.OnUseNowStart(this);
                }
                m_isCatchUseNowStart = true;
            }

            if (IsEnd)
            {
                End();
            }
        }