Ejemplo n.º 1
0
    public bool getQuestDaily(int id)
    {
        Entity_quest_mst questMst = Resources.Load("Data/quest_mst") as Entity_quest_mst;
        bool             daily    = questMst.param[id].daily;

        return(daily);
    }
Ejemplo n.º 2
0
    public int getQuestAmnt(int id)
    {
        Entity_quest_mst questMst = Resources.Load("Data/quest_mst") as Entity_quest_mst;
        int amnt = questMst.param[id].amnt;

        return(amnt);
    }
Ejemplo n.º 3
0
    public string getQuestTarget(int id)
    {
        Entity_quest_mst questMst = Resources.Load("Data/quest_mst") as Entity_quest_mst;
        string           target   = questMst.param[id].target;

        return(target);
    }
Ejemplo n.º 4
0
    public string getQuestExp(int id)
    {
        Entity_quest_mst questMst = Resources.Load("Data/quest_mst") as Entity_quest_mst;
        string           exp      = "";

        if (Application.systemLanguage != SystemLanguage.Japanese)
        {
            exp = questMst.param[id].expEng;
        }
        else
        {
            exp = questMst.param[id].exp;
        }
        return(exp);
    }
Ejemplo n.º 5
0
    public string getQuestTitle(int id)
    {
        Entity_quest_mst questMst = Resources.Load("Data/quest_mst") as Entity_quest_mst;
        string           title    = "";

        if (Application.systemLanguage != SystemLanguage.Japanese)
        {
            title = questMst.param[id].titleEng;
        }
        else
        {
            title = questMst.param[id].title;
        }
        return(title);
    }
