public Player(PlaneGame game, BasePlane plane) : base(game) { // Game Reference _plGame = game; // The Plane Plane = plane; }
public DebugState(PlaneGame game) : base(game) { _player = new Player(plGame, new TestPlane(plGame, Game.GraphicsDevice.Viewport.Width / 2 - 32, Game.GraphicsDevice.Viewport.Height - 80)); components.Add(_player); _debugPlane = new TestPlane(plGame, Game.GraphicsDevice.Viewport.Width / 2 - 32, Game.GraphicsDevice.Viewport.Height / 2 - 32); components.Add(_debugPlane); }
public BaseState(PlaneGame game) : base(game) { // Save Game Reference this.plGame = game; // Create Unique ID Random rand = new Random(); ID = rand.Next(); }
public Hitbox(PlaneGame game, Base2D component, int width, int height, int offsetX, int offsetY) : base(game) { // Game Reference _plGame = game; // Component _component = component; // Create Rectangle Rectangle = new Rectangle(offsetX, offsetY, width, height); // Show the Rectangle? Visible = true; }
public TestPlane(PlaneGame game, float x, float y) : base(game, x, y) { // Values Health = 100; Speed = 170; // Sprite Sprite = Assets.ImgTestplane; // Hitboxes Hitbox = new Hitbox[2]; Hitbox[0] = new Hitbox(plGame, this, 8, Sprite.Height, 28, 0); Hitbox[1] = new Hitbox(plGame, this, Sprite.Width - 4, 13, 2, 20); }
static void Main() { using (var game = new PlaneGame()) game.Run(); }
public PlayState(PlaneGame game) : base(game) { }
public MainMenuState(PlaneGame game) : base(game) { }
public BasePlane(PlaneGame game, float x, float y) : base(game, x, y) { }
public Base2D(PlaneGame game, float x, float y) : base(game) { plGame = game; Position = new Vector2(x, y); DrawColor = Color.White; }