public class Enemies
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) float |
animationFrame |
(package private) Pixmap |
currentEnemyPixmap |
(package private) int |
currentHealth |
static int |
FIRE |
static int |
FLUTE |
static int |
GRASS |
(package private) int |
hit |
(package private) boolean |
hitAnimation |
int |
initialX |
int |
initialY |
(package private) int |
maxHealth |
(package private) int |
moneyYearn |
(package private) java.lang.String |
monsterName |
static int |
WATER |
int |
X |
int |
Y |
Constructor and Description |
---|
Enemies(int Type)
The class constructor is initialising the basic fields of the class
|
Modifier and Type | Method and Description |
---|---|
void |
Draw(Graphics g)
This draw method which is called on the main game's present method, is drawing the Pixmap of the current monster, its name and its health points
|
void |
Update(World world)
This update method is called on the main update method of the program and it is responsible to drawing the hit animation of each monster
|
public static final int FIRE
public static final int GRASS
public static final int FLUTE
public static final int WATER
public int X
public int Y
public int initialX
public int initialY
float animationFrame
boolean hitAnimation
java.lang.String monsterName
int moneyYearn
Pixmap currentEnemyPixmap
int hit
int maxHealth
int currentHealth
public Enemies(int Type)
public void Draw(Graphics g)
public void Update(World world)