예제 #1
0
        void AttractionPlayerCheckingWithoutReservationNotification(AttractionPlayerCheckingWithoutReservation attractionPlayerCheckingWithoutReservation)
        {
            AttractionDeviceManager.instance.MainGame.GetAttractionSessionAsync(AttractionDeviceManager.instance.AttractionId, attractionPlayerCheckingWithoutReservation.SessionId, (Session) =>
            {
                AttractionDeviceManager.instance.CurrentSession = Session;

                Juniverse.Model.SubAttractionSessionSlot slot = AttractionDeviceManager.instance.CurrentSession.SubSessions[AttractionDeviceManager.instance.SubAttractionID].Slots.Find(x => x.PlayerId == attractionPlayerCheckingWithoutReservation.UserId);
                if (AttractionDeviceManager.instance.CurrentDeviceType == DeviceType.Terminal && slot.AssignedTerminalId != AttractionDeviceManager.instance.TerminalSubattractionId)
                {
                    return;
                }

                if (OnAttractionPlayerCheckingWithoutReservation != null)
                {
                    OnAttractionPlayerCheckingWithoutReservation(attractionPlayerCheckingWithoutReservation);
                }

                if (OnPlayerAttended != null)
                {
                    AttractionDeviceManager.instance.MainGame.GetCurrentPlayerObjectiveAsync(slot.PlayerId, AttractionDeviceManager.instance.SubAttractionID, slot.AssignmentId, (reply) =>
                    {
                        OnPlayerAttended(new AttractionSlotPlayerAttended {
                            PlayerId = attractionPlayerCheckingWithoutReservation.UserId, ReservationId = slot.ReservationId, SessionId = attractionPlayerCheckingWithoutReservation.SessionId, SubSessionId = AttractionDeviceManager.instance.SubAttractionID
                        }, reply, slot.AssignmentId);
                    }, (ex) => AttractionDeviceManager.instance.ShowException(ex));
                }
            }, (ex) => AttractionDeviceManager.instance.ShowException(ex));
        }
예제 #2
0
        void AttractionSlotPlayerAttendedNotification(AttractionSlotPlayerAttended attractionSlotPlayerAttended)
        {
            Juniverse.Model.SubAttractionSessionSlot slot = AttractionDeviceManager.instance.CurrentSession.SubSessions[attractionSlotPlayerAttended.SubSessionId].Slots.Find(x => x.ReservationId == attractionSlotPlayerAttended.ReservationId);
            if (AttractionDeviceManager.instance.CurrentDeviceType == DeviceType.Terminal && slot.AssignedTerminalId != AttractionDeviceManager.instance.TerminalSubattractionId)
            {
                return;
            }

            if (OnPlayerAttended != null)
            {
                AttractionDeviceManager.instance.MainGame.GetCurrentPlayerObjectiveAsync(slot.PlayerId, AttractionDeviceManager.instance.SubAttractionID, slot.AssignmentId, (reply) =>
                {
                    OnPlayerAttended(attractionSlotPlayerAttended, reply, slot.AssignmentId);
                }, (ex) => AttractionDeviceManager.instance.ShowException(ex));
            }
        }