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 TypeMethodDescriptionboolean
apply
(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:
apply
in interfaceItemEffectHandler
- Parameters:
player
- the entity to heal (must have aCombatStatsComponent
)cfg
- the effect configuration containing the heal value- Returns:
true
if the effect was successfully applied, otherwisefalse
-