private void UpdateWorld() { long curTicks = DateTime.Now.Ticks; float timeDelta = ( float )(curTicks - prevTicks) / TimeSpan.TicksPerSecond; input.Poll(); if (inputGrabbed) { camera.Update(timeDelta); Cursor.Position = grabbedAtPosition; } prevTicks = curTicks; }
public void Update(float delta) { time += delta; input.Poll(); fpsCamera.Update(delta); if (!visibilityFixed) { numVisibleFaces = map.FindVisibleFaces(fpsCamera, visibleFaces); QSortFaces(0, numVisibleFaces - 1); } if (shaderEnabled && effect != null) { effect.SetValue(EffectHandle.FromString("Time"), time); } }