private async void SetupSampleData()
        {
            var items = await SampleData.GetEventFeed();

            foreach (var item in items)
            {
                FeatureEvents.Add(item);
                MyEvents.Add(item);
                AllEvents.Add(item);
            }
        }
Beispiel #2
0
    public bool AddAvatarPedestalsToTrigger(GameObject MyObjectWithTrigger, List <GameObject> MyAvatarPedestals)
    {
        VRC_Trigger MyTriggerScript;
        List <VRC_Trigger.TriggerEvent> TriggerEvents;

        VRC_Trigger.TriggerEvent         MyTriggerEvent;
        List <VRC_EventHandler.VrcEvent> MyEvents;

        VRC_EventHandler.VrcEvent MyEvent;

        if (MyObjectWithTrigger == null)
        {
            CustomMessage = "Select Objects With Trigger If You Want To Toggle Avatar Pedestals By Pressing Button";
            return(false);
        }

        MyTriggerScript = MyObjectWithTrigger.GetComponent <VRC_Trigger>();

        if (MyTriggerScript == null)
        {
            CustomMessage = "Object Does Not Contain A Trigger";
            return(false);
        }

        MyTriggerScript.interactText = "Avatars";
        TriggerEvents              = MyTriggerScript.Triggers;
        MyTriggerEvent             = new VRC_Trigger.TriggerEvent();
        MyTriggerEvent.TriggerType = VRC_Trigger.TriggerType.OnInteract;

        if (bLocalActivateByTrigger)
        {
            MyTriggerEvent.BroadcastType = VRC_EventHandler.VrcBroadcastType.Local;
        }

        MyEvents                 = MyTriggerEvent.Events;
        MyEvent                  = new VRC_EventHandler.VrcEvent();
        MyEvent.EventType        = VRC_EventHandler.VrcEventType.SetGameObjectActive;
        MyEvent.ParameterObjects = MyAvatarPedestals.ToArray();
        MyEvent.ParameterBoolOp  = VRC_EventHandler.VrcBooleanOp.Toggle;
        MyEvents.Add(MyEvent);
        TriggerEvents.Add(MyTriggerEvent);
        return(true);
    }
        public async Task GetMyEvents()
        {
            var feedResultEntity =
                await
                _eventManager.GetMyEvents(Locator.ViewModels.MainPageVm.CurrentTokens, "inSessionAndUpcoming",
                                          Locator.ViewModels.MainPageVm.CurrentUser.Region);

            var result = await ResultChecker.CheckSuccess(feedResultEntity);

            if (!result)
            {
                return;
            }
            var feedEntity = JsonConvert.DeserializeObject <EventsResponse>(feedResultEntity.ResultJson);

            foreach (var feed in feedEntity.Events)
            {
                MyEvents.Add(feed);
            }
        }
Beispiel #4
0
 private void Awake()
 {
     GameSystem.dailyData11 = data;
     MyEvents.Add(new MyEvent7(ref MyEvents));
 }