public void InviteToSquadCanceled(InviteToSquadCanceledEvent e, SingleNode <SelfUserComponent> user, [JoinAll] SingleNode <NotificationsStackContainerComponent> container) { Debug.Log("InviteToLobbySystem.InviteToSquadCanceled"); IEnumerator enumerator = container.component.transform.GetEnumerator(); try { while (enumerator.MoveNext()) { InviteToSquadDialogComponent component = ((Transform)enumerator.Current).GetComponent <InviteToSquadDialogComponent>(); if ((component != null) && component.invite) { component.GetComponent <InviteDialogComponent>().Hide(); } } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } }
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); } }
private bool CanShowInviteWindow(InviteToSquadDialogComponent window) => (window != null) && ((MainScreenComponent.Instance != null) && !window.gameObject.activeSelf);