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, imageIndexFields 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, moveMethods 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:EntityInitializes the base texture.- Specified by:
initTexturein 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:AnimalSet the current animal's sprite.- Specified by:
setCurrentAnimalImagein classAnimal
-
getPoint
public int getPoint()Description copied from class:AnimalGets the points of the animal.
-