void UpdateScore() { float rewardsEarned = Mathf.Floor(maxDistance / distancePerReward); if (rewardsEarned > rewards) { rewards = rewardsEarned; OnScoreChange?.Invoke((long)rewards); } }
void HandleScoreChange(long score) { OnPlayerScoreChanged?.Invoke(score); }