ItemDropper
Inspector Fields
Methods
| Method | Description |
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
| Field | Type | Description |
spriteRenderer | SpriteRenderer | Renderer that receives the item's icon sprite during the effect. |
Methods
| Method | Description |
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. |