private void Awake() { if (m_instance != null) { Destroy(m_instance.gameObject); } m_instance = this; }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this); } m_AssetManager.Init(); m_ResourceManager.Init(); m_ObjectPool.Init(); m_MapInfo = Instantiate(m_MapInfo); m_MapInfo.Init(); UIInGameMain.Instance.Init(); m_ItemManager.Init(); m_MissionManager.Init(); m_MobManager.Init(); m_CameraFollowing = Camera.main.GetComponent <CameraFollowing>(); m_PlayerManager = this.gameObject.AddComponent <InGamePlayerManager>(); m_RewardManager = new GameObject("RewardManager").AddComponent <InGameRewardManager>(); }