示例#1
0
文件: Brick.cs 项目: Natman64/JamLib
        public Brick(Texture2D texture, Vector2 location, Wall wall, int lane, int height)
        {
            this.texture = texture;
            this.location = location;

            velocity = new Vector2(0, 200);

            this.wall = wall;
            this.lane = lane;
            this.height = height;
        }
示例#2
0
文件: Game1.cs 项目: Natman64/JamLib
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            brickTexture = Content.Load<Texture2D>("Brick");
            playerTexture = Content.Load<Texture2D>("Player");
            monsterTexture = Content.Load<Texture2D>("Monster");
            bulletTexture = Content.Load<Texture2D>("Bullet");

            player = new Player(playerTexture, bulletTexture, new Vector2(ScreenHelper.Viewport.Width / 2 - playerTexture.Width / 2, ScreenHelper.Viewport.Height - playerTexture.Height));
            wall = new Wall(13, -1);

            camera = new Camera(GraphicsDevice);
        }