Class TagComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.TagComponent

public class TagComponent extends Component
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
  • Constructor Details

    • TagComponent

      public TagComponent(String tag)
      Tag component constructor
      Parameters:
      tag - a string assigned to the entity
  • Method Details

    • getTag

      public String getTag()
      Gives the entity's tag
      Returns:
      tag