ItemDropper

Inspector Fields

FieldTypeDescription
itemInteractableObject_PickupThe pickup prefab to instantiate at the entity's tile when Drop is called.

Methods

MethodDescription
Drop(ExecutionContext context)Instantiates the item pickup prefab at the grid cell the entity currently occupies. Wire this to the enemy's Health.OnDie event in the Inspector.

ItemUsedFX

Briefly shows the sprite of a used item at a world position. Instantiated by the player's UseItem flow — you do not need to call it directly. The effect destroys itself at the end of its animation via an animation event.

Inspector Fields

FieldTypeDescription
spriteRendererSpriteRendererRenderer that receives the item's icon sprite during the effect.

Methods

MethodDescription
CreatInstance(Item item, Vector2 position)Spawns a copy of the prefab at position and sets the item's sprite on the renderer.
DestroyObject()Destroys the GameObject. Called automatically from an animation event at the end of the use effect — do not call manually.