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); }
public virtual void onInit(SceneData sceneData) { _sceneData = sceneData; }