Package com.csse3200.game.components
Class TagComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.TagComponent
Component which can be used to assign a "tag" to an entity, thus allowing its category
to be identified
eg. A pistol entity can be given the tag "ranged", which allows it to be identified as a
ranged weapon, utilising different logic than melee weapons
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, getPrio, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
TagComponent
Tag component constructor- Parameters:
tag
- a string assigned to the entity
-
-
Method Details
-
getTag
Gives the entity's tag- Returns:
- tag
-