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(); } } }
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); }
public void BuyEnergy(DialogConfirmEvent e, SingleNode <BuyEnergyDialogComponent> dialog) { PressEnergyContextBuyButtonEvent eventInstance = new PressEnergyContextBuyButtonEvent { Count = dialog.component.EnergyCount, XPrice = dialog.component.Price }; base.ScheduleEvent(eventInstance, dialog); }
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(); }
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(); }
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); }
public void ReturnToBattle(DialogConfirmEvent e, DialogNode dialog, [JoinAll] SelfUserWithReservNode user, [JoinAll] SingleNode <ActiveScreenComponent> screen) { screen.Entity.AddComponent <LockedScreenComponent>(); base.ScheduleEvent <ReturnToBattleEvent>(user); }