Package com.dicycat.kroy.entities
Class Fortress
- java.lang.Object
-
- com.dicycat.kroy.GameObject
-
- com.dicycat.kroy.entities.Entity
-
- com.dicycat.kroy.entities.Fortress
-
public class Fortress extends Entity
Static hostile Entity. Fires at the player when within its radius.- Author:
-
-
Constructor Summary
Constructors Constructor Description 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)
-
Method Summary
Modifier and Type Method Description void
applyDamage(float damage)
Apply x amount of damage to the entity Updates the health barvoid
die()
Removes from active pool and displays destroyed statevoid
update()
Method is called every frame (If added to the gameobjects list in GameScreen)-
Methods inherited from class com.dicycat.kroy.entities.Entity
getHealthPoints, isAlive
-
Methods inherited from class com.dicycat.kroy.GameObject
changePosition, getCentre, getHeight, getOriginX, getOriginY, getPosition, getRotation, getSprite, getTexture, getTextureHeight, getTextureWidth, getWidth, getX, getXScale, getY, getYScale, isDisplayable, isRemove, render, setPosition, setRemove, setRotation
-
-
-
-
Method Detail
-
die
public void die()
Removes from active pool and displays destroyed state- Overrides:
die
in classGameObject
-
applyDamage
public void applyDamage(float damage)
Apply x amount of damage to the entity Updates the health bar- Overrides:
applyDamage
in classEntity
- Parameters:
damage
- Amount of damage to inflict on the Entity
-
-