Example #1
0
        public Player(PlaneGame game, BasePlane plane) : base(game)
        {
            // Game Reference
            _plGame = game;

            // The Plane
            Plane = plane;
        }
Example #2
0
        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);
        }
Example #3
0
        public BaseState(PlaneGame game) : base(game)
        {
            // Save Game Reference
            this.plGame = game;

            // Create Unique ID
            Random rand = new Random();

            ID = rand.Next();
        }
Example #4
0
        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;
        }
Example #5
0
        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);
        }
Example #6
0
 static void Main()
 {
     using (var game = new PlaneGame())
         game.Run();
 }
Example #7
0
 public PlayState(PlaneGame game) : base(game)
 {
 }
Example #8
0
 public MainMenuState(PlaneGame game) : base(game)
 {
 }
Example #9
0
 public BasePlane(PlaneGame game, float x, float y) : base(game, x, y)
 {
 }
Example #10
0
 public Base2D(PlaneGame game, float x, float y) : base(game)
 {
     plGame    = game;
     Position  = new Vector2(x, y);
     DrawColor = Color.White;
 }