Exemplo n.º 1
0
    public void CheckSwipe(string swipeType)
    {
        if (swipeType == _currentSwipeSequence.Last())
        {
            if (!_isSlow)
            {
                _isSlow = true;
                StartCoroutine(SetSlowMotionRoutine());
            }

            _currentSwipeSequence.RemoveAt(_currentSwipeSequence.Count - 1);
            CompleteArrow.Invoke();

            if (_currentSwipeSequence.Count == 0)
            {
                Attack.Invoke();
                Invoke("UpdateSequence", 2.5f);
                _isSlow = false;
            }
        }
    }
Exemplo n.º 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);
 }