Esempio n. 1
0
        private void ShowInviteDialog(SelfUserNode user, long engineId, string userUid, long fromUserId, DialogsNode dialogs)
        {
            InviteToSquadDialogComponent window = dialogs.dialogs60.Get <InviteToSquadDialogComponent>();

            if (!this.CanShowInviteWindow(window))
            {
                RejectInviteToSquadEvent eventInstance = new RejectInviteToSquadEvent {
                    FromUserId = fromUserId,
                    EngineId   = engineId
                };
                base.ScheduleEvent(eventInstance, user);
            }
            else
            {
                InviteToSquadDialogComponent component = dialogs.dialogs60.Get <NotificationsStackContainerComponent>().CreateNotification(window.gameObject).GetComponent <InviteToSquadDialogComponent>();
                component.FromUserId = fromUserId;
                component.EngineId   = engineId;
                component.Show(userUid, false, true);
            }
        }
Esempio n. 2
0
 public void OnDialogDecline(DialogDeclineEvent e, SingleNode <InviteToSquadDialogComponent> dialog, [JoinAll] SingleNode <SelfUserComponent> user)
 {
     object[] objArray1 = new object[] { "InviteToLobbySystem.OnDialogDecline ", user.Entity, " ", dialog.component.invite, " ", dialog.component.FromUserId, " ", dialog.component.EngineId };
     Debug.Log(string.Concat(objArray1));
     if (dialog.component.invite)
     {
         RejectInviteToSquadEvent eventInstance = new RejectInviteToSquadEvent {
             FromUserId = dialog.component.FromUserId,
             EngineId   = dialog.component.EngineId
         };
         base.ScheduleEvent(eventInstance, user);
     }
     else
     {
         RejectRequestToSquadEvent eventInstance = new RejectRequestToSquadEvent {
             FromUserId    = dialog.component.FromUserId,
             SquadId       = dialog.component.SquadId,
             SquadEngineId = dialog.component.EngineId
         };
         base.ScheduleEvent(eventInstance, user);
     }
 }