Class BaseFriendlyEntityConfig
java.lang.Object
com.csse3200.game.entities.configs.BaseEntityConfig
com.csse3200.game.entities.configs.BaseFriendlyEntityConfig
- Direct Known Subclasses:
PlayerConfig
Defines a basic set of properties stored in entities config files to be loaded by Entity Factories.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String[][]
int
int
protected String[]
protected String
Fields inherited from class com.csse3200.game.entities.configs.BaseEntityConfig
animationSpeed, defense, experience, health, hunger, isEnemy, isPlayer, speed
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the animal for this entity.float
Returns the animation speed for this entity.int
Returns the base attack value of this entity.String[][]
Returns the base hint messages for this entity.int
Retrieves the defense attribute of the entity.int
Retrieves the experience points of the entity.int
Returns the health value of this entity.getHints()
int
Retrieves the current hunger level of the entity.float
Retrieves the item drop probability of the entity.int
getLevel()
Retrieves the current level of the entity.String[]
Returns the paths to the sound files associated with this entity.int
getSpeed()
Retrieves the speed attribute of the entity.Returns the path to the sprite image for this entity.int
Retrieves the strength attribute of the entity.isBoss()
Determines if the entity is a boss.void
Restarts the current hint by resetting the current hint and line indices.void
setBaseAttack
(int baseAttack) Sets the base attack value for the entity.void
setDefense
(int defense) Sets the defense attribute of the entity.void
setExperience
(int experience) Sets the experience points for the entity.void
setHealth
(int health) Sets the health of the entity.void
void
setHunger
(int hunger) Sets the hunger level of the entity.void
Sets an entity to be identified as a boss.void
setItemProbability
(float newProbability) Sets the item drop probability of an entity.void
setLevel
(int level) Sets the level of the entity.void
setSoundPath
(String[] soundPath) Sets the sound paths for this entity.void
setSpeed
(int speed) Sets the speed attribute of the entity.void
setSpritePath
(String spritePath) Sets the sprite path for this entity.void
setStrength
(int strength) Sets the strength attribute of the entity.Methods inherited from class com.csse3200.game.entities.configs.BaseEntityConfig
isFriendly, setFriendly
-
Field Details
-
hintLevel
public int hintLevel -
currentHint
public int currentHint -
animalName
-
baseHint
-
spritePath
-
soundPath
-
-
Constructor Details
-
BaseFriendlyEntityConfig
protected BaseFriendlyEntityConfig()
-
-
Method Details
-
getSpritePath
Returns the path to the sprite image for this entity.- Overrides:
getSpritePath
in classBaseEntityConfig
- Returns:
- the sprite path as a String.
-
setSpritePath
Sets the sprite path for this entity.- Parameters:
spritePath
- the path to the sprite image.
-
getAnimationSpeed
public float getAnimationSpeed()Returns the animation speed for this entity.- Overrides:
getAnimationSpeed
in classBaseEntityConfig
- Returns:
- the animation speed as a float.
-
getSoundPath
Returns the paths to the sound files associated with this entity.- Overrides:
getSoundPath
in classBaseEntityConfig
- Returns:
- an array of String representing the sound paths.
-
setSoundPath
Sets the sound paths for this entity.- Parameters:
soundPath
- an array of String representing the new sound paths.
-
getHealth
public int getHealth()Returns the health value of this entity.- Returns:
- the health value as an int.
-
getAnimalName
Returns the name of the animal for this entity.- Returns:
- the animal name as a String.
-
getBaseAttack
public int getBaseAttack()Returns the base attack value of this entity.- Returns:
- the base attack value as an int.
-
getBaseHint
Returns the base hint messages for this entity.- Returns:
- an array of String containing the base hints.
-
getHints
-
setHints
-
restartCurrentHint
public void restartCurrentHint()Restarts the current hint by resetting the current hint and line indices. -
setHealth
public void setHealth(int health) Sets the health of the entity.- Parameters:
health
- the new health value to set.
-
getHunger
public int getHunger()Retrieves the current hunger level of the entity.- Returns:
- the current hunger level.
-
setHunger
public void setHunger(int hunger) Sets the hunger level of the entity.- Parameters:
hunger
- the new hunger level to set.
-
setBaseAttack
public void setBaseAttack(int baseAttack) Sets the base attack value for the entity.- Parameters:
baseAttack
- the new base attack value to set.
-
getStrength
public int getStrength()Retrieves the strength attribute of the entity.- Returns:
- the current strength value.
-
setStrength
public void setStrength(int strength) Sets the strength attribute of the entity.- Parameters:
strength
- the new strength value to set.
-
getDefense
public int getDefense()Retrieves the defense attribute of the entity.- Returns:
- the current defense value.
-
setDefense
public void setDefense(int defense) Sets the defense attribute of the entity.- Parameters:
defense
- the new defense value to set.
-
getSpeed
public int getSpeed()Retrieves the speed attribute of the entity.- Returns:
- the current speed value.
-
setSpeed
public void setSpeed(int speed) Sets the speed attribute of the entity.- Parameters:
speed
- the new speed value to set.
-
getExperience
public int getExperience()Retrieves the experience points of the entity.- Returns:
- the current experience points.
-
setExperience
public void setExperience(int experience) Sets the experience points for the entity.- Parameters:
experience
- the new experience points to set.
-
getItemProbability
public float getItemProbability()Retrieves the item drop probability of the entity.- Returns:
- the probability of an item drop occurring.
-
setItemProbability
public void setItemProbability(float newProbability) Sets the item drop probability of an entity.- Parameters:
newProbability
- the new item probability
-
isBoss
Determines if the entity is a boss.- Returns:
true
if the entity is a boss,false
otherwise.
-
setIsBoss
Sets an entity to be identified as a boss. -
getLevel
public int getLevel()Retrieves the current level of the entity.- Returns:
- the current level.
-
setLevel
public void setLevel(int level) Sets the level of the entity.- Parameters:
level
- the new level to set.
-