BringIn() public méthode

Brings in the specified panel in a manner that portrays the menu moving in the direction determined by comparing the index of the current panel to the one being brought up.
public BringIn ( UIPanelBase, panel ) : void
panel UIPanelBase, Reference to the panel to bring up.
Résultat void
 public void DoUnlockedProps()
 {
     propsNum = PlayerPrefs.GetString("propLockNum", "1000000000");
     Debug.Log(propsNum);
     if (tobeUnlockedProps != -1)
     {
         if (GlobalManager.CoinNum >= unlockedPropsPrice)
         {
             CountPropsCoins(unlockedPropsPrice);
             SaveUnlockedProps(tobeUnlockedProps);
             ShowUnlockedProps();
         }
         else
         {
             PanelManagerScript.BringIn("PanelBuyCoin");
         }
     }
     unlockedBoss = PlayerPrefs.GetString("BossLocked", "10000");
     if (tobeUnlockedBoss != -1)
     {
         if (GlobalManager.CoinNum >= unlockedBossPrice)
         {
             CountBossCoins(unlockedBossPrice);
             SaveUnlockedBoss(tobeUnlockedBoss);
             ShowUnlockedBoss();
             //			Debug.Log(unlockedBoss);
         }
         else
         {
             PanelManagerScript.BringIn("PanelBuyCoin");
         }
     }
 }
 /// <summary>
 /// 跳转界面
 /// </summary>
 public void PanelChange()
 {
     if (PlayerPrefs.GetInt("coinNum") == 0 && PlayerPrefs.GetInt("first") == 0)
     {
         panelManager.BringIn("PanelGift");
     }
     else
     {
         panelManager.BringIn("PanelStart");
     }
 }
    void FindFriends()
    {
        Flow.path = TurnStatus.BeginGame;

        if (Save.HasKey(PlayerPrefsKeys.FACEBOOK_TOKEN.ToString()))
        {
            panelManager.BringIn("InviteScenePanel");
        }
        else
        {
            fb_account = new GameFacebook(HandleLinkFacebook);
            Flow.game_native.startLoading();
            fb_account.link();
        }
    }
Exemple #4
0
 void CheckLogin()
 {
     //Debug.Log ("Token: " + Save.GetString(PlayerPrefsKeys.TOKEN.ToString()));
     //Debug.Log ("FacebookToken: " + Save.GetString(PlayerPrefsKeys.FACEBOOK_TOKEN.ToString()));
     //Debug.Log("vamos checar o login");
     //if(Save.HasKey(PlayerPrefsKeys.TOKEN.ToString()) || Save.HasKey(PlayerPrefsKeys.FACEBOOK_TOKEN.ToString()))
     if (Save.HasKey(PlayerPrefsKeys.TOKEN.ToString()))
     {
         panelManager.BringIn("MultiplayerScenePanel");
     }
     else
     {
         panelManager.BringIn("LoginScenePanel");
     }
 }
Exemple #5
0
/*
 *      // Do Buy Action
 * //#if UNITY_IPHONE
 *      public void DoBuyCoins500(){
 *              ShowConnectingiTunesPanel();
 *              StoreKitBinding.purchaseProduct( IAP_PROD_Coins500, 1 );
 *      }
 *
 *      public void DoBuyCoins1200(){
 *              ShowConnectingiTunesPanel();
 *              StoreKitBinding.purchaseProduct( IAP_PROD_Coins1200, 1 );
 *      }
 *
 *      public void DoBuyCoins2500(){
 *              ShowConnectingiTunesPanel();
 *              StoreKitBinding.purchaseProduct( IAP_PROD_Coins2500, 1 );
 *      }
 *
 *      public void DoBuyPoints100(){
 *              ShowConnectingiTunesPanel();
 *              StoreKitBinding.purchaseProduct( IAP_PROD_Points100, 1 );
 *      }
 *
 *      public void DoBuyPoints250(){
 *              ShowConnectingiTunesPanel();
 *              StoreKitBinding.purchaseProduct( IAP_PROD_Points250, 1 );
 *      }
 *
 *      public void DoBuyPoints500(){
 *              ShowConnectingiTunesPanel();
 *              StoreKitBinding.purchaseProduct( IAP_PROD_Points500, 1 );
 *      }
 */
