Class ItemComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.items.ItemComponent
ItemComponent provides the ability to add an Item Type to an Entity for the purpose of
identifying the particular Item an animation Entity is representing.
This Component tags an Entity as an Item and stores its Type.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumerators for the supported Item categories -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ItemComponent with the given Type. -
Method Summary
Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, getPriority, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ItemComponent
Creates a new ItemComponent with the given Type.- Parameters:
type
- the Item type (enumerators)
-
-
Method Details
-
getType
Returns the Item Type associated with the component.- Returns:
- Type type of Item
-