// main logic public override void Init() { // activate instance if (Instance == null) { Instance = this; if (!didInit) { base.Init(); } } else if (Instance != this) { Destroy(gameObject); } }
// main logic private void InitGame() { // init nemuManager ref if (!menuManager) { menuManager = MenuManager_Basket.Instance; } // chack playerManager ref if (!playerManager) { playerManager = PlayerManager_Basket.Instance; } // init soundManager if (!soundManager) { soundManager = BaseSoundController.Instance; } // initialize a timer theTimer = ScriptableObject.CreateInstance <TimerClass>(); }