public void Tick(float dt) { if (CGameSession.Instance().IsProcessingPaused) { return; } if (!IgnoreTimer) { if (_TimerList != null) { _TimerList.Tick(false); } } if (!IgnoreCollisionDetecr) { UpdateCollision(); } if (!IgnoreBehavior) { UpdateBehaviors(); } }
void LateUpdate() { if (!_IsInited) { return; } _LateTimerList.Tick(true); float dt = Time.deltaTime; CCamCtrlMan.Instance.Tick(dt); VoiceManager.Instance.Tick(dt); InputManager.Instance.LateTick(dt); CFxCacheMan.Instance.LateTick(dt); TimedPoolManager.Instance.LateTick(dt); }
void Update() { if (!_IsInited) { return; } #if ONGUI_DEBUG /* * if (Main.HostPalyer != null) * { * Vector3 polyPickExt = new Vector3(1, 256, 1); * * //Vector3 pos = new Vector3(6.78f, 28.74f, 50.72f); * Vector3 pos = Main.HostPalyer.transform.position; * //Vector3 target = new Vector3(6.78f, 28.74f, 47.72f); //干尸 * //Vector3 target = new Vector3(-21.85f, 27.31f, 38.80f); * //Vector3 target = new Vector3(77.5f, 46.0f, -69.3f); //110地图某点 * //Vector3 target = pos + new Vector3(1, 2, 3); //110二层楼高点 * * Vector3 target = new Vector3(142.47f, 24.04f, -127.85f); * * Vector3 nearest = target; * _IsValidStart = NavMeshManager.Instance.IsValidPositionStrict(pos); * * _IsValidEnd = NavMeshManager.Instance.IsValidPositionStrict(target); * * _IsConnected = PathFindingManager.Instance.IsConnected(pos, target); * * _CanNavigateTo = PathFindingManager.Instance.CanNavigateTo(pos, target, polyPickExt); * * _IsCollideByObstacle = PathFindingManager.Instance.IsCollideWithBlockable(pos, target); * * //_FindFirstConnectedPoint = PathFindingManager.Instance.FindFirstConnectedPoint(pos, target, polyPickExt, 1.0f, out _FirstConnectedPoint); * } * */ #endif try { float dt = Time.deltaTime; _TimerList.Tick(true); Main.Tick(dt); InputManager.Instance.Tick(dt); CLogicObjectMan <ObjectBehaviour> .Instance.Tick(dt); CLogicObjectMan <EntityEffectComponent> .Instance.Tick(dt); LuaScriptMgr.Instance.Tick(dt); CGameSession.Instance().Tick(dt); UISfxBehaviour.Tick(dt); CFxCacheMan.Instance.Tick(dt); DynamicEffectManager.Instance.Tick(dt); //_SoundMan.Tick(dt); VideoManager.Tick(dt); CDebugUIMan.Instance.Tick(dt); } catch (LuaScriptException e) { HobaDebuger.LogErrorFormat("LuaScriptException: {0}", e.Message); } catch (Exception e) { HobaDebuger.LogErrorFormat("{0}\n{1}", e.Message, e.StackTrace); } }