Class ItemComponent
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.items.ItemComponent
public class ItemComponent extends Component
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ItemComponent(Entity target, java.util.function.Consumer<Entity> callback)
creates a first aid component that detects when the player collides with the entity and when collided it runs a buff function for the Item -
Method Summary
Modifier and Type Method Description void
create()
Called when the entity is created and registered.Methods inherited from class com.deco2800.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ItemComponent
creates a first aid component that detects when the player collides with the entity and when collided it runs a buff function for the Item- Parameters:
target
- entity on which the buff function will work on
-
-
Method Details