Class PlayerEquipComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.player.PlayerEquipComponent
A component that makes an item follow the player at a given offset.
-
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
-
Constructor Details
-
PlayerEquipComponent
public PlayerEquipComponent()
-
-
Method Details
-
update
public void update()Updates the item's position so it follows the player -
setItem
This function replaces the currently equipped item with a new one- Parameters:
item
- The entity created of the item that needs to be equippedoffset
- Where from the players current position to draw the weapon
-