Class AddObjective
java.lang.Object
com.csse3200.game.components.collectables.effects.AddObjective
- All Implemented Interfaces:
ItemEffectHandler
An item effect that adds an objective to the OBJECTIVES bag
and triggers an "objectiveCollected" event.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(Entity player, EffectConfig cfg) Apply a single effect to the player.
-
Constructor Details
-
AddObjective
public AddObjective()
-
-
Method Details
-
apply
Description copied from interface:ItemEffectHandlerApply a single effect to the player.- Specified by:
applyin interfaceItemEffectHandler- Parameters:
player- the player entitycfg- the effect configuration containing effect parameters- Returns:
trueif the effect was successfully applied;falseotherwise
-