Class ItemHoldComponent

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

public class ItemHoldComponent extends Component
A component that makes an item follow the player at a given offset.
  • Constructor Details

    • ItemHoldComponent

      public ItemHoldComponent(Entity player, com.badlogic.gdx.math.Vector2 offset)
  • Method Details

    • update

      public void update()
      Updates the item's position so it follows the player
      Overrides:
      update in class Component