private void Update() { #if !UNITY_EDITOR try { #endif if (Input.GetKeyDown(KeyCode.Escape)) { PlatformHelper.Exit(); } { var __list1 = mMgrList; var __listCount1 = __list1.Count; for (var __i1 = 0; __i1 < __listCount1; ++__i1) { var mgr = __list1[__i1]; { try { // Profiler.BeginSample(mgr.GetType().ToString()); mgr.Tick(Time.deltaTime); // Profiler.EndSample(); } catch { // some mgr failed. } } } } Profiler.BeginSample("TimeManager.Updata()"); TimeManager.Instance.Updata(); Profiler.EndSample(); Profiler.BeginSample("GVoiceManager.Updata()"); GVoiceManager.Instance.Update(); Profiler.EndSample(); Profiler.BeginSample("AnimationUpdateFrequencyController.Tick()"); AnimationUpdateFrequencyController.Tick(); Profiler.EndSample(); ObjBase.UpdateVisiblity(); #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }
public void OnCallResult(string json) { JsonData jsonData = JsonMapper.ToObject(json); string funcName = (string)jsonData["FuncName"]; if (funcName.Equals("ReachabilityChanged")) { ReachabilityChanged(); } else if (funcName.Equals("SpeechRecognized")) { string content = (string)jsonData ["content"]; SpeechRecognized(content); } else if (funcName.Equals("OnLowMemory")) { OnLowMemory(); } else if (funcName.Equals("onLogin")) { string data = (string)jsonData["jsondata"]; OnUserLogin(data); } else if (funcName.Equals("LoginCancel")) { Game.Instance.ExitToLogin(); } else if (funcName.Equals("QuitGame")) { Application.Quit(); } else if (funcName.Equals("logoutSuccess")) { Game.Instance.ChangeSceneToLogin(); } else if (funcName.Equals("SwitchAccountSuccess")) { string data = (string)jsonData["jsondata"]; ExitToLoginAndDoLogin(data); } else if (funcName.Equals("ShowQuickGame")) { PlatformHelper.Exit(); } }