A class in Root.Township, the global namespace.
Passes the player who starts or stops using an interactable on to player events.
Constructors
| Member | What it is |
|---|
GetInteractionPlayer() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private Interactable interactable | Interactable watched. |
private PlayerEvent interactionEnded | Event fired with the player when they stop interacting. |
private PlayerEvent interactionStarted | Event fired with the player when they start interacting. |
Methods
3 private and internal methods
| Member | What it is |
|---|
private void Awake() | Hooks the interactable's start and end events. |
private void Ended(Interactable interactable, Interactor interactor) | Fires interactionEnded with the interactor's player. |
private void Started(Interactable interactable, Interactor interactor) | Fires interactionStarted with the interactor's player. |