public Brick(BrokededAut game, Level level, byte index, int x, int y) : base(game) { _game = game; _level = level; Color[] colors = new Color[] { Color.DarkMagenta, Color.Yellow, Color.Blue, Color.Red, Color.Green, Color.Gray }; _color = colors[index]; _position = new Vector2(x, y); _spiteBatch = new SpriteBatch(_game.GraphicsDevice); Score = 100 * (index + 1); // TODO set this depending on which brick exactly that we represent Width = Config.Brick.Width; Height = Config.Brick.Height; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (BrokededAut game = new BrokededAut()) { game.Run(); } }
public Ball(BrokededAut game) : base(game) { _game = game; _spriteBatch = new SpriteBatch(_game.GraphicsDevice); _texture = _game.Content.Load<Texture2D>("Ball"); }
public Brick(BrokededAut game, float x, float y, int index) : base(game) { _game = game; _texture = _game.Content.Load<Texture2D>("Brick"); _position = new Vector2(x, y); _index = index; Dead = false; _spriteBatch = new SpriteBatch(_game.GraphicsDevice); }
public Pad(BrokededAut game) : base(game) { _game = game; _position = new Vector2( _game.GraphicsDeviceManager.PreferredBackBufferWidth / 2 - PAD_DEFAULT_WIDTH / 2, _game.GraphicsDeviceManager.PreferredBackBufferHeight - PAD_DEFAULT_HEIGHT * 4 ); _dimension = new Vector2(PAD_DEFAULT_WIDTH, PAD_DEFAULT_HEIGHT); _texture = _game.Content.Load<Texture2D>("Pad"); _spriteBatch = new SpriteBatch(_game.GraphicsDevice); }
public Level(BrokededAut game) { _game = game; }
public Ball(BrokededAut game) : base(game) { _game = game; }