public void closeScene(SceneBase scene) { if (_sceneList.Contains(scene)) { _sceneList.Remove(scene); scene.onDestroy(); } else { Log.error("scene not exist"); } }
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); }