we poppin

This commit is contained in:
ntr committed 2023-09-27 01:34:36 +10:00
1 parent 336945533b
commit 9f6e615653
88 files changed
+979 -170

No files matched your search

+7
View File
@@ -16,6 +16,9 @@ public class Timing: MonoBehaviour {
public List<SectorTime> sectorTimes;
public bool timerEnabled;
[SerializeField]
ShipAudio audio;
public string mapName;
public double sectorTime;
public double lapTime;
@@ -106,9 +109,13 @@ public class Timing: MonoBehaviour {
sectorTimes.Add(s);
Debug.Log($"{sectorTimes.Count} / {sectors.Length}");
// play a sound :)
if (audio != null) audio.PlayNoise();
// restart the timer for the next sector
sectorStart = Time.timeAsDouble;
// they finished a lap!
if (sectorTimes.Count == sectors.Length) {
EndLap();