//#endif

    // Result
    public void PurchaseSucceed(string productIdentifier)
    {
        Debug.Log("PurchaseSucceed");

        // quantity always = 1
        int curCoinNum  = PlayerPrefs.GetInt("Coins");
        int curPointNum = PlayerPrefs.GetInt("SkillPoints");

        switch (productIdentifier)
        {
        case IAP_PROD_Coins500:
            // Increase 500 Coins for User
            curCoinNum += 500;
            break;

        case IAP_PROD_Coins1200:
            // Increase 1200 Coins for User
            curCoinNum += 1200;
            break;

        case IAP_PROD_Coins2500:
            // Increase 2500 Coins for User
            curCoinNum += 2500;
            break;

        case IAP_PROD_Points100:
            // Increase 100 totalSkillPoints for User
            curPointNum += 100;
            break;

        case IAP_PROD_Points250:
            // Increase 250 totalSkillPoints for User
            curPointNum += 250;
            break;

        case IAP_PROD_Points500:
            // Increase 500 totalSkillPoints for User
            curPointNum += 500;
            break;
        }


        PlayerPrefs.SetInt("Coins", curCoinNum);
        PlayerPrefs.SetInt("SkillPoints", curPointNum);
        PlayerPrefs.Save();
        // Back to the buy coins panel
        panelManager.BringIn(PANEL_SUCCEED_NAME);
    }
Exemple #6
0
 public override void OnInput(ref POINTER_INFO ptr)
 {
     if (this.deleted)
     {
         return;
     }
     base.OnInput(ref ptr);
     if (!this.m_controlIsEnabled || base.IsHidden())
     {
         return;
     }
     if (ptr.evt == this.whenToInvoke)
     {
         if (this.loadingPanel != null)
         {
             UIPanelManager uIPanelManager = (UIPanelManager)this.loadingPanel.Container;
             this.loadingPanel.AddTempTransitionDelegate(new UIPanelBase.TransitionCompleteDelegate(this.LoadSceneDelegate));
             if (uIPanelManager is UIPanelManager && uIPanelManager != null)
             {
                 uIPanelManager.BringIn(this.loadingPanel);
             }
             else
             {
                 this.loadingPanel.StartTransition(UIPanelManager.SHOW_MODE.BringInForward);
             }
         }
         else
         {
             base.Invoke("DoLoadScene", this.delay);
         }
     }
 }
    protected void DoPanelStuff()
    {
        if (toggle)
        {
            if (panelManager != null)
            {
                if (panelManager.CurrentPanel == panel)
                {
                    panelManager.Dismiss(UIPanelManager.MENU_DIRECTION.Forwards);
                    panelIsShowing = false;
                }
                else
                {
                    panelManager.BringIn(panel);
                    panelIsShowing = true;
                }
            }
            else
            {
                if (panelIsShowing)
                {
                    panel.Dismiss();
                }
                else
                {
                    panel.BringIn();
                }

                panelIsShowing = !panelIsShowing;
            }

            base.Value = panelIsShowing;
        }
        else
        {
            if (panelManager != null)
            {
                panelManager.BringIn(panel, UIPanelManager.MENU_DIRECTION.Forwards);
            }
            else
            {
                panel.BringIn();
            }
        }
    }
    public void PurchaseSucceed(string productIdentifier)
    {
        // quantity always = 1
        switch (productIdentifier)
        {
        case IAP_PROD_Coins100:
            // Increase 100 Coins for User
            GlobalManager.CoinNum += 100;
//					addCoins.Text = 100.ToString();
            break;

        case IAP_PROD_Coins200:
            // Increase 200 Coins for User
            GlobalManager.CoinNum += 200;
//					addCoins.Text = 200.ToString();
            break;

        case IAP_PROD_Coins450:
            // Increase 450 Coins for User
            GlobalManager.CoinNum += 450;
//					addCoins.Text = 450.ToString();

            break;

        case IAP_PROD_Coins1000:
            // Increase 1000 Coins for User
            GlobalManager.CoinNum += 1000;
//					addCoins.Text = 1000.ToString();
            break;
        }
        GlobalManager.SaveAllToPlayerPrefs();
        Debug.Log("GlobalManager.CoinNum:" + GlobalManager.CoinNum);
        // Display the new coins number
        MenuController.Instance.CurrentCoins();

        // Back to the buy coins panel
        panelManager.BringIn(PANEL_SUCCEED_NAME);
    }
Exemple #9
0
    public override void OnInput(ref POINTER_INFO ptr)
    {
        if (deleted)
        {
            return;
        }

        base.OnInput(ref ptr);

        if (!m_controlIsEnabled || IsHidden())
        {
            return;
        }

        if (ptr.evt == whenToInvoke)
        {
            if (loadingPanel != null)
            {
                UIPanelManager mgr = (UIPanelManager)loadingPanel.Container;

                // Let us know when the panel is finished coming in:
                loadingPanel.AddTempTransitionDelegate(LoadSceneDelegate);

                if (mgr is UIPanelManager && mgr != null)
                {
                    mgr.BringIn(loadingPanel);
                }
                else
                {
                    loadingPanel.StartTransition(UIPanelManager.SHOW_MODE.BringInForward);
                }
            }
            else
            {
                Invoke("DoLoadScene", delay);
            }
        }
    }
