void Awake(){ Instance = this; Debug.Log ("No more counting dollars\tWe'll be counting stars"); DontDestroyOnLoad (gameObject); //creat singleton UIManager.Instance = new UIManager (); GameDataManager.Instance = new GameDataManager (); GameConfigManager.Instance = new GameConfigManager(); UIManager.Instance.ShowPanel<LoginPanel> (); GameConfigManager.Instance.ChangeWordByLanguage(GameDataManager.Instance.IsChinese); StoryBoard.Instance = new StoryBoard(); }
void Start() { IScriptableObjectLoader scriptableObjectLoader = new ScriptableObjectLoader(); ISceneTable sceneTable = scriptableObjectLoader.LoadScriptableObject(eScriptableObject.SceneTable) as ISceneTable; ISceneSystem sceneSystem = new SceneSystem(sceneTable); IGameSetting gameSetting = new GameSetting(); IUIPrefabTable uiPrefabTable = scriptableObjectLoader.LoadScriptableObject(eScriptableObject.UISystemTable) as IUIPrefabTable; IUILoader uiLoader = new UILoader(uiPrefabTable); IUISystem uiSystem = new UISystem(uiLoader); IGameProcessSystem gameProcessSystem = new GameProcessSystem(gameSetting, sceneSystem, uiSystem); IGameMainLoop gameMainLoop = new GameMainLoop(gameProcessSystem); gameMainLoop.Start(); DontDestroyOnLoad(this); }
void Awake(){ Instance = this; Debug.Log ("No more counting dollars\tWe'll be counting stars"); DontDestroyOnLoad (gameObject); }