示例#1
0
    public void AddTrackedEvent(TrackedEventType eventID, UnityAction <XRNode, GameObject> trackedEvent)
    {
        Entry entry = new Entry {
            eventID = eventID
        };

        entry.callback.AddListener(trackedEvent);
        Entrys.Add(entry);
    }
示例#2
0
 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);
         }
     }
 }
示例#3
0
        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;
        }