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();
        }
    }
Example #2
0
 public void stop()
 {
     for (int i = 0; i < eod.particleSystemList.Count; i++)
     {
         ParticleSystem ps = eod.particleSystemList[i];
         if (ps != null)
         {
             ps.Pause(true);
         }
     }
     //foreach (SpriteAnimation sa in eod.spriteAnimationList)
     //{
     //    sa.delayIng = true;
     //    sa.loop = false;
     //    sa.enabled = true;
     //    sa.isPaused = true;
     //}
     oldTime = Time.time;
     for (int i = 0; i < eod.ncCurveAnimationList.Count; i++)
     {
         NcCurveAnimation nc = eod.ncCurveAnimationList[i];
         if (nc.isDelay())
         {
             nc.m_fDelayTime += 5000f;
         }
         else
         {
             nc.PauseAnimation();
         }
     }
     for (int i = 0; i < eod.ncSpriteAnimationList.Count; i++)
     {
         NcSpriteAnimation nc = eod.ncSpriteAnimationList[i];
         if (nc.isDelay())
         {
             nc.m_fDelayTime += 5000f;
         }
         else
         {
             nc.PauseAnimation();
         }
     }
     for (int i = 0; i < eod.ncUvAnimationList.Count; i++)
     {
         NcUvAnimation nc = eod.ncUvAnimationList[i];
         nc.PauseAnimation();
     }
     for (int i = 0; i < eod.ncRotationList.Count; i++)
     {
         NcRotation nc = eod.ncRotationList[i];
         nc.PauseAnimation();
     }
     for (int i = 0; i < eod.animatorList.Count; i++)
     {
         Animator animator = eod.animatorList[i];
         animator.speed = 0;
     }
     for (int i = 0; i < eod.animationList.Count; i++)
     {
         Animation animation = eod.animationList[i];
         animation.Stop();
     }
 }