Class ItemUsageContext
java.lang.Object
com.csse3200.game.inventory.items.ItemUsageContext
Represents the context containing inputs for using an item.
Note - when creating a new context, the number of inputs must be specified.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty context (used for items which require no inputs).ItemUsageContext
(Entity player) Context used for using an item on a player -
Method Summary
Modifier and TypeMethodDescriptionint
Find number of inputs of a context (used for testing)
-
Field Details
-
player
-
-
Constructor Details
-
ItemUsageContext
public ItemUsageContext()Empty context (used for items which require no inputs). -
ItemUsageContext
Context used for using an item on a player- Parameters:
player
- the player to use the item on.
-
-
Method Details
-
getNumInputs
public int getNumInputs()Find number of inputs of a context (used for testing)
-