private IEnumerator CheckForPlayerInWaypoint() { while (true) { UpdateArrow(); // Check for any player in waypoint proximity. bool playerIsAtWaypoint = false; foreach (Transform player in playersToTriggerWaypoint) { if (Vector3.Distance(player.position, waypoint.position) < radius) { playerIsAtWaypoint = true; break; } } if (playerIsAtWaypoint) { break; } else { yield return(null); } } ObjectiveComplete?.Invoke(); }
public void IncrementProgress() { totalStolen++; GameplayHUDSingleton.StolenItemsObtained = totalStolen; if (totalStolen >= amountToSteal) { ObjectiveComplete?.Invoke(); } }
private void OnArtPieceStolen() { totalStolen++; GameplayHUDSingleton.StolenItemsObtained = totalStolen; if (totalStolen >= amountToSteal) { ObjectiveComplete?.Invoke(); } }