Class Fortress


  • public class Fortress
    extends Entity
    Static hostile Entity. Fires at the player when within its radius.
    Author:
    • Constructor Detail

      • Fortress

        public Fortress​(com.badlogic.gdx.math.Vector2 spawnPos,
                        com.badlogic.gdx.graphics.Texture fortressTexture,
                        com.badlogic.gdx.graphics.Texture deadTexture,
                        com.badlogic.gdx.math.Vector2 size)
        Parameters:
        spawnPos -
        fortressTexture -
        deadTexture -
        size -
    • Method Detail

      • die

        public void die()
        Removes from active pool and displays destroyed state
        Overrides:
        die in class GameObject
      • applyDamage

        public void applyDamage​(float damage)
        Apply x amount of damage to the entity Updates the health bar
        Overrides:
        applyDamage in class Entity
        Parameters:
        damage - Amount of damage to inflict on the Entity
      • update

        public void update()
        Description copied from class: Entity
        Method is called every frame (If added to the gameobjects list in GameScreen)
        Overrides:
        update in class Entity