Scripting / Components
ItemDropper
Spawns a pickup item at the parent entity's tile position when it dies. Attach to any enemy that should drop loot on death, then subscribe Drop to the entity's OnDie event.
ItemDropper
Loop Adventure › Enemy › ItemDropper
Inspector Fields
| Field | Type | Description |
|---|---|---|
item | InteractableObject_Pickup | The pickup prefab to instantiate at the entity's tile when Drop is called. |
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
Loop Adventure › Visual FX › 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. |