Example #1
0
 protected override void startImp()
 {
     if (linkList.First != null)
     {
         mCurExecutor = linkList.First.Value;
         mCurExecutor.Play();
     }
 }
Example #2
0
    public override void Update(float fDeltaTime)
    {
        if (IsPlaying())
        {
            currentTime += fDeltaTime;
            if (currentTime >= StartTime)
            {
                if (eExeState.Exe_WaitStart == ExeState)
                {
                    startImp();
                    SurviveTime = mCurExecutor.SurviveTime;
                    ExeState    = eExeState.Exe_Running;
                }
                bool bOver = updateImp(fDeltaTime);

                if (SurviveTime >= 0)
                {
                    if ((SurviveTime - currentTime) <= 0.0001f)
                    {
                        bOver        = true;
                        mResidueTime = currentTime - SurviveTime;
                        currentTime  = mResidueTime;
                    }
                    else
                    {
                        bOver = false;
                    }
                }

                if (bOver)
                {
                    linkList.RemoveFirst();
                    if (linkList.Count > 0)
                    {
                        mCurExecutor = linkList.First.Value;
                        SurviveTime  = mCurExecutor.SurviveTime;

                        mCurExecutor.Play();
                        if (mResidueTime > 0f)
                        {
                            mCurExecutor.Update(mResidueTime);
                        }

                        bOver = false;
                    }
                    else
                    {
                        Stop();
                        if (onFinished != null)
                        {
                            onFinished(null);
                        }
                    }
                }
            }
        }
    }
    public void AddExecutorNoUpdate(CExecutor childExecutor)
    {
        if (!childExecutor.IsPlaying())
        {
            base.AddExecutor(childExecutor);

            // 运行模式下动态插入
            if (this.ExeState == eExeState.Exe_Running)
            {
                childExecutor.Play();
            }
        }
    }
    protected override void startImp()
    {
        LinkedListNode <CExecutor> CurNode = linkList.First;

        for (int i = 0; i < linkList.Count; ++i)
        {
            CExecutor executor = CurNode.Value;
            if (null != executor)
            {
                executor.Play();
            }
            CurNode = CurNode.Next;
        }
    }
    public override void AddExecutor(CExecutor childExecutor)
    {
        if (!childExecutor.IsPlaying())
        {
            base.AddExecutor(childExecutor);

            // 运行模式下动态插入
            if (this.ExeState == eExeState.Exe_Running)
            {
                childExecutor.Play();

                //childExecutor.Update(this.currentTime - this.StartTime);
            }
        }
        else
        {
            //TODO
        }
    }