Exemple #10
0
    public override void OnInput(ref POINTER_INFO ptr)
    {
        if (deleted)
        {
            return;
        }

        if (!m_controlIsEnabled || IsHidden())
        {
            base.OnInput(ref ptr);
            return;
        }

        if (ptr.evt == whenToInvoke)
        {
            if (panelManager == null)
            {
                if (UIPanelManager.instance == null)
                {
                    base.OnInput(ref ptr);
                    return;
                }
                else
                {
                    panelManager = UIPanelManager.instance;
                }

                // If we still have nothing, return:
                if (panelManager == null)
                {
                    base.OnInput(ref ptr);
                    return;
                }
            }


            if (detargetAllOthers)
            {
                UIManager.instance.DetargetAllExcept(ptr.id);
            }


            switch (changeType)
            {
            case ChangeType.BringIn:
                panelManager.BringIn(panel);
                break;

            case ChangeType.BringInImmediate:
                panelManager.BringInImmediate(panel);
                break;

            case ChangeType.BringInForward:
                panelManager.BringIn(panel, UIPanelManager.MENU_DIRECTION.Forwards);
                break;

            case ChangeType.BringInBack:
                panelManager.BringIn(panel, UIPanelManager.MENU_DIRECTION.Backwards);
                break;

            case ChangeType.Dismiss:
                if (panelManager.CurrentPanel != null)
                {
                    if (string.Equals(panelManager.CurrentPanel.name, panel, System.StringComparison.CurrentCultureIgnoreCase))
                    {
                        panelManager.Dismiss(UIPanelManager.MENU_DIRECTION.Forwards);
                    }
                }
                break;

            case ChangeType.DismissCurrent:
                panelManager.Dismiss(UIPanelManager.MENU_DIRECTION.Forwards);
                break;

            case ChangeType.DismissImmediate:
                panelManager.DismissImmediate(UIPanelManager.MENU_DIRECTION.Forwards);
                break;

            case ChangeType.Toggle:
                if (panelManager != null &&
                    panelManager.CurrentPanel != null &&
                    string.Equals(panelManager.CurrentPanel.name, panel, System.StringComparison.CurrentCultureIgnoreCase))
                {
                    panelManager.Dismiss(UIPanelManager.MENU_DIRECTION.Forwards);
                }
                else
                {
                    panelManager.BringIn(panel);
                }
                break;

            case ChangeType.Forward:
                panelManager.MoveForward();
                break;

            case ChangeType.Back:
                panelManager.MoveBack();
                break;
            }
        }

        base.OnInput(ref ptr);
    }
Exemple #11
0
    public override void OnInput(ref POINTER_INFO ptr)
    {
        if (deleted)
        {
            return;
        }

        base.OnInput(ref ptr);

        if (!m_controlIsEnabled || IsHidden())
        {
            return;
        }

        if (panel == null)
        {
            return;
        }

        if (ptr.evt == whenToInvoke)
        {
            if (toggle)
            {
                if (panelManager != null)
                {
                    if (panelManager.CurrentPanel == panel)
                    {
                        panelManager.Dismiss(UIPanelManager.MENU_DIRECTION.Forwards);
                        panelIsShowing = false;
                    }
                    else
                    {
                        panelManager.BringIn(panel);
                        panelIsShowing = true;
                    }
                }
                else
                {
                    if (panelIsShowing)
                    {
                        panel.StartTransition(UIPanelManager.SHOW_MODE.DismissForward);
                    }
                    else
                    {
                        panel.StartTransition(UIPanelManager.SHOW_MODE.BringInForward);
                    }

                    panelIsShowing = !panelIsShowing;
                }

                Value = panelIsShowing;
            }
            else
            {
                if (panelManager != null)
                {
                    panelManager.BringIn(panel, UIPanelManager.MENU_DIRECTION.Forwards);
                }
                else
                {
                    panel.StartTransition(UIPanelManager.SHOW_MODE.BringInForward);
                }
            }
        }
    }
 void GoToCharactorSelect()
 {
     windowManager.Dismiss();
     panelManager.BringIn("CharactorSelectPanel");
 }
 void CreateServer()
 {
     WaitingClientBox.Hide(false);
     panelManager.BringIn("CreateServerPanel");
     StartHost(1);
 }
Exemple #14
0
 void HelpEnd()
 {
     StartCoroutine(ResumeGame());
     pannelManager.BringIn("BtnControllPanel");
 }