コード例 #1
0
    /*void Update()
     * {
     *  if (Input.GetKeyUp(KeyCode.A))
     *  {
     *      //MyTools.SetStageProgress(0,2);
     *      PlayerPrefs.DeleteAll();
     *  }
     * }*/

    public void UpdateStageState()
    {
        switch (CurGroupIndex)
        {
        case 1:
            SetStageState(SerPlayerData.GetMainStageProgress() /*Const.IsStageAllOpen ? 4 : MyTools.GetStageProgress(CurIndex)*/);
            break;

        case 2:
            int StageProgress = 0;
            if (GameApp.Instance.PlayerData != null)
            {
                string key_zoo = StringBuilderTool.ToString(SerPlayerData.GetAccountID(), "_Zoo_StageProgress");
                if (PlayerPrefs.HasKey(key_zoo))
                {
                    StageProgress = PlayerPrefs.GetInt(key_zoo);
                }
                else
                {
                    PlayerPrefs.SetInt(key_zoo, 0);
                }
            }
            else
            {
                StageProgress = 999;
            }
            SetStageState(StageProgress);
            break;

        case 3:
            SetStageState(999);
            break;
        }


        /*if (AllStageDotShow)
         * {
         *  GameApp.Instance.SelModeUI.StageGroupLabs[CurIndex].transform.parent.Find("Bg").GetComponent<UISprite>().spriteName = "gamemode_button_normal_g";
         *  GameApp.Instance.SelModeUI.StageGroupLabs[CurIndex].transform.parent.Find("SelBg").gameObject.SetActive(false);
         *
         *  GameObject nextBtn = transform.parent.parent.Find("Anchor_Left").Find("Mode_" + (CurIndex + 2)).gameObject;
         *  GameApp.Instance.SelModeUI.SwitchShowStageGroup(nextBtn);
         * }
         * else
         * {
         *  GameApp.Instance.SelModeUI.StageGroupLabs[CurIndex].transform.parent.Find("Bg").GetComponent<UISprite>().spriteName = "gamemode_button_normal";
         * }*/
    }