コード例 #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
ファイル: dPower.cs プロジェクト: C-M-Hanley/ArcadeFlyer
        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
ファイル: Boss.cs プロジェクト: C-M-Hanley/ArcadeFlyer
        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
ファイル: Enemy.cs プロジェクト: JC-Giga/ArcadeFlyer
        // 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
ファイル: Program.cs プロジェクト: woollybears/ArcadeFlyer
 static void Main()
 {
     using (var game = new ArcadeFlyerGame())
         game.Run();
 }
コード例 #13
0
ファイル: Camera.cs プロジェクト: vmjauregui3/ArcadeFlyer
 public Camera(ArcadeFlyerGame root)
 {
     this.root = root;
 }