Esempio n. 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.");
 }
Esempio n. 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);
        }
Esempio n. 3
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." );
 }
Esempio n. 4
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 );
 }