Пример #1
0
        public void EnemySpawnAdvanced(Vector2 pos, Vector2 dir, float speed, int health, int score)
        {

            Enemy AdvancedEnemy = new Enemy();

            Vector2 dirtoscreen = dir - pos;
            dirtoscreen.Normalize();

            AdvancedEnemy.Texture = "graphics/gameplay/enemies/biplane_ea";
            AdvancedEnemy.position = pos;
            AdvancedEnemy.direction = dirtoscreen;
            AdvancedEnemy.MaxHealth = health;
            AdvancedEnemy.Health = AdvancedEnemy.MaxHealth;
            AdvancedEnemy.score = score;
            AdvancedEnemy.speed = speed;
            AdvancedEnemy.Width = 64;
            AdvancedEnemy.Height = 55;


            enemy.Add(AdvancedEnemy);
        }
Пример #2
0
        //---------------------------------------------------------------//
        //--------------------------//Enemy Types//----------------------//
        //---------------------------------------------------------------//

        public void EnemySpawnBasic(float Xpos, float Xdir, bool Canshoot)
        {
            Enemy BasicEnemy = new Enemy();

            Vector2 pos = new Vector2(Xpos, AboveScreen);
            Vector2 dir = new Vector2(Xdir, BelowScreen);
            Vector2 dirtoscreen = dir - pos;
            dirtoscreen.Normalize();

            BasicEnemy.Texture = "graphics/gameplay/enemies/biplane_e";
            BasicEnemy.position = pos;
            BasicEnemy.direction = dirtoscreen;
            BasicEnemy.MaxHealth = 25;
            BasicEnemy.Health = BasicEnemy.MaxHealth;
            BasicEnemy.score = 50;
            BasicEnemy.speed = 2f;
            BasicEnemy.Width = 48;
            BasicEnemy.Height = 37;
            BasicEnemy.EnemyHasWeapon = Canshoot;
            BasicEnemy.WeaponFireDir = new Vector2(player.player.sprite_pos.X, 800);
            BasicEnemy.WeaponFireRate = 150;
            BasicEnemy.BulletSpeed = 5f;
            BasicEnemy.BulletDamage = 5;

            enemy.Add(BasicEnemy);
        }