Beispiel #1
0
 public void OnDialogConfirm(DialogConfirmEvent e, SingleNode <InviteToSquadDialogComponent> dialog, [JoinAll] SingleNode <SelfUserComponent> user, [JoinByBattleLobby] Optional <SingleNode <BattleLobbyComponent> > lobby)
 {
     if (!lobby.IsPresent() || lobby.Get().Entity.HasComponent <CustomBattleLobbyComponent>())
     {
         bool flag = lobby.IsPresent() && lobby.Get().Entity.HasComponent <CustomBattleLobbyComponent>();
         if (!dialog.component.invite)
         {
             AcceptRequestToSquadEvent eventInstance = new AcceptRequestToSquadEvent {
                 FromUserId    = dialog.component.FromUserId,
                 SquadId       = dialog.component.SquadId,
                 SquadEngineId = dialog.component.EngineId
             };
             base.ScheduleEvent(eventInstance, user);
         }
         else
         {
             if (flag)
             {
                 base.ScheduleEvent <ClientExitLobbyEvent>(lobby.Get());
             }
             else
             {
                 base.ScheduleEvent <CancelMatchSearchingEvent>(user);
             }
             AcceptInviteToSquadEvent eventInstance = new AcceptInviteToSquadEvent {
                 EngineId   = dialog.component.EngineId,
                 FromUserId = dialog.component.FromUserId
             };
             base.NewEvent(eventInstance).Attach(user).Schedule();
         }
     }
 }
Beispiel #2
0
 public void Logout(DialogConfirmEvent e, LogoutWindowNode node)
 {
     PlayerPrefs.DeleteKey("TOToken");
     PlayerPrefs.SetInt("SteamAuthentication", 1);
     PlayerPrefs.SetInt("RemeberMeFlag", 0);
     base.ScheduleEvent <SwitchToEntranceSceneEvent>(node);
 }
        public void ExitOnInviteToLobbyConfirm(DialogConfirmEvent e, SingleNode <InviteToLobbyDialogComponent> dialog, [JoinAll] SingleNode <SelfUserComponent> user, [JoinByUser] Optional <SingleNode <BattleUserComponent> > battleUser, [JoinAll] SingleNode <MatchMakingComponent> matchMaking)
        {
            ExitFromMatchMakingEvent eventInstance = new ExitFromMatchMakingEvent {
                InBattle = battleUser.IsPresent()
            };

            base.ScheduleEvent(eventInstance, matchMaking);
        }
Beispiel #4
0
        public void BuyEnergy(DialogConfirmEvent e, SingleNode <BuyEnergyDialogComponent> dialog)
        {
            PressEnergyContextBuyButtonEvent eventInstance = new PressEnergyContextBuyButtonEvent {
                Count  = dialog.component.EnergyCount,
                XPrice = dialog.component.Price
            };

            base.ScheduleEvent(eventInstance, dialog);
        }
Beispiel #5
0
 public void ChangeCountry(DialogConfirmEvent e, SingleNode <SelectCountryDialogComponent> dialog)
 {
     if (!string.IsNullOrEmpty(dialog.component.country.Value))
     {
         SelectCountryEvent eventInstance = new SelectCountryEvent {
             CountryCode = dialog.component.country.Key,
             CountryName = dialog.component.country.Value
         };
         base.ScheduleEvent(eventInstance, dialog.Entity);
         dialog.component.Hide();
     }
 }
        public void OnDialogConfirm(DialogConfirmEvent e, SingleNode <InviteToLobbyDialogComponent> dialog, [JoinAll] SingleNode <SelfUserComponent> user)
        {
            AcceptInviteEvent event3 = new AcceptInviteEvent {
                lobbyId  = dialog.component.lobbyId,
                engineId = dialog.component.engineId
            };
            ExitOtherLobbyAndAcceptInviteEvent eventInstance = new ExitOtherLobbyAndAcceptInviteEvent {
                AcceptInviteEvent = event3
            };

            base.NewEvent(eventInstance).Attach(user).Attach(dialog).Schedule();
        }
Beispiel #7
0
 public void UsePartOfEnergyBonus(DialogConfirmEvent e, SingleNode <CantUseAllEnergyBonusDialog> dialog, [JoinAll] UserNode user, [JoinByUser] EnergyBonusNode bonus)
 {
     base.ScheduleEvent <UseBonusEvent>(bonus);
 }
 public void OnDialogConfirm(DialogConfirmEvent e, SingleNode <EnterToBattleErrorDialog> inviteToLobbyDialog)
 {
     MainScreenComponent.Instance.ClearHistory();
     MainScreenComponent.Instance.ShowHome();
 }
Beispiel #9
0
 public void Exit(DialogConfirmEvent e, SingleNode <ExitGameDialog> exitDialog)
 {
     Application.Quit();
 }
 public void ConfirmOnDialog(DialogConfirmEvent e, SingleNode <SkipTutorialConfirmWindowComponent> skipDialog, [JoinAll] SelfUserNode selfUser, [JoinAll] ICollection <TutorialStepNode> tutorials)
 {
     this.CompleteActiveTutorial(skipDialog.Entity);
 }
Beispiel #11
0
 public void ReturnToBattle(DialogConfirmEvent e, DialogNode dialog, [JoinAll] SelfUserWithReservNode user, [JoinAll] SingleNode <ActiveScreenComponent> screen)
 {
     screen.Entity.AddComponent <LockedScreenComponent>();
     base.ScheduleEvent <ReturnToBattleEvent>(user);
 }