Beispiel #1
0
        public void Update()
        {
            lock (UpdateLock)
            {
                var tries = 5;
                try
                {
                    if (_reindexStatic)
                    {
                        _space.ReindexStatic();
                        _reindexStatic = false;
                    }

                    _space.Step(Game.TickDurationMs * 0.001f);

                    AssureLimits();
                    RecheckCollisions();
                }
                catch (Exception exception)
                {
                    Log.Error(exception);
                    tries--;
                    if (tries <= 0)
                    {
                        throw;
                    }
                }
            }
        }