Package com.csse3200.game.components
Class EnvironmentStatsComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.EnvironmentStatsComponent
Component used to store information related to combat such as health, attack, etc. Any entities
which engage in combat should have an instance of this class registered. This class can be
extended for more specific combat needs.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddamage(CombatStatsComponent player) intvoidsetFrozenLevel(int newFrozenLevel) voidsetImmunity(boolean isImmune) Sets the entity's immunity status.Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
EnvironmentStatsComponent
public EnvironmentStatsComponent(int frozenLevel)
-
-
Method Details
-
getFrozenLevel
public int getFrozenLevel() -
setFrozenLevel
public void setFrozenLevel(int newFrozenLevel) -
getImmunity
-
setImmunity
public void setImmunity(boolean isImmune) Sets the entity's immunity status.- Parameters:
isImmune- true to make the entity immune to attacks, false otherwise.
-
damage
-