Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 private void OnEnable()
 {
     Instance = this;
     SceneManager.sceneLoaded   += SetupRace;
     SceneManager.sceneUnloaded += UnloadRace;
     SetupRace(SceneManager.GetActiveScene(), LoadSceneMode.Single);
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     if (UniversalRenderPipeline.asset.debugLevel != PipelineDebugLevel.Disabled)
     {
         Debug.Log("RaceManager Loaded");
     }
     Instance = this;
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     if (Debug.isDebugBuild)
     {
         Debug.Log("RaceManager Loaded");
     }
     Instance = this;
 }
Ejemplo n.º 5
0
 private void Awake()
 {
     Debug.Log("RaceManager Loaded");
     Instance = this;
 }