Constructor
new TriggerOnceOnDrop(terrain, color, itemName)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
terrain |
Terrain | The underlying terrain this decorator wraps. |
color |
Color | Color event broadcast to the board on firing. |
itemName |
string | Exact item name that must be dropped to trigger the event. |
Extends
Classes
Members
terrain :Terrain
- Source:
- Overrides:
Type:
Methods
getProxiedTerrain()
- Description:
Return the terrain being wrapped (TerrainProxy interface).
- Source:
- Overrides:
onDropInternal(event, cell, item)
- Description:
Fires the color event and removes this trigger when the dropped item's name exactly matches TriggerOnceOnDrop#itemName. Skips silently when the event is already cancelled or the item does not match.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
GameEvent | |
cell |
Cell | |
item |
Item | The item being dropped. |