// C-TOR public ZoneControl(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { ScreenType = typeof(GuiScreenLobbyRandom); LabelId = 9960601; DescriptionId = 9960602; }
// C-TOR public Profile(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { ScreenType = typeof(GuiPopupPlayerProfile); LabelId = 9960091; DescriptionId = 9960092; }
void OnButtonPressed(string buttonName) { if (buttonName == SHOWINFO_BUTTON) { if (m_InfoBox.Alpha < 1) { m_InfoBox.Show(m_Tweener); } else { m_InfoBox.Hide(m_Tweener); } } else if (buttonName == CLOSE_BUTTON) { m_InfoBox.Hide(m_Tweener); } else if (buttonName == SKIPTHIS_BUTTON) { if (Ftue.ActiveAction != null) { Ftue.ActiveAction.Skip(); } } else if (buttonName == SKIPALL_BUTTON) { Ftue.SkipAll(); } }
// C-TOR public RankUp(Ftue ftue, int minimalRank, int desiredRank, int labelId, int descriptionId) : base(ftue, minimalRank, false) { DesiredRank = desiredRank; LabelId = labelId; DescriptionId = descriptionId; }
// C-TOR public Shop(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { ScreenType = typeof(GuiShopMenu); LabelId = 9960101; DescriptionId = 9960102; }
// C-TOR public Equip(Ftue ftue, int minimalRank, GuiShop.E_ItemType itemType, int itemId) : base(ftue, minimalRank, itemType, itemId) { ScreenType = typeof(GuiEquipMenu); LabelId = 9960061; DescriptionId = 9960062; }
// C-TOR public Friends(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { ScreenType = typeof(FriendsScreen); LabelId = 9960201; DescriptionId = 9960202; }
// C-TOR public Chat(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { ScreenType = typeof(GuiScreenChat); LabelId = 9960301; DescriptionId = 9960302; }
// C-TOR public FinalText(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { LabelId = 9960401; DescriptionId = 9960402; DescriptionScale = new Vector2(0.8f, 0.8f); }
// C-TOR public Leaderboards(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { ScreenType = typeof(GuiScreenLeaderBoards); LabelId = 9960041; DescriptionId = 9960042; }
// C-TOR public Stats(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { ScreenType = typeof(GuiScreenPlayerStats); LabelId = 9960031; DescriptionId = 9960032; }
// C-TOR public Controls(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { ScreenType = typeof(GuiScreenOptions); //GuiPageOptionsControls); LabelId = 9960021; DescriptionId = 9960022; }
// C-TOR public Research(Ftue ftue, int minimalRank, GuiShop.E_ItemType itemType, int itemId) : base(ftue, minimalRank, itemType, itemId) { ScreenType = typeof(GuiScreenResearchMain); //GuiPopupViewResearchItem); LabelId = 9960051; DescriptionId = 9960052; }
public void HideMenu() { if (IsVisible == false) { return; } // stop capture input m_InputController.CaptureInput = false; // go to idle state SetMenuState(E_MenuState.Idle); // hide background UpdateBackground(false, true); // hide overlays SetOverlaysVisibleImpl(false); // inform sub-classes OnMenuHideMenu(); // register this menu to user guide Ftue.UnregisterMenu(this); UserGuide.UnregisterMenu(this); _ClearStack(); }
// C-TOR public DeathMatch(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { //ScreenType = typeof(GuiScreenLobbyRandom); LabelId = 9960001; DescriptionId = 9960002; }
// C-TOR public Base(Ftue ftue, int minimalRank, bool shouldBeIngame) { Ftue = ftue; State = FtueState.None; Priority = (int)E_UserGuidePriority.Tutorial + Index; MinimalRank = Mathf.Clamp(minimalRank, 1, PlayerPersistantInfo.MAX_RANK); ShouldBeIngame = shouldBeIngame; DescriptionScale = new Vector2(1, 1); }
void OnDestroy() { while (m_Actions.Count > 0) { UnregisterAction(m_Actions[0]); } CloudUser.authenticationChanged -= OnUserAuthenticationChanged; UserSettings.SettingsLoaded -= OnSettingsLoaded; UserSettings.SettingsSaving -= OnSettingsSaving; m_Instance = null; }
protected override bool ShouldDisplayButton(GUIBase_Button button) { if (button.name == "FreeGold_Button") { return(false); } if (button.name == "InviteFB_Button") #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX { return(false); } #else { return(Ftue.IsActionFinished <FtueAction.Friends>()); } #endif return(base.ShouldDisplayButton(button)); }
// PRIVATE METHODS void UpdateButtonStates() { FtueAction.Base action = Ftue.ActiveAction ?? Ftue.PendingAction; PlayerPersistantInfo ppi = PPIManager.Instance.GetLocalPPI(); ZoneControlInfo zcInfo = GameInfoSettings.GetGameInfo <ZoneControlInfo>(); int maxRank = PlayerPersistantInfo.MAX_RANK; int rank = ppi != null ? ppi.Rank : 1; int minRankZC = zcInfo != null?Mathf.Clamp(zcInfo.MinimalDesiredRankToPlay, 1, maxRank) : 1; bool disabled = !LobbyClient.IsConnected; bool highlight = action != null && action.ShouldBeIngame || action is FtueAction.RankUp ? true : false; bool disableDM = disabled; bool tutorialZC = Ftue.IsActionFinished <FtueAction.ZoneControl>() ? false : true; bool unlockedZC = rank >= minRankZC ? true : false; if (tutorialZC == true && Ftue.IsActionActive <FtueAction.ZoneControl>() == false) { unlockedZC = false; } bool highlightDM = unlockedZC == false ? highlight : false; bool disableZC = unlockedZC == true ? disabled : true; bool highlightZC = unlockedZC == true ? highlight : false; bool showBlurbDM = ppi != null && ppi.IsFirstGameToday(E_MPGameType.DeathMatch) ? true : false; bool showBlurbZC = ppi != null && ppi.IsFirstGameToday(E_MPGameType.ZoneControl) ? unlockedZC : false; bool showLockZC = zcInfo != null && unlockedZC == false ? true : false; m_ButtonPlayDM.IsDisabled = disableDM; m_ButtonPlayDM.animate = true; m_ButtonPlayDM.isHighlighted = action is FtueAction.DeathMatch || highlightDM ? !disableDM : false; ShowWidget(m_PlayDMBlurb, showBlurbDM); m_ButtonPlayZC.IsDisabled = disableZC; m_ButtonPlayZC.animate = true; m_ButtonPlayZC.isHighlighted = action is FtueAction.ZoneControl || highlightZC ? !disableZC : false; m_PlayZCLock.Show(showLockZC, tutorialZC && rank >= minRankZC ? -1 : minRankZC); ShowWidget(m_PlayZCBlurb, showBlurbZC); }
public bool ShowMenu() { if (IsInitialized == false) { return(false); } if (IsVisible == true) { return(true); } //HACK: we should force font refresh some better way! GuiOptions.language = GuiOptions.language; _ClearStack(); // register this menu to user guide UserGuide.RegisterMenu(this); Ftue.RegisterMenu(this); // try to display overlays SetOverlaysVisibleImpl(true); // try to show background UpdateBackground(IsAnyScreenVisible(), false); // go to default state SetMenuState(E_MenuState.Menu); // inform sub-classes OnMenuShowMenu(); // start capture input m_InputController.CaptureInput = true; // done return(true); }
// C-TOR public Spawn(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, true) { LabelId = 9960011; DescriptionId = 9960012; }
// C-TOR public Hud(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, true) { LabelId = 9960501; DescriptionId = 9960502; }
// C-TOR public ItemBase(Ftue ftue, int minimalRank, GuiShop.E_ItemType itemType, int itemId) : base(ftue, minimalRank, false) { ItemType = itemType; ItemId = itemId; }
// C-TOR public Welcome(Ftue ftue, int minimalRank = 0) : base(ftue, minimalRank, false) { LabelId = 9960081; DescriptionId = 9960082; }