예제 #1
0
 public void UnRegisterScence(EnumScenceType _scenceID)
 {
     if (dicScenceInfos.ContainsKey(_scenceID))
     {
         dicScenceInfos.Remove(_scenceID);
     }
 }
예제 #2
0
 public ScenceInfoData GetScenceInfo(EnumScenceType _scenceID)
 {
     if (dicScenceInfos.ContainsKey(_scenceID))
     {
         return(dicScenceInfos[_scenceID]);
     }
     Debug.LogError("This Scence is not register! ID:" + _scenceID.ToString());
     return(null);
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
        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());
        }
예제 #5
0
 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);
     }
 }
예제 #6
0
 public bool IsRegisterScence(EnumScenceType _scenceID)
 {
     return(dicScenceInfos.ContainsKey(_scenceID));
 }