public static void LateUpdate() { #if _USE_BEPU_PHYSICS for (byte worldId = 0; worldId < sInstance.Length; ++worldId) { World world = sInstance[worldId]; world.space.Update(); for (int i = 0, c = world.mGameObjects.Count; i < c; ++i) { NetGameObject go = world.mGameObjects[i]; if (!go.DoesWantToDie()) { go.LateUpdate(); } } } #elif _USE_BULLET_SHARP for (byte worldId = 0; worldId < sInstance.Length; ++worldId) { World world = sInstance[worldId]; world.world.StepSimulation(Timing.sInstance.GetDeltaTime()); //BulletSharp.Math.Matrix trans; //world.floor.GetWorldTransform(out trans); //LogHelper.LogInfo($"floor {trans.ToString()}, {world.floor.CollisionShape}"); for (int i = 0, c = world.mGameObjects.Count; i < c; ++i) { NetGameObject go = world.mGameObjects[i]; if (!go.DoesWantToDie()) { go.LateUpdate(); } } } #elif _USE_BEPU_PHYSICS_V2 for (byte worldId = 0; worldId < sInstance.Length; ++worldId) { World world = sInstance[worldId]; world.Simulation.Timestep(Timing.sInstance.GetDeltaTime()); for (int i = 0, c = world.mGameObjects.Count; i < c; ++i) { NetGameObject go = world.mGameObjects[i]; if (!go.DoesWantToDie()) { go.LateUpdate(); } } } #endif }
public static void LateUpdate() { #if _USE_BEPU_PHYSICS for (byte worldId = 0; worldId < sInstance.Length; ++worldId) { World world = sInstance[worldId]; world.space.Update(); for (int i = 0, c = world.mGameObjects.Count; i < c; ++i) { NetGameObject go = world.mGameObjects[i]; if (!go.DoesWantToDie()) { go.LateUpdate(); } } } #endif }