Exemplo n.º 1
0
 public void Update(float timeslice)
 {
     if (playing)
     {
         if (Delay > 0)
         {
             Delay -= timeslice;
             if (Delay <= 0)
             {
                 if (PlayStart != null)
                 {
                     PlayStart(this);
                 }
                 c_time    += Delay;
                 timeslice += Delay;
                 if (lsf != null)
                 {
                     for (int i = 0; i < lsf.Count; i++)
                     {
                         ShaderFloat.Update(lsf[i], timeslice);
                     }
                 }
                 if (lsv != null)
                 {
                     for (int i = 0; i < lsv.Count; i++)
                     {
                         ShaderVector4.Update(lsv[i], timeslice);
                     }
                 }
             }
         }
         else
         {
             c_time -= timeslice;
             if (lsf != null)
             {
                 for (int i = 0; i < lsf.Count; i++)
                 {
                     ShaderFloat.Update(lsf[i], timeslice);
                 }
             }
             if (lsv != null)
             {
                 for (int i = 0; i < lsv.Count; i++)
                 {
                     ShaderVector4.Update(lsv[i], timeslice);
                 }
             }
             if (!Loop & c_time <= 0)
             {
                 playing = false;
                 if (PlayOver != null)
                 {
                     PlayOver(this);
                 }
             }
             else
             {
                 if (c_time <= 0)
                 {
                     Play();
                 }
             }
         }
     }
 }