예제 #1
0
        // C-TOR

        public ZoneControl(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            ScreenType    = typeof(GuiScreenLobbyRandom);
            LabelId       = 9960601;
            DescriptionId = 9960602;
        }
예제 #2
0
        // C-TOR

        public Profile(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            ScreenType    = typeof(GuiPopupPlayerProfile);
            LabelId       = 9960091;
            DescriptionId = 9960092;
        }
예제 #3
0
 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();
     }
 }
예제 #4
0
        // C-TOR

        public RankUp(Ftue ftue, int minimalRank, int desiredRank, int labelId, int descriptionId)
            : base(ftue, minimalRank, false)
        {
            DesiredRank   = desiredRank;
            LabelId       = labelId;
            DescriptionId = descriptionId;
        }
예제 #5
0
        // C-TOR

        public Shop(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            ScreenType    = typeof(GuiShopMenu);
            LabelId       = 9960101;
            DescriptionId = 9960102;
        }
예제 #6
0
        // 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;
        }
예제 #7
0
        // C-TOR

        public Friends(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            ScreenType    = typeof(FriendsScreen);
            LabelId       = 9960201;
            DescriptionId = 9960202;
        }
예제 #8
0
        // C-TOR

        public Chat(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            ScreenType    = typeof(GuiScreenChat);
            LabelId       = 9960301;
            DescriptionId = 9960302;
        }
예제 #9
0
        // C-TOR

        public FinalText(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            LabelId          = 9960401;
            DescriptionId    = 9960402;
            DescriptionScale = new Vector2(0.8f, 0.8f);
        }
예제 #10
0
        // C-TOR

        public Leaderboards(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            ScreenType    = typeof(GuiScreenLeaderBoards);
            LabelId       = 9960041;
            DescriptionId = 9960042;
        }
예제 #11
0
        // C-TOR

        public Stats(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            ScreenType    = typeof(GuiScreenPlayerStats);
            LabelId       = 9960031;
            DescriptionId = 9960032;
        }
예제 #12
0
        // C-TOR

        public Controls(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            ScreenType    = typeof(GuiScreenOptions);           //GuiPageOptionsControls);
            LabelId       = 9960021;
            DescriptionId = 9960022;
        }
예제 #13
0
        // 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;
        }
예제 #14
0
    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();
    }
예제 #15
0
        // C-TOR

        public DeathMatch(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            //ScreenType    = typeof(GuiScreenLobbyRandom);
            LabelId       = 9960001;
            DescriptionId = 9960002;
        }
예제 #16
0
        // 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);
        }
예제 #17
0
    void OnDestroy()
    {
        while (m_Actions.Count > 0)
        {
            UnregisterAction(m_Actions[0]);
        }

        CloudUser.authenticationChanged -= OnUserAuthenticationChanged;
        UserSettings.SettingsLoaded     -= OnSettingsLoaded;
        UserSettings.SettingsSaving     -= OnSettingsSaving;

        m_Instance = null;
    }
예제 #18
0
    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));
    }
예제 #19
0
    // 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);
    }
예제 #20
0
    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);
    }
예제 #21
0
        // C-TOR

        public Spawn(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, true)
        {
            LabelId       = 9960011;
            DescriptionId = 9960012;
        }
예제 #22
0
        // C-TOR

        public Hud(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, true)
        {
            LabelId       = 9960501;
            DescriptionId = 9960502;
        }
예제 #23
0
        // C-TOR

        public ItemBase(Ftue ftue, int minimalRank, GuiShop.E_ItemType itemType, int itemId)
            : base(ftue, minimalRank, false)
        {
            ItemType = itemType;
            ItemId   = itemId;
        }
예제 #24
0
        // C-TOR

        public Welcome(Ftue ftue, int minimalRank = 0)
            : base(ftue, minimalRank, false)
        {
            LabelId       = 9960081;
            DescriptionId = 9960082;
        }