Ejemplo n.º 6
0
    void getAllData()
    {
        kuniLv = PlayerPrefs.GetInt("kuniLv");
        if (kuniLv <= 0)
        {
            kuniLv = 1;
        }
        PlayerPrefs.SetInt("kuniLv", kuniLv);
        kuniExp    = PlayerPrefs.GetInt("kuniExp");
        myDaimyo   = PlayerPrefs.GetInt("myDaimyo");
        addJinkei1 = PlayerPrefs.GetBool("addJinkei1");
        addJinkei2 = PlayerPrefs.GetBool("addJinkei2");
        addJinkei3 = PlayerPrefs.GetBool("addJinkei3");
        addJinkei4 = PlayerPrefs.GetBool("addJinkei4");

        //common
        yearSeason     = PlayerPrefs.GetString("yearSeason");
        seiryoku       = PlayerPrefs.GetString("seiryoku");
        money          = PlayerPrefs.GetInt("money");
        busyoDama      = PlayerPrefs.GetInt("busyoDama");
        syogunDaimyoId = PlayerPrefs.GetInt("syogunDaimyoId");
        doumei         = PlayerPrefs.GetString("doumei");
        movieCount     = PlayerPrefs.GetInt("movieCount");

        Entity_quest_mst questMst = Resources.Load("Data/quest_mst") as Entity_quest_mst;

        for (int i = 0; i < questMst.param.Count; i++)
        {
            bool dailyFlg = questMst.param[i].daily;
            if (!dailyFlg)
            {
                string tmp       = "questSpecialFlg" + i.ToString();
                bool   activeFlg = PlayerPrefs.GetBool(tmp, false);
                if (activeFlg)
                {
                    questSpecialFlgId.Add(i);
                    string tmp2       = "questSpecialReceivedFlg" + i.ToString();
                    bool   activeFlg2 = PlayerPrefs.GetBool(tmp2, false);
                    if (!activeFlg2)
                    {
                        questSpecialReceivedFlgId.Add(false);
                    }
                    else
                    {
                        questSpecialReceivedFlgId.Add(true);
                    }
                }
            }
        }
        Entity_quest_count_mst questCountMst = Resources.Load("Data/quest_count_mst") as Entity_quest_count_mst;

        for (int i = 0; i < questCountMst.param.Count; i++)
        {
            bool dailyFlg = questCountMst.param[i].daily;
            if (!dailyFlg)
            {
                string tmp       = "questSpecialCountReceivedFlg" + i.ToString();
                bool   activeFlg = PlayerPrefs.GetBool(tmp, false);
                if (activeFlg)
                {
                    questSpecialCountReceivedFlg.Add(true);
                }
                else
                {
                    questSpecialCountReceivedFlg.Add(false);
                }
            }
        }


        //busyo
        myBusyo        = PlayerPrefs.GetString("myBusyo");
        gacyaDaimyoHst = PlayerPrefs.GetString("gacyaDaimyoHst");

        char[] delimiterChars = { ',' };
        if (myBusyo.Contains(","))
        {
            myBusyoList = new List <string>(myBusyo.Split(delimiterChars));
        }
        else
        {
            myBusyoList.Add(myBusyo);
        }
        for (int i = 0; i < myBusyoList.Count; i++)
        {
            string busyoId = myBusyoList[i];

            int busyoLv = PlayerPrefs.GetInt(busyoId);
            lvList.Add(busyoLv);

            string heiTmp    = "hei" + busyoId;
            string heiString = PlayerPrefs.GetString(heiTmp);
            heiList.Add(heiString);

            string senpouTmp = "senpou" + busyoId;
            int    senpouLv  = PlayerPrefs.GetInt(senpouTmp);
            senpouLvList.Add(senpouLv);

            string sakuTmp = "saku" + busyoId;
            int    sakuLv  = PlayerPrefs.GetInt(sakuTmp);
            sakuLvList.Add(sakuLv);

            string kahouTmp    = "kahou" + busyoId;
            string kahouString = PlayerPrefs.GetString(kahouTmp);
            kahouList.Add(kahouString);

            //addLevel
            string addLvTmp = "addlv" + busyoId.ToString();
            int    addlv    = PlayerPrefs.GetInt(addLvTmp);
            addLvList.Add(addlv);

            //gokui
            string gokuiTmp = "gokui" + busyoId;
            int    gokuiId  = PlayerPrefs.GetInt(gokuiTmp);
            gokuiList.Add(gokuiId);

            //kanni
            string kanniTmp = "kanni" + busyoId;
            int    kanniId  = PlayerPrefs.GetInt(kanniTmp);
            kanniList.Add(kanniId);
        }

        //item
        myKanni              = PlayerPrefs.GetString("myKanni");
        availableBugu        = PlayerPrefs.GetString("availableBugu");
        availableKabuto      = PlayerPrefs.GetString("availableKabuto");
        availableGusoku      = PlayerPrefs.GetString("availableGusoku");
        availableMeiba       = PlayerPrefs.GetString("availableMeiba");
        availableCyadougu    = PlayerPrefs.GetString("availableCyadougu");
        availableHeihousyo   = PlayerPrefs.GetString("availableHeihousyo");
        availableChishikisyo = PlayerPrefs.GetString("availableChishikisyo");
        kanjyo      = PlayerPrefs.GetString("kanjyo");
        cyouheiYR   = PlayerPrefs.GetString("cyouheiYR");
        cyouheiKB   = PlayerPrefs.GetString("cyouheiKB");
        cyouheiTP   = PlayerPrefs.GetString("cyouheiTP");
        cyouheiYM   = PlayerPrefs.GetString("cyouheiYM");
        hidensyoGe  = PlayerPrefs.GetInt("hidensyoGe");
        hidensyoCyu = PlayerPrefs.GetInt("hidensyoCyu");
        hidensyoJyo = PlayerPrefs.GetInt("hidensyoJyo");
        shinobiGe   = PlayerPrefs.GetInt("shinobiGe");
        shinobiCyu  = PlayerPrefs.GetInt("shinobiCyu");
        shinobiJyo  = PlayerPrefs.GetInt("shinobiJyo");
        kengouItem  = PlayerPrefs.GetString("kengouItem");
        gokuiItem   = PlayerPrefs.GetString("gokuiItem");
        nanbanItem  = PlayerPrefs.GetString("nanbanItem");
        transferTP  = PlayerPrefs.GetInt("transferTP");
        transferKB  = PlayerPrefs.GetInt("transferKB");
        meisei      = PlayerPrefs.GetInt("meisei");
        shiro       = PlayerPrefs.GetString("shiro");
        koueki      = PlayerPrefs.GetString("koueki");
        cyoutei     = PlayerPrefs.GetString("cyoutei");

        //zukan
        zukanBusyoHst       = PlayerPrefs.GetString("zukanBusyoHst");
        zukanBuguHst        = PlayerPrefs.GetString("zukanBuguHst");
        zukanGusokuHst      = PlayerPrefs.GetString("zukanGusokuHst");
        zukanKabutoHst      = PlayerPrefs.GetString("zukanKabutoHst");
        zukanMeibaHst       = PlayerPrefs.GetString("zukanMeibaHst");
        zukanCyadouguHst    = PlayerPrefs.GetString("zukanCyadouguHst");
        zukanChishikisyoHst = PlayerPrefs.GetString("zukanChishikisyoHst");
        zukanHeihousyoHst   = PlayerPrefs.GetString("zukanHeihousyoHst");
        gameClearDaimyo     = PlayerPrefs.GetString("gameClearDaimyo");
        gameClearDaimyoHard = PlayerPrefs.GetString("gameClearDaimyoHard");

        //naisei
        Entity_kuni_mst kuniMst = Resources.Load("Data/kuni_mst") as Entity_kuni_mst;

        for (int i = 0; i < kuniMst.param.Count; i++)
        {
            int    kuniId    = i + 1;
            string naiseiTmp = "naisei" + kuniId.ToString();
            if (PlayerPrefs.HasKey(naiseiTmp))
            {
                naiseiKuniList.Add(kuniId);
                naiseiList.Add(PlayerPrefs.GetString(naiseiTmp));

                string shiroTmp = "shiro" + kuniId;
                int    shiroId  = PlayerPrefs.GetInt(shiroTmp, 0);
                naiseiShiroList.Add(shiroId);
            }
        }
    }
