Наследование: Configuration
Пример #1
0
        public override void Initialize()
        {
            physicsConfiguration = Game?.Settings != null?Game.Settings.Configurations.Get <PhysicsSettings>() : new PhysicsSettings();

            if (isMultithreaded)
            {
                doUpdateEvent              = new ManualResetEventSlim(false);
                runThread                  = true;
                physicsThread              = new Thread(new ThreadStart(PhysicsProcessingThreadBody));
                physicsThread.Name         = "BulletPhysics Processing Thread";
                physicsThread.IsBackground = true;
                physicsThread.Start();
            }
        }
Пример #2
0
        public override void Initialize()
        {
            physicsConfiguration = Game?.Settings != null?Game.Settings.Configurations.Get <PhysicsSettings>() : new PhysicsSettings();

            MaximumSimulationTime = physicsConfiguration.FixedTimeStep;
            EntityManager.preventPhysicsProcessor = physicsConfiguration.OnlyUseBepu;

            if (isMultithreaded)
            {
                doUpdateEvent              = new ManualResetEventSlim(false);
                runThread                  = true;
                physicsThread              = new Thread(new ThreadStart(PhysicsProcessingThreadBody));
                physicsThread.Name         = "BulletPhysics Processing Thread";
                physicsThread.IsBackground = true;
                simulationThread           = physicsThread;
                physicsThread.Start();
            }
            else
            {
                simulationThread = Thread.CurrentThread;
            }
        }
Пример #3
0
 public override void Initialize()
 {
     physicsConfiguration = Game?.Settings != null?Game.Settings.Configurations.Get <PhysicsSettings>() : new PhysicsSettings();
 }