コード例 #1
0
ファイル: Map.cs プロジェクト: fragmer/FemtoCraft
 public void DisablePhysics()
 {
     lock( physicsLock ) {
         sandPhysics = null;
         snowPhysics = null;
         plantPhysics = null;
         waterPhysics = null;
         lavaPhysics = null;
         tickQueue.Clear();
         physicsEnabled = false;
     }
     Logger.Log( "Map: Physics disabled." );
 }
コード例 #2
0
ファイル: Map.cs プロジェクト: fragmer/FemtoCraft
 public void EnablePhysics()
 {
     Stopwatch sw = Stopwatch.StartNew();
     lock( physicsLock ) {
         sandPhysics = new SandPhysics( this );
         snowPhysics = new SnowPhysics( this );
         plantPhysics = new PlantPhysics( this );
         waterPhysics = new WaterPhysics( this );
         lavaPhysics = new LavaPhysics( this );
         physicsEnabled = true;
     }
     sw.Stop();
     Logger.Log( "Map: Physics enabled in {0}ms", sw.ElapsedMilliseconds );
 }