예제 #1
0
 public Enemy_Melee(Vector2 pos)
 {
     sprite        = new Sprite(Game1.textureMap["enemy3"], pos, 0.0f);
     sprite.origin = new Vector2(sprite.texture.Width / 2.0f, sprite.texture.Height / 2.0f);
     ranged        = false;
     isAlive       = true;
     health        = 120;
     maxHealth     = 120;
     moveSpeed     = 400.0f;
     isChasing     = false;
     hpBar         = new Healthbar(new Vector2(40.0f, 10.0f), Color.DarkRed, Color.DarkGray);
     hpBar.health  = health;
     attackTarget  = null;
     value         = 100;
 }
예제 #2
0
        public Enemy_Exploder(Vector2 pos)
        {
            sprite        = new Sprite(Game1.textureMap["enemy4"], pos, 0.0f);
            sprite.origin = new Vector2(sprite.texture.Width / 2.0f, sprite.texture.Height / 2.0f);
            ranged        = false;
            isAlive       = true;
            isChasing     = false;
            health        = 150;
            maxHealth     = 150;
            moveSpeed     = 250.0f;
            hpBar         = new Healthbar(new Vector2(40.0f, 10.0f), Color.DarkRed, Color.DarkGray);
            hpBar.health  = health;
            attackTarget  = null;
            attackRange   = 100.0f;
            visionRange   = 500.0f;
            value         = 150;
            suicide       = false;

            damage = 200;
        }
예제 #3
0
        public Enemy_Shooter(Vector2 pos)
        {
            sprite        = new Sprite(Game1.textureMap["enemy1"], pos, 0.0f);
            sprite.origin = new Vector2(sprite.texture.Width / 2.0f, sprite.texture.Height / 2.0f);
            ranged        = true;
            isAlive       = true;
            isChasing     = false;
            health        = 300;
            maxHealth     = 300;
            moveSpeed     = 250.0f;
            hpBar         = new Healthbar(new Vector2(40.0f, 10.0f), Color.DarkRed, Color.DarkGray);
            hpBar.health  = health;
            attackTarget  = null;
            attackRange   = 400.0f;
            visionRange   = 550.0f;
            value         = 200;

            damage    = 30;
            fireRate  = 2.0f;
            lastFired = -100000.0f;
        }
예제 #4
0
파일: Car.cs 프로젝트: ebosnjak/Weaponized
        public Car(Sprite spr, int idx, Car pull, int hp = 500)
        {
            sprite       = spr;
            index        = idx;
            pulledBy     = pull;
            health       = hp;
            maxHealth    = hp;
            isDestroyed  = false;
            isBoosted    = false;
            isInvincible = false;
            isAttached   = false;

            hpBar        = new Healthbar(new Vector2(100.0f, 8.0f), Color.SpringGreen, Color.DarkGray);
            hpBar.health = health;

            reloadBar           = new Healthbar(new Vector2(80.0f, 8.0f), Color.Yellow, Color.DarkGray);
            reloadBar.health    = 0;
            reloadBar.maxHealth = 100;

            weaponPos = Vector2.Zero;

            weapon = new Weapon_MachineGun();
            weapon.sprite.anchor = weaponPos;
            weapon.sprite.parent = sprite;
            weapon.owner         = this;

            defaultTopSpeed    = 300.0f;
            defaultTopSpeedRev = 150.0f;
            topSpeed           = 300.0f;
            topSpeedReverse    = 150.0f;
            acceleration       = 0.0f;
            speed          = 0.0f;
            remainingBoost = 0.0f;
            remainingInv   = 0.0f;

            isPowered = false;
        }