Package model.itemesAndRewards
Class BubbleRewardModel
java.lang.Object
model.itemesAndRewards.ItemModel
model.itemesAndRewards.BubbleRewardModel
Represents a bubble reward item in the game.
The `BubbleRewardModel` class extends the ItemModel class and represents a specific type of item
that provides rewards to the player.
-
Field Summary
Fields inherited from class model.itemesAndRewards.ItemModel
active, collected, deSpawning, deSpawnTimer, hitbox, itemType, timer, x, y -
Constructor Summary
ConstructorsConstructorDescriptionBubbleRewardModel(int x, int y, Constants.Items.BubbleRewardType bubbleRewardType) Constructs a new BubbleRewardModel with the specified position and reward type. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds points to the player's score based on the type of bubble reward.voidApplies the effect of the item to the player.Returns the type of bubble reward.Methods inherited from class model.itemesAndRewards.ItemModel
deactivateItem, getHitbox, getItemType, initHitbox, isActive, isCollected, isDeSpawning, setCollected, update
-
Constructor Details
-
BubbleRewardModel
Constructs a new BubbleRewardModel with the specified position and reward type.- Parameters:
x- the x-coordinate of the rewardy- the y-coordinate of the rewardbubbleRewardType- the type of bubble reward
-
-
Method Details
-
addPoints
public void addPoints()Adds points to the player's score based on the type of bubble reward. -
applyEffect
public void applyEffect()Applies the effect of the item to the player.Note: Bubble rewards do not apply effects to the player.
- Specified by:
applyEffectin classItemModel
-
getBubbleRewardType
Returns the type of bubble reward.- Returns:
- the type of bubble reward
-