/// <summary> /// set up only one event /// </summary> protected virtual void SetupEvents() { if (Events.Count > 0) { InteractableTypesContainer interactableTypes = InteractableEvent.GetEventTypes(); Events[0].Receiver = InteractableEvent.GetReceiver(Events[0], interactableTypes); Events[0].Receiver.Host = this; } }
/// <summary> /// Creates the event receiver instances from the Events list /// </summary> protected virtual void SetupEvents() { InteractableTypesContainer interactableTypes = InteractableEvent.GetEventTypes(); for (int i = 0; i < Events.Count; i++) { Events[i].Receiver = InteractableEvent.GetReceiver(Events[i], interactableTypes); Events[i].Receiver.Host = this; } }