Exemple #1
0
 public void closeScene(SceneBase scene)
 {
     if (_sceneList.Contains(scene))
     {
         _sceneList.Remove(scene);
         scene.onDestroy();
     }
     else
     {
         Log.error("scene not exist");
     }
 }
Exemple #2
0
 public SceneBase openScene(SceneType type)
 {
     if (getSceneData(type) != null)
     {
         SceneData data  = getSceneData(type);
         SceneBase scene = Activator.CreateInstance(data.type) as SceneBase;
         _sceneList.Add(scene);
         scene.onInit(data);
         scene.onStart();
         return(scene);
     }
     return(null);
 }