Example #1
0
 private void NextFrame()
 {
     CurrentFrame++;
     if (CurrentFrame != _totalFrames)
     {
         return;
     }
     CurrentFrame = 0;
     _isEnd       = true;
     EndAnimation?.Invoke();
     //EndAnimation = null;
 }
Example #2
0
 /// <summary>
 ///		Ejecuta las acciones de una línea de tiempo
 /// </summary>
 internal void Execute(TimeLineModel timeLine)
 {
     // Si no existía ninguna animación se crea
     if (_animationProcessor == null)
     {
         // Crea el objeto
         _animationProcessor = new TimeLineProcessor(this, UseAnimation);
         // Asigna los manejadores de eventos
         _animationProcessor.AnimationStart += (sender, evntArgs) =>
         {
             StartAnimation?.Invoke(this, EventArgs.Empty);
             IsPlayingAnimation = true;
         };
         _animationProcessor.AnimationEnd += (sender, evntArgs) =>
         {
             EndAnimation?.Invoke(this, EventArgs.Empty);
             IsPlayingAnimation = false;
         };
     }
     // Ejecuta la animación
     _animationProcessor.Execute(timeLine);
 }
Example #3
0
 private static void AfterWakeUp()
 {
     EndAnimation.Invoke();
     timer = new Timer(TimerCallback, "KissingTimer", TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(1));
     rand  = new System.Random(randSeed);
 }
Example #4
0
 protected virtual void OnEndAnimation(EventArgs e)
 {
     EndAnimation?.Invoke(this, e);
 }