private void EnteredWaypoint(int index, bool checkpoint) { var count = WaypointGroup.Instance.WPs.Count; var nextWp = (int)Mathf.Repeat(_wpCount + 1, count); if (nextWp != index) { return; } _wpCount = nextWp; if (index != 0) { return; } LapCount++; SplitTimes.Add(RaceManager.RaceTime); if (LapCount <= RaceManager.GetLapCount()) { return; } Debug.Log($"Boat {name} finished {RaceUI.OrdinalNumber(Place)} with time:{RaceUI.FormatRaceTime(SplitTimes.Last())}"); RaceManager.BoatFinished(_playerIndex); MatchComplete = true; }
private void OnEnable() { Instance = this; SceneManager.sceneLoaded += SetupRace; SceneManager.sceneUnloaded += UnloadRace; SetupRace(SceneManager.GetActiveScene(), LoadSceneMode.Single); }
private void Awake() { if (UniversalRenderPipeline.asset.debugLevel != PipelineDebugLevel.Disabled) { Debug.Log("RaceManager Loaded"); } Instance = this; }
private void Awake() { if (Debug.isDebugBuild) { Debug.Log("RaceManager Loaded"); } Instance = this; }
private void Awake() { Debug.Log("RaceManager Loaded"); Instance = this; }