// Update is called once per frame void Update() { if (m_bCanLoadMap == false) { return; } m_fCurTime = GlobalVarFun.GetTime(); m_fDeltaTime = GlobalVarFun.GetSmoothDeltaTime(); // 地图更新 (包括普通的Collider) if (MapManager.Instance != null) { MapManager.Instance.Update(m_fDeltaTime, m_fCurTime); } // Role更新 TODO if (RoleManager.Instance != null) { RoleManager.Instance.Update(m_fDeltaTime, m_fCurTime); } // 时间事件更新 TODO // 伤害体更新 TODO if (DamageBodyManager.Instance != null) { DamageBodyManager.Instance.Update(m_fDeltaTime, m_fCurTime); } }
// Update is called once per frame void Update() { if (m_bStarted == false) { return; } if (m_fEsTime != -1) { m_fEsTimer = m_fEsTimer + GlobalVarFun.GetSmoothDeltaTime(); if ((m_fEsTimer - m_fEsTime) < GlobalVarFun.FloatCompareRatio) { Destroy(); } } m_fSingleDamageTimer = m_fSingleDamageTimer + GlobalVarFun.GetSmoothDeltaTime(); if ((m_fSingleDamageTimer - m_fSingleDamageTime) < GlobalVarFun.FloatCompareRatio) { m_fSingleDamageTimer = 0; // 造成Damage OnDamage(); } UpdateMove(); }