예제 #1
0
        public Player(ArcadeFlyerGame root, Vector2 position)
        {
            this.root        = root;
            this.position    = position;
            this.spriteWidth = 128.0f;

            LoadContent();
        }
예제 #2
0
        public Bullet(ArcadeFlyerGame root, Vector2 position)
        {
            this.root        = root;
            this.position    = position;
            this.bulletWidth = 12.8f;

            LoadContent();
        }
예제 #3
0

        
예제 #4
0
        public FieldBounds(ArcadeFlyerGame root)
        {
            this.root = root;

            Rectangle Boundaries           = new Rectangle(0, 0, root.ScreenWidth, root.ScreenHeight);
            Rectangle ScreenBoundaries     = new Rectangle(0, 0, root.ScreenWidth, root.ScreenHeight);
            Vector2   OriginalScreenMiddle = new Vector2(root.ScreenWidth / 2, root.ScreenHeight / 2);
        }
예제 #5
0
        public Enemy(ArcadeFlyerGame root, Vector2 position) : base(position)
        {
            this.root        = root;
            this.position    = position;
            this.SpriteWidth = 128.0f;
            this.velocity    = new Vector2(-1.0f, 5.0f);

            LoadContent();
        }
예제 #6
0
        public dPower(ArcadeFlyerGame root, Vector2 position) : base(position)
        {
            this.root               = root;
            this.position           = position;
            this.SpriteWidth        = 50.0f;
            this.velocity           = new Vector2(-4.0f, 8.0f);
            this.projectileCoolDown = new Timer(1.0f);

            LoadContent();
        }
예제 #7
0
        public Boss(ArcadeFlyerGame root, Vector2 position) : base(position)
        {
            this.root               = root;
            this.position           = position;
            this.SpriteWidth        = 800.0f;
            this.velocity           = new Vector2(-1.0f, 1.0f);
            this.projectileCoolDown = new Timer(0.05f);

            LoadContent();
        }
예제 #8
0
        public Player(ArcadeFlyerGame root, Vector2 position) : base(position)
        {
            this.root        = root;
            this.position    = position;
            this.SpriteWidth = 100.0f;

            projectileCoolDown = new Timer(0.5f);

            LoadContent();
        }
예제 #9
0
        // Initialize an enemy
        public Enemy(ArcadeFlyerGame root, Vector2 position)
        {
            // Initialize values
            this.root        = root;
            this.position    = position;
            this.spriteWidth = 128.0f;
            this.velocity    = new Vector2(-1.0f, 5.0f);

            // Load the content for this enemy
            LoadContent();
        }
예제 #10
0
        public Player(ArcadeFlyerGame root, Vector2 position) : base(position)
        {
            this.root        = root;
            this.Position    = position;
            this.SpriteWidth = 100.0f;


            //cooldownTimer = new Timer(0.5f);

            LoadContent();
        }
예제 #11
0
        // Initialize an enemy
        public Enemy(ArcadeFlyerGame root, Vector2 position, EnemyType enemyType) : base(position)
        {
            // Initialize values
            this.root        = root;
            this.position    = position;
            this.SpriteWidth = 64.0f;
            this.EnemyType   = enemyType;

            switch (EnemyType)
            {
            case EnemyType.Wizard:
                speed              = 3;
                SpriteWidth        = 64.0f;
                health             = 1;
                projectileCooldown = new Timer(1.0f);
                break;

            case EnemyType.Boss:
                speed              = 3;
                health             = 15;
                SpriteWidth        = 96.0f;
                projectileCooldown = new Timer(0.33f);
                break;

            default:
                speed = 2;
                break;
            }

            /*
             * var rand = new System.Random();
             * int randVelocityX = rand.Next(-4,-1);
             * int randVelocityY = rand.Next(-3,5);
             * while(randVelocityY == 0)
             * {
             *  randVelocityY = rand.Next(-3,5);
             * }
             * this.velocity = new Vector2(randVelocityX, randVelocityY);
             * //this.velocity = new Vector2(-1.0f, 2.0f); //Original Default Speed
             */

            // Load the content for this enemy
            LoadContent();
        }
예제 #12
0
 static void Main()
 {
     using (var game = new ArcadeFlyerGame())
         game.Run();
 }
예제 #13
0
 public Camera(ArcadeFlyerGame root)
 {
     this.root = root;
 }