Exemplo n.º 1
0
 void Awake()
 {
     if (Instance != null)
     {
         Debug.LogError("multi Instance");
         Destroy(this.gameObject);
         return;
     }
     Instance = this;
 }
Exemplo n.º 2
0
        private IEnumerator InitGameManager()
        {
            masterDataManager = MasterDataManager.Instance;
            yield return(StartCoroutine(masterDataManager.Init()));

            Debug.Log("===masterDataManager Inited");
            //
            playerManager = PlayerManager.Instance;
            Debug.Log("===playManager Inited");
            //
            saveDataManager = SaveDataManager.Instance;
            yield return(StartCoroutine(saveDataManager.Init()));

            //
            playerManager.InitPlayer();

            commandManager = CommandManager.Instance;
            yield return(0);
        }