Ejemplo n.º 7
0
    private void Start()
    {
        Entity_quest_mst       questMst      = Resources.Load("Data/quest_mst") as Entity_quest_mst;
        Entity_quest_count_mst questCountMst = Resources.Load("Data/quest_count_mst") as Entity_quest_count_mst;

        //Set common param
        if (name == "Daily")
        {
            daily = true;
        }
        foreach (Transform chld in transform.parent)
        {
            if (chld.name != gameObject.name)
            {
                otherObj = chld.gameObject;
            }
        }

        //Set quest count data
        List <int> skipGrpList = new List <int>();

        for (int i = 0; i < questCountMst.param.Count; i++)
        {
            bool dailyFlg = questCountMst.param[i].daily;
            int  grpId    = questCountMst.param[i].grp;
            if (!skipGrpList.Contains(grpId))
            {
                if (!dailyFlg && !daily)
                {
                    //Special
                    string tmp         = "questSpecialCountReceivedFlg" + i.ToString();
                    bool   receivedFlg = PlayerPrefs.GetBool(tmp, false);

                    if (!receivedFlg)
                    {
                        activeCountList.Add(i);
                        skipGrpList.Add(grpId);
                    }
                }
                else if (dailyFlg && daily)
                {
                    //Daily
                    string tmp         = "questDailyCountReceivedFlg" + i.ToString();
                    bool   receivedFlg = PlayerPrefs.GetBool(tmp, false);
                    if (!receivedFlg)
                    {
                        activeCountList.Add(i);
                        skipGrpList.Add(grpId);
                    }
                }
            }
        }

        //Set quest data
        for (int i = 0; i < questMst.param.Count; i++)
        {
            bool dailyFlg = questMst.param[i].daily;

            if (!dailyFlg && !daily)
            {
                //Special
                string tmp       = "questSpecialFlg" + i.ToString();
                bool   activeFlg = PlayerPrefs.GetBool(tmp, false);
                if (activeFlg)
                {
                    string tmp2       = "questSpecialReceivedFlg" + i.ToString();
                    bool   activeFlg2 = PlayerPrefs.GetBool(tmp2, false);
                    if (!activeFlg2)
                    {
                        activeList.Add(i);
                    }
                }
                else
                {
                    string tmp2       = "questSpecialReceivedFlg" + i.ToString();
                    bool   activeFlg2 = PlayerPrefs.GetBool(tmp2, false);
                    if (!activeFlg2)
                    {
                        inactiveList.Add(i);
                    }
                }
            }
            else if (dailyFlg && daily)
            {
                //Daily
                string tmp       = "questDailyFlg" + i.ToString();
                bool   activeFlg = PlayerPrefs.GetBool(tmp, false);
                if (activeFlg)
                {
                    //active
                    string tmp2       = "questDailyReceivedFlg" + i.ToString();
                    bool   activeFlg2 = PlayerPrefs.GetBool(tmp2, false);
                    if (!activeFlg2)
                    {
                        activeList.Add(i);
                    }
                }
                else
                {
                    //inactive
                    string tmp2       = "questSpecialReceivedFlg" + i.ToString();
                    bool   activeFlg2 = PlayerPrefs.GetBool(tmp2, false);
                    if (!activeFlg2)
                    {
                        inactiveList.Add(i);
                    }
                }
            }
        }

        //initial set
        if (daily)
        {
            OnClick();
        }
    }