Class ItemActions
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.items.ItemActions
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, read, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update, write
-
Constructor Details
-
ItemActions
public ItemActions()
-
-
Method Details
-
create
public void create()Description copied from class:Component
Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished. -
use
Uses the item at the given position- Parameters:
player
- the player entity using the itemmousePos
- the position of the mouse- Returns:
- if interaction with tile was success return true else return false.
-
eat
Eats a given food item or power modifier- Parameters:
player
- the player entity
-