internal void ChangeHole() { if (holeManager) { holeManager.ChangeHole(false); } else { Debug.LogError("Could not find hole manager"); } }
private IEnumerator DelayedBallDespawn(GolfBall gb, float lifetime) { yield return(new WaitForSeconds(lifetime)); int team = nStoredData ? nStoredData.GetTeam(gb.GetLastShotId()) : 0; if (network && network.IsHost()) { EventController.FireEvent(new PersonalScoreMessage(gb.GetLastShotId(), PersonalScoreManager.TYPE.SCORE_BALL)); gb.EndLifetime(); EventController.FireEvent(new NetworkSendBallRespawn(gb, team)); } if (!network) { gb.EndLifetime(); EventController.FireEvent(new TeamScoreMessage()); } holeManager.ChangeHole(); dbsRoutine = null; }