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; }
/// <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); }