//------------------------------------------------------------------------------------------------------------------------ // Step() //------------------------------------------------------------------------------------------------------------------------ internal void Step() { Sound.Step(); if (OnBeforeStep != null) { OnBeforeStep(); } _updateManager.Step(); _collisionManager.Step(); if (OnAfterStep != null) { OnAfterStep(); } }
//------------------------------------------------------------------------------------------------------------------------ // Step() //------------------------------------------------------------------------------------------------------------------------ internal void Step() { Sound.Step(); _timeAccumulator += Time.deltaTime; if (_timeAccumulator > 1000) { _timeAccumulator = 0; //safety } if (_timeAccumulator >= FRAMETIME) { _timeAccumulator -= FRAMETIME; _updateManager.Step(); _collisionManager.Step(); } }