public void ShootUpToTopOfScreen() { OnStartMoving?.Invoke(); transform.DOMove(topOfScreen.position, playerShootData.Duration) .SetDelay(playerShootData.WaitTime + delay * playerShootData.Duration) .SetEase(playerShootData.Easing) .OnComplete(() => OnDoneMoving?.Invoke()); }
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); }