コード例 #1
0
        public GameWorld(BubbleBobbleGame game)
        {
            _content        = game.Content;
            _spriteBatch    = game.SpriteBatch;
            _graphicsDevice = game.GraphicsDevice;
            _gameInput      = game.GameInput;
            _camera         = new Camera2D(_graphicsDevice);

            // Creates the farseer world with a gravity
            _world = new World(new Vector2(0, 20));

            _timeStep = (float)game.TargetElapsedTime.TotalSeconds;

            // Setup the debug view
            _debugView = new DebugViewXNA(_world);
            _debugView.AppendFlags(DebugViewFlags.Shape);
            _debugView.AppendFlags(DebugViewFlags.PolygonPoints);
            _debugView.AppendFlags(DebugViewFlags.CenterOfMass);
        }
コード例 #2
0
ファイル: GameWorld.cs プロジェクト: 925coder/NDC2014
        public GameWorld(BubbleBobbleGame game)
        {
            _content = game.Content;
            _spriteBatch = game.SpriteBatch;
            _graphicsDevice = game.GraphicsDevice;
            _gameInput = game.GameInput;
            _camera = new Camera2D(_graphicsDevice);

            // Creates the farseer world with a gravity
            _world = new World(new Vector2(0, 20));

            _timeStep = (float)game.TargetElapsedTime.TotalSeconds;

            // Setup the debug view
            _debugView = new DebugViewXNA(_world);
            _debugView.AppendFlags(DebugViewFlags.Shape);
            _debugView.AppendFlags(DebugViewFlags.PolygonPoints);
            _debugView.AppendFlags(DebugViewFlags.CenterOfMass);
        }