public void UnRegisterScence(EnumScenceType _scenceID) { if (dicScenceInfos.ContainsKey(_scenceID)) { dicScenceInfos.Remove(_scenceID); } }
public ScenceInfoData GetScenceInfo(EnumScenceType _scenceID) { if (dicScenceInfos.ContainsKey(_scenceID)) { return(dicScenceInfos[_scenceID]); } Debug.LogError("This Scence is not register! ID:" + _scenceID.ToString()); return(null); }
public void RegisterScence(EnumScenceType _scenceID, string _scenceName, Type _scenceType, params object[] _params) { if (_scenceType == null || _scenceType.BaseType != typeof(BaseScene)) { throw new Exception("Register scence type must not null and extends BaseScence"); } if (dicScenceInfos.ContainsKey(_scenceID)) { ScenceInfoData info = new ScenceInfoData(_scenceName, _scenceType, _params); dicScenceInfos.Add(_scenceID, info); } }
public void ChangeScence(EnumScenceType _sceneType) { UIManager.Instance.CloseUIAll(); if (CurrentScence != null) { CurrentScence.Release(); CurrentScence = null; } LastSceneType = ChangeSceneType; ChangeSceneType = _sceneType; string sceneName = GetScenceName(_sceneType); //change loding scene CoroutineController.Instance.StartCoroutine(AsyncLoadOtherScene()); }
public void ChangeScence(EnumScenceType _scenceType, EnumUIType _uiType, params object[] _params) { sceneOpenUIType = _uiType; scenceOpenUIParams = _params; if (LastSceneType == _scenceType) { if (sceneOpenUIType == EnumUIType.None) { return; } UIManager.Instance.OpenUI(sceneOpenUIType, scenceOpenUIParams); sceneOpenUIType = EnumUIType.None; } else { ChangeScence(_scenceType); } }
public bool IsRegisterScence(EnumScenceType _scenceID) { return(dicScenceInfos.ContainsKey(_scenceID)); }