Beispiel #1
0
        public PhysicsBase(Game game)
        {
            this.game = game;
            map       = game.World;
            game.WorldEvents.OnNewMapLoaded += ResetMap;
            game.UserEvents.BlockChanged    += BlockChanged;
            enabled = Options.GetBool(OptionsKey.BlockPhysics, true);

            falling = new FallingPhysics(game, this);
            tnt     = new TNTPhysics(game, this);
            foliage = new FoliagePhysics(game, this);
            liquid  = new LiquidPhysics(game, this);
            other   = new OtherPhysics(game, this);
        }
Beispiel #2
0
        public Physics(Game game)
        {
            this.game = game;
            map       = game.World;
            info      = game.BlockInfo;
            game.WorldEvents.OnNewMapLoaded += ResetMap;
            game.UserEvents.BlockChanged    += BlockChanged;
            enabled = Options.GetBool(OptionsKey.SingleplayerPhysics, true);

            falling = new FallingPhysics(game, this);
            tnt     = new TNTPhysics(game, this);
            foilage = new FoilagePhysics(game, this);
            liquid  = new LiquidPhysics(game, this);
        }