diff --git a/Assets/Scripts/OpenTS2/Audio/MusicController.cs b/Assets/Scripts/OpenTS2/Audio/MusicController.cs index 5d2737f..1229619 100644 --- a/Assets/Scripts/OpenTS2/Audio/MusicController.cs +++ b/Assets/Scripts/OpenTS2/Audio/MusicController.cs @@ -12,27 +12,27 @@ namespace OpenTS2.Audio [RequireComponent(typeof(AudioSource))] public class MusicController : MonoBehaviour { - public static MusicController Singleton { get; private set; } + public static MusicController Instance { get; private set; } private AudioSource _audioSource; private AudioAsset _currentAudioAsset; private void Awake() { - Singleton = this; + Instance = this; _audioSource = GetComponent(); } public static void PlayMusic(AudioAsset music) { - Singleton._currentAudioAsset = music; - Singleton._audioSource.clip = music.Clip; - Singleton._audioSource.volume = 1f; - Singleton._audioSource.Play(); + Instance._currentAudioAsset = music; + Instance._audioSource.clip = music.Clip; + Instance._audioSource.volume = 1f; + Instance._audioSource.Play(); } public static void FadeOutMusic() { - Singleton.StartCoroutine(Singleton.FadeOut()); + Instance.StartCoroutine(Instance.FadeOut()); } IEnumerator FadeOut() diff --git a/Assets/Scripts/OpenTS2/Diagnostic/CheatConsoleController.cs b/Assets/Scripts/OpenTS2/Diagnostic/CheatConsoleController.cs index c77e595..149100e 100644 --- a/Assets/Scripts/OpenTS2/Diagnostic/CheatConsoleController.cs +++ b/Assets/Scripts/OpenTS2/Diagnostic/CheatConsoleController.cs @@ -11,7 +11,7 @@ namespace OpenTS2.Diagnostic /// public class CheatConsoleController : MonoBehaviour, IConsoleOutput { - public static CheatConsoleController Singleton { get; private set; } + public static CheatConsoleController Instance { get; private set; } public GameObject ConsoleParent; public InputField CheatInputField; public Text ConsoleOutput; @@ -24,7 +24,7 @@ namespace OpenTS2.Diagnostic private void Awake() { - Singleton = this; + Instance = this; CheatInputField.onValueChanged.AddListener(OnTextChanged); ConsoleParent.SetActive(false); DontDestroyOnLoad(this); diff --git a/Assets/Scripts/OpenTS2/Engine/AssetController.cs b/Assets/Scripts/OpenTS2/Engine/AssetController.cs index 226bc84..756cb5e 100644 --- a/Assets/Scripts/OpenTS2/Engine/AssetController.cs +++ b/Assets/Scripts/OpenTS2/Engine/AssetController.cs @@ -12,13 +12,13 @@ namespace OpenTS2.Engine /// public class AssetController : MonoBehaviour { - public static AssetController Singleton { get; private set; } - public static Font DefaultFont => Singleton._defaultFont; + public static AssetController Instance { get; private set; } + public static Font DefaultFont => Instance._defaultFont; [SerializeField] private Font _defaultFont; private void Awake() { - Singleton = this; + Instance = this; } } } diff --git a/Assets/Scripts/OpenTS2/Engine/MemoryController.cs b/Assets/Scripts/OpenTS2/Engine/MemoryController.cs index c07bb71..a9974c2 100644 --- a/Assets/Scripts/OpenTS2/Engine/MemoryController.cs +++ b/Assets/Scripts/OpenTS2/Engine/MemoryController.cs @@ -13,13 +13,13 @@ namespace OpenTS2.Engine /// public class MemoryController : MonoBehaviour { - public static MemoryController Singleton { get; private set; } + public static MemoryController Instance { get; private set; } private static Action MarkedForRemoval; private void Awake() { - Singleton = this; + Instance = this; } public static void MarkForRemoval(Action action) diff --git a/Assets/Scripts/OpenTS2/UI/CursorController.cs b/Assets/Scripts/OpenTS2/UI/CursorController.cs index 7b906ee..99fdd4e 100644 --- a/Assets/Scripts/OpenTS2/UI/CursorController.cs +++ b/Assets/Scripts/OpenTS2/UI/CursorController.cs @@ -9,7 +9,7 @@ using UnityEngine; namespace OpenTS2.UI { public class CursorController : MonoBehaviour { - public static CursorController Singleton { get; private set; } + public static CursorController Instance { get; private set; } public enum CursorType { @@ -65,7 +65,7 @@ namespace OpenTS2.UI { private void Awake() { - Singleton = this; + Instance = this; RegisterCursors(); }