internal static void setupStuff() { SpawnController = Resources.FindObjectsOfTypeAll <BeatmapObjectSpawnController>().FirstOrDefault(); PauseManager = Resources.FindObjectsOfTypeAll <StandardLevelGameplayManager>().FirstOrDefault(); PlayerController = Resources.FindObjectsOfTypeAll <PlayerController>().FirstOrDefault(); SaberManager = PlayerController.GetField("_saberManager") as SaberManager; leftSaber = SaberManager.GetPrivateField <Saber>("_leftSaber") as Saber; rightSaber = SaberManager.GetPrivateField <Saber>("_rightSaber") as Saber; }
internal static void SetupHell() { TrackingError = false; SpawnController = Resources.FindObjectsOfTypeAll <BeatmapObjectSpawnController>().FirstOrDefault(); PauseManager = Resources.FindObjectsOfTypeAll <StandardLevelGameplayManager>().FirstOrDefault(); PlayerController = Resources.FindObjectsOfTypeAll <PlayerController>().FirstOrDefault(); SaberManager = PlayerController.GetField("_saberManager") as SaberManager; leftSaber = SaberManager.GetPrivateField <Saber>("_leftSaber") as Saber; rightSaber = SaberManager.GetPrivateField <Saber>("_rightSaber") as Saber; if (SpawnController) { SpawnController.noteWasMissedEvent += MissHell_noteWasMissedEvent; SpawnController.noteWasCutEvent += MissHell_noteWasCutEvent; } StartPosition = PlayerController.transform.position; timer = new Timer(3000); timer.Elapsed += Timer_Elapsed; }