Exemplo n.º 1
0
    public override IEnumerator Init(int currentLure)
    {
        Debug.Log(GetMethodName() + this.name);
        Coroutine cor;

        ShowItemList(false);
        cor = StartCoroutine(SetItemLists());
        yield return(cor);

        CheckEarlyAccess();
        currenEquippedLure = currentLure;
        affecter.topBtn.SetBtnCallback(OnBtnBuy);
        affecter.btmBtn.SetBtnCallback(OnBtnBuySP);

        rader.InitRader(PSGameUtils.SplitStringData(Localization.Get("LineParams_Tittles"), new char[] { ';' }), transform);

        HideAvilities();


        currentSelect = 0;
        OnTappedItem(currentSelect, true);
        yield return(new WaitForSeconds(0.5f));

        Debug.Log(GetMethodName() + this.name + "End");
        WaitAndCover.Instance.StopWait();
        WaitAndCover.Instance.UnCoverAll();
    }
Exemplo n.º 2
0
    public void OnPluginReady(string YearTittle)
    {
        //""なら 年度が今年ではない or 年度が合えば
        if (YearTittle == "")
        {
            //""なら 年度が今年ではない アップデートを促す
            WaitAndCover.Instance.ShowYesNoPopup(Localization.Get("TittleNoRankingData"), Localization.Get("DescNoRankingData"),
                                                 Localization.Get("Store"), Localization.Get("Quit"), OnUserYNNotThisYear);
        }
        else
        {
            string[] str = PSGameUtils.SplitStringData(YearTittle, new char[] { ':' });
            if (str.Length != 3)
            {
                //フォーマットエラー
                Debug.LogError("フォーマットエラー");
                WaitAndCover.Instance.ShowYesNoPopup("NTYF0" + Localization.Get("FatalError"), Localization.Get("DescFatalError"),
                                                     Localization.Get("Report"), Localization.Get("Quit"), ReportBugOrQuit);
            }
            else
            {
                int year = 0;
                if (int.TryParse(str[0], out year))
                {
                    Debug.Log("年度は今年!! " + year);

                    if (DateTime.Now.Year != year)
                    {
                        //フォーマットエラー
                        Debug.LogError("フォーマットエラー");

                        WaitAndCover.Instance.ShowYesNoPopup("NTYF1" + Localization.Get("FatalError"), Localization.Get("DescFatalError"),
                                                             Localization.Get("Report"), Localization.Get("Quit"), ReportBugOrQuit);
                    }
                    else
                    {
                        //ゲームの開始可能 or データロード可能
                        //今年のapkで 
                        StartCoroutine(LoadDatas());
                        //PS_Plugin.Instance.LoadScene("VBFMain");
                    }
                }
                else
                {
                    //フォーマットエラー
                    Debug.LogError("フォーマットエラー");
                    WaitAndCover.Instance.ShowYesNoPopup("NTYF3" + Localization.Get("FatalError"), Localization.Get("DescFatalError"),
                                                         Localization.Get("Report"), Localization.Get("Quit"), ReportBugOrQuit);
                }
            }
        }
    }
Exemplo n.º 3
0
    public bool SetStringData(string str)
    {
        string[] strs = PSGameUtils.SplitStringData(str, new char[] { ';' });
        if (strs.Length != 5)
        {
            Debug.LogError("not match length" + str);
            return(false);
        }

        name = strs[0];
        bool boo = false;

        if (bool.TryParse(strs[1], out boo))
        {
            isMainTackle = boo;
        }
        else
        {
            return(false);
        }

        int num = -1;

        if (int.TryParse(strs[2], out num))
        {
            lineNum = num;
        }
        else
        {
            return(false);
        }
        if (bool.TryParse(strs[3], out boo))
        {
            isSoft = boo;
        }
        else
        {
            return(false);
        }
        if (int.TryParse(strs[4], out num))
        {
            lureNum = num;
        }
        else
        {
            return(false);
        }


        return(true);
    }
Exemplo n.º 4
0
    public IEnumerator OnEquipSoftInvoke()
    {
        WaitAndCover.Instance.ShowWait();
        WaitAndCover.Instance.CoverAll(false);
        soubiBtn.Hide();
        equipBtn.SetDelegate(OnEquip_Soft);
        affecter2.guiSetter.OnLureChange(false);
        ShowItemList(false);



        equipBtn.rader.InitRader(PSGameUtils.SplitStringData(Localization.Get("TotalLureParams_Tittles"), new char[] { ';' }), transform);
        //現在のルアー
        int i = DataManger.Instance.GAMEDATA.tackleSlots[currentSelect].lureNum;

        Debug.Log("現在の装備 " + i + " " + DataManger.Instance.GAMEDATA.tackleSlots[currentSelect].isSoft);
        currentChangeSelect = i;


        equipBtn.SetAishouTotal(GetAishouLure(currentSelect, currentChangeSelect, true)
                                , GetAishouLine(currentSelect, DataManger.Instance.GAMEDATA.tackleSlots[currentSelect].lineNum));
        equipBtn.SetAishouCurrent(GetAishouLure(currentSelect, currentChangeSelect, true));


        yield return(new WaitForSeconds(0.5f));

        if (currentChangeSelect == -1)
        {
            Debug.Log("現在の装備はソフトではない");
            //何もない
            equipSoft.Show(0);
            SetCurrentLure(currentSelect, 0);
            currentChangeSelect = 0;
        }
        else
        {
            Debug.Log("現在の装備はソフト");
            currentChangeSelect = 0;
            int currentRigID = equipSoft.GetEquippedRigID(currentChangeSelect);
            equipSoft.Show(currentChangeSelect);

            SetCurrentLure(currentSelect, currentRigID);
        }

        OnSelect_Soft(currentChangeSelect);

        WaitAndCover.Instance.StopWait();
        WaitAndCover.Instance.UnCoverAll();
    }
Exemplo n.º 5
0
    public IEnumerator OnEquipLineInvoke()
    {
        WaitAndCover.Instance.ShowWait();
        WaitAndCover.Instance.CoverAll(false);
        soubiBtn.Hide();
        equipBtn.SetDelegate(OnEquip_Line);
        ShowItemList(false);
        affecter2.guiSetter.OnLureChange(true);
        equipBtn.rader.InitRader(PSGameUtils.SplitStringData(Localization.Get("TotalLureParams_Tittles"), new char[] { ';' }), transform);
        //現在のルアー
        int i = DataManger.Instance.GAMEDATA.tackleSlots[currentSelect].lineNum;

        currentChangeSelect = i;

        equipBtn.SetAishouTotal(GetAishouLure(currentSelect, DataManger.Instance.GAMEDATA.tackleSlots[currentSelect].lureNum,
                                              DataManger.Instance.GAMEDATA.tackleSlots[currentSelect].isSoft), GetAishouLine(currentSelect, currentChangeSelect));
        equipBtn.SetAishouCurrent(GetAishouLine(currentSelect, currentChangeSelect));

        yield return(new WaitForSeconds(0.5f));

        if (currentChangeSelect == -1)
        {
            //何もない
            equipLine.Show(0);
            equipBtn.SetCurrent("", "", equipLine.itemAtlas);
            currentChangeSelect = 0;
        }
        else
        {
            currentChangeSelect = 0;
            equipLine.Show(currentChangeSelect);
            //レーダーを表示する。 現在のライン→セレクトされたライン
            equipBtn.SetCurrent(Constants.LineDatas.itemTittles[i], Constants.LineDatas.itemSprites[i], equipLine.itemAtlas);
        }



        OnSelect_Line(currentChangeSelect);

        WaitAndCover.Instance.StopWait();
        WaitAndCover.Instance.UnCoverAll();
    }
Exemplo n.º 6
0
    public override IEnumerator Init(int currentLure)
    {
        Coroutine cor;

        ShowItemList(true);
        cor = StartCoroutine(SetItemLists());
        yield return(cor);

        currenEquippedLure = currentLure;

        rader.InitRader(PSGameUtils.SplitStringData(Localization.Get("RodsParams_Tittles"), new char[] { ';' }), transform);
        HideAvilities();
        //currentSelect=0;
        OnTappedItem(currentSelect, true);
        yield return(new WaitForSeconds(0.5f));

        //Debug.LogError("Init  ");
        soubiBtn.Show(Localization.Get("Equip"));
        WaitAndCover.Instance.StopWait();
        WaitAndCover.Instance.UnCoverAll();
    }
Exemplo n.º 7
0
    public IEnumerator OnEquipHardInvoke()
    {
        WaitAndCover.Instance.ShowWait();
        WaitAndCover.Instance.CoverAll(false);
        equipBtn.SetDelegate(OnEquip_Hard);
        affecter.SetMode(BottomMenu.Btn);
        equipBtn.rader.InitRader(PSGameUtils.SplitStringData(Localization.Get("TotalLureParams_Tittles"), new char[] { ';' }), transform);
        //現在のルアー
        int i = DataManger.Instance.GAMEDATA.tackleSlots[currentSelect].lureNum;

        Debug.Log("現在の装備 " + i + " " + DataManger.Instance.GAMEDATA.tackleSlots[currentSelect].isSoft);
        currentChangeSelect = i;

        equipBtn.SetAishouTotal(GetAishouLure(currentSelect, currentChangeSelect, false), GetAishouLine(currentSelect, DataManger.Instance.GAMEDATA.tackleSlots[currentSelect].lineNum));
        equipBtn.SetAishouCurrent(GetAishouLure(currentSelect, currentChangeSelect, false));
        yield return(new WaitForSeconds(0.5f));

        if (currentChangeSelect == -1)
        {
            //何もない
            Debug.Log("現在の装備はハードではない");
            equipHard.Show(0);
            currentChangeSelect = 0;
            SetCurrentLure(currentSelect, 0);
        }
        else
        {
            currentChangeSelect = 0;
            equipHard.Show(currentChangeSelect);
            SetCurrentLure(currentSelect, 0);
        }



        OnSelect_Hard(currentChangeSelect);

        WaitAndCover.Instance.StopWait();
        WaitAndCover.Instance.UnCoverAll();
    }
Exemplo n.º 8
0
    public string GetRigDesc(int current)
    {
        string str = "";

        if (paramS.Length != 5)
        {
            paramS = PSGameUtils.SplitStringData(Localization.Get("LureParams_Tittles_Short"), new char[] { ';' });
        }


        float val = Constants.RigDatas.graph_1[current];

        if (val > 0.0f)
        {
            str += paramS[0] + "[00A0FFFF]+" + Mathf.FloorToInt(val) + "[-]";
            str += " ";
        }
        else
        {
            if (val == 0.0f)
            {
            }
            else
            {
                str += paramS[0] + "[FF0099FF]" + Mathf.FloorToInt(val) + "[-]";
                str += " ";
            }
        }

        val = Constants.RigDatas.graph_2[current];
        if (val > 0.0f)
        {
            str += paramS[1] + "[00A0FFFF]+" + Mathf.FloorToInt(val) + "[-]";
        }
        else
        {
            if (val == 0.0f)
            {
            }
            else
            {
                str += paramS[1] + "[FF0099FF]" + Mathf.FloorToInt(val) + "[-]";
            }
        }

        str += "\n";
        val  = Constants.RigDatas.graph_3[current];
        if (val > 0.0f)
        {
            str += paramS[2] + "[00A0FFFF]+" + Mathf.FloorToInt(val) + "[-]";
            str += " ";
        }
        else
        {
            if (val == 0.0f)
            {
            }
            else
            {
                str += paramS[2] + "[FF0099FF]" + Mathf.FloorToInt(val) + "[-]";
                str += " ";
            }
        }
        val = Constants.RigDatas.graph_4[current];
        if (val > 0.0f)
        {
            str += paramS[3] + "[00A0FFFF]+" + Mathf.FloorToInt(val) + "[-]";
        }
        else
        {
            if (val == 0.0f)
            {
            }
            else
            {
                str += paramS[3] + "[FF0099FF]" + Mathf.FloorToInt(val) + "[-]";
            }
        }
        str += "\n";
        val  = Constants.RigDatas.graph_5[current];
        if (val > 0.0f)
        {
            str += paramS[4] + "[00A0FFFF]+" + Mathf.FloorToInt(val) + "[-]";
        }
        else
        {
            if (val == 0.0f)
            {
            }
            else
            {
                str += paramS[4] + "[FF0099FF]" + Mathf.FloorToInt(val) + "[-]";
            }
        }

        return(str);
    }
Exemplo n.º 9
0
    public bool SetFromStringData(string dat)
    {
        string[] str = PSGameUtils.SplitStringData(dat, new char[] { ';' });
        if (str.Length != 6)
        {
            return(false);
        }

        int num = 0;

        if (int.TryParse(str[0], out num))
        {
            month = num;
        }
        else
        {
            return(false);
        }
        if (int.TryParse(str[1], out num))
        {
            year = num;
        }
        else
        {
            return(false);
        }
        if (int.TryParse(str[2], out num))
        {
            category = num;
        }
        else
        {
            return(false);
        }
        if (int.TryParse(str[3], out num))
        {
            buttleNum = num;
        }
        else
        {
            return(false);
        }
        bool nl = false;

        if (bool.TryParse(str[4], out nl))
        {
            isPushed = nl;
        }
        else
        {
            return(false);
        }
        long num2 = 0L;

        if (long.TryParse(str[4], out num2))
        {
            score = num2;
        }
        else
        {
            return(false);
        }
        return(true);
    }