Constructor
new GameEvent(player)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
player |
Player | @param {Board} board |
Classes
Members
isCancelled
- Description:
True if the event has been cancelled.
- Source:
True if the event has been cancelled.
kills
- Source:
Methods
cancel()
- Description:
Cancel this event (prevents the default action).
- Source:
cancelWithMessage(cellOrMessage, messageopt)
- Description:
Cancel and queue a message to display to the player.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
cellOrMessage |
string | Cell | ||
message |
string |
<optional> |
kill(cell, agent)
- Description:
Record that an agent has been killed (changeHealth returned 0). Callers are responsible for removing the agent from the board after processing all callbacks.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
cell |
Cell | |
agent |
object |
suppressCancel()
- Description:
Allow a cancelled event to proceed (used by Game controller).
- Source: