private void InitCoreManager() { RegisterLog(); DontDestroyOnLoad(this.gameObject); log.Debug("Start game application..."); GameWorld.GetInstance(); LoggerView.GetInstance(); CameraLayerManager.GetInstance(); AssetLoader.GetInstance(); ViewCameraManager.GetInstance().Init(); LayerManager.GetInstance().Init(); RemoteCallLogic.GetInstance(); NGUIManager.GetInstance(); LoginController.GetInstance(); SceneLogic.GetInstance(); PlayerController.GetInstance(); BagLogic.GetInstance(); NpcLogic.GetInstance(); TimeManager.GetInstance(); ViewManager.GetInstance(); gameObject.AddComponent("CronJob"); LoadResource(); //ActiveRush.InitFx(); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_badao03_xuanfengzhan_g2")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_badao01_lipihuashantexiao")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_badao03_xuanfengzhan")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_badao03_xuanfengzhan_mingzhong2")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_badao04_yuanyuewandao_mingzhong")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_badao04_yuanyuewandao_mingzhong_g")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_badao04_yuanyuewandao_wuqifeixing")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_badao04_yuanyuewandao")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_badao02_nuzhanbahuang_gongji")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_daobin_06_nuhou_shifa")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_daobin_05_zhenfei")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_daobin_04_chongfeng")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_skill_daobin_04_chongfeng_mingzhong")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_guaiwusiwang2")); AssetLoader.GetInstance().PreLoad(URLUtil.GetEffectPath("effect_levelup")); AssetLoader.GetInstance().Load(URLUtil.GetEffectPath("effect_guangquan_yellow"), PLAYER_SEL_LoadComplete, AssetType.BUNDLER); AssetLoader.GetInstance().Load(URLUtil.GetEffectPath("effect_guangquan2_red"), NPC_SEL_LoadComplete, AssetType.BUNDLER); PreLoad.GetInstance().OnEnterScene(); SelecterManager.GetInstance(); }
// Use this for initialization void Start() { awardScore = PlayerPrefs.GetInt("awardScore", 0); self = gameObject.GetComponent <Transform>(); map = GameObject.Find("MapManager").GetComponent <MapManager>(); myCamera = GameObject.Find("Main Camera").GetComponent <CameraControl>(); myNGUI = GameObject.Find("UI Root").GetComponent <NGUIManager>(); //一个bug,在start这个时间点,地图还未生成,造成参数范围异常的bug //Birth(); //故一下输出结果为0 //Debug.Log(map.mapSave.Count); UIEventListener.Get(gameObject).onClick = Func; }
//public bool CheckIsOnlyMainNormalWindows(LinkedList<WinID> MainNormalIDs) { // var winVal = openWins.Last; // while (winVal != null) { // UIWin uiWindow = winVal.Value; // WinID winID = uiWindow.ID; // if (MainNormalIDs.Contains(winID) == false) // return false; // winVal = winVal.Previous; // } //} public void Awake() { Instance = this; }