示例#1
0
 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
        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);
        }
示例#3
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." );
 }
示例#4
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 );
 }