public void SelectNextOrbit() { var index = System.Array.IndexOf(orbits, CurrentOrbit); if (index != -1 && index + 1 < orbits.Length) { CurrentOrbit = orbits[index + 1]; } CurrentOrbit.ShowToPlayer(false); player.TransferToNewOrbit(CurrentOrbit, false); }
void RestartGame(int orbitIndex) { // Set default states to orbits. orbits.ForEach((o) => o.HideFromPlayer()); CurrentOrbit = orbits[orbitIndex]; CurrentOrbit.ShowToPlayer(false); if (CurrentOrbit.IsEmpty) { ShowNextOrbit(); } player.TransferToNewOrbit(CurrentOrbit, true); camera.ResetCamera(); UseBoostSpeed = false; StartCoroutine(fader.FadeIn()); }