Example #1
0
    public void play()
    {
        for (int i = 0; i < eod.particleSystemList.Count; i++)
        {
            ParticleSystem ps = eod.particleSystemList[i];
            if (ps != null)
            {
                ps.Play(true);
            }
        }
        //foreach (SpriteAnimation sa in spriteAnimationList)
        //{
        //    sa.delayIng = true;
        //    sa.loop = false;
        //    sa.enabled = true;
        //    sa.isPaused = false;
        //}
        float time = 5000f - (Time.time - oldTime);

        for (int i = 0; i < eod.ncCurveAnimationList.Count; i++)
        {
            NcCurveAnimation nc = eod.ncCurveAnimationList[i];
            if (nc.isDelay())
            {
                nc.m_fDelayTime -= time;
            }
            else
            {
                nc.ResumeAnimation();
            }
        }
        for (int i = 0; i < eod.ncSpriteAnimationList.Count; i++)
        {
            NcSpriteAnimation nc = eod.ncSpriteAnimationList[i];
            if (nc.isDelay())
            {
                nc.m_fDelayTime -= time;
            }
            else
            {
                nc.ResumeAnimation();
            }
        }
        for (int i = 0; i < eod.ncUvAnimationList.Count; i++)
        {
            NcUvAnimation nc = eod.ncUvAnimationList[i];
            nc.ResumeAnimation();
        }
        for (int i = 0; i < eod.ncRotationList.Count; i++)
        {
            NcRotation nc = eod.ncRotationList[i];
            nc.ResumeAnimation();
        }
        for (int i = 0; i < eod.animatorList.Count; i++)
        {
            Animator animator = eod.animatorList[i];
            animator.speed = 1;
        }
        for (int i = 0; i < eod.animationList.Count; i++)
        {
            Animation animation = eod.animationList[i];
            animation.Play();
        }
    }