Inheritance: 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
ファイル: Bullet2PhysicsSystem.cs プロジェクト: nesrak1/xenko
 public override void Initialize()
 {
     physicsConfiguration = Game?.Settings != null?Game.Settings.Configurations.Get <PhysicsSettings>() : new PhysicsSettings();
 }