Пример #1
0
 public void ShootUpToTopOfScreen()
 {
     OnStartMoving?.Invoke();
     transform.DOMove(topOfScreen.position, playerShootData.Duration)
     .SetDelay(playerShootData.WaitTime + delay * playerShootData.Duration)
     .SetEase(playerShootData.Easing)
     .OnComplete(() => OnDoneMoving?.Invoke());
 }
Пример #2
0
 IEnumerator followPath(List <GridObject> path)
 {
     foreach (var pathNode in path)
     {
         transform.position = pathNode.GetCellPos();
         yield return(new WaitForSeconds(0.1f));
     }
     OnDoneMoving?.Invoke(this, EventArgs.Empty);
 }