Class HealEffect
java.lang.Object
com.csse3200.game.components.collectables.effects.HealEffect
- All Implemented Interfaces:
ItemEffectHandler
An item effect that restores health to the player.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(Entity player, EffectConfig cfg) Applies the heal effect to the given player entity.
-
Constructor Details
-
HealEffect
public HealEffect()
-
-
Method Details
-
apply
Applies the heal effect to the given player entity.- Specified by:
applyin interfaceItemEffectHandler- Parameters:
player- the entity to heal (must have aCombatStatsComponent)cfg- the effect configuration containing the heal value- Returns:
trueif the effect was successfully applied, otherwisefalse
-