Package dev.kyzel.game.entity.animal
Class Ghost
java.lang.Object
dev.kyzel.game.entity.Entity
dev.kyzel.game.entity.animal.Animal
dev.kyzel.game.entity.animal.Ghost
- All Implemented Interfaces:
IAttackable
The ghost class.
-
Field Summary
Fields inherited from class dev.kyzel.game.entity.animal.Animal
animalImage, hostileProb, imageIndex
Fields inherited from class dev.kyzel.game.entity.Entity
attackValue, basedSpeed, currentHealthValue, direction, game, healingCounter, hitTick, invincibleCounter, isCursed, knockbackCounter, maxHealingCounter, maxHealthValue, maxHitTick, maxInvincibleCounter, maxKnockbackCounter, previousDirection, render, solidArea, solidAreaDefaultX, solidAreaDefaultY, speed, spriteCounter, state, x, y
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class dev.kyzel.game.entity.animal.Animal
draw, drawHealthBar, getAnimalDirection, move
Methods inherited from class dev.kyzel.game.entity.Entity
collideWithEntity, collideWithPlayer, collideWithTile, cursed, getAttackValue, getDirection, getGame, getHealthValue, getInvincibleCounter, getKnockbackCounter, getMaxHealthValue, getPreviousDirection, getRender, getSolidArea, getSolidAreaDefaultX, getSolidAreaDefaultY, getSpeed, getSwimmingSpeed, getX, getY, healing, increaseImageIndex, inflictDamage, isAlive, isCursed, isDead, isInRange, knockback, setAttackValue, setDirection, setHealthValue, setInvincibleCounter, setKnockbackCounter, setMaxHealthValue, setPreviousDirection, setRender, setSpeed, setX, setY
-
Constructor Details
-
Method Details
-
initTexture
public void initTexture()Description copied from class:Entity
Initializes the base texture.- Specified by:
initTexture
in classEntity
-
update
public void update()Updates the entity. The ghost will curse any entity it goes through. -
setCurrentAnimalImage
public void setCurrentAnimalImage()Description copied from class:Animal
Set the current animal's sprite.- Specified by:
setCurrentAnimalImage
in classAnimal
-
getPoint
public int getPoint()Description copied from class:Animal
Gets the points of the animal.
-