public void AddTrackedEvent(TrackedEventType eventID, UnityAction <XRNode, GameObject> trackedEvent) { Entry entry = new Entry { eventID = eventID }; entry.callback.AddListener(trackedEvent); Entrys.Add(entry); }
private void Execute(TrackedEventType id, XRNode node, GameObject target) { for (int i = 0, imax = Entrys.Count; i < imax; ++i) { var ent = Entrys[i]; if (ent.eventID == id && ent.callback != null) { ent.callback.Invoke(node, target); } } }
public LiveEvent(TrackedEvent evt) { _dateNextOccurring = new FantasyDate(evt.DateOccurring); _dateLastOccurred = string.IsNullOrWhiteSpace(evt.DateLastOccurred) ? null : new FantasyDate(evt.DateLastOccurred); _name = evt.Name; _notes = evt.Notes; _reoccurFreq = evt.ReoccurFreq; _eventId = evt.TrackedEventId; _location = evt.Location; _campaignId = evt.CampaignId; _eventType = (TrackedEventType)evt.TrackedEventType; _data = evt.TrackedEventData; _activeEvent = false; _continentId = evt.ContinentId ?? 0; _eventFrequency = (TrackedEventFrequency)evt.TrackedEventFreq; }