Ejemplo n.º 1
0
    public int getNaiseiEffect(string code, int lv)
    {
        int effect = 0;

        if (lv != 0)
        {
            List <int>        naiseiEffectList = new List <int>();
            Entity_naisei_mst naiseiMst        = Resources.Load("Data/naisei_mst") as Entity_naisei_mst;
            int startline = 0;
            for (int i = 0; i < naiseiMst.param.Count; i++)
            {
                if (naiseiMst.param[i].code == code)
                {
                    startline = i;
                    break;
                }
            }

            object effectLst = naiseiMst.param[startline];
            Type   t         = effectLst.GetType();

            //Effect on Current Lv
            String    param1 = "effect" + lv;
            FieldInfo f1     = t.GetField(param1);
            effect = (int)f1.GetValue(effectLst);
        }
        return(effect);
    }
Ejemplo n.º 2
0
    public string getNaiseiExp(int id)
    {
        string            value     = "";
        Entity_naisei_mst naiseiMst = Resources.Load("Data/naisei_mst") as Entity_naisei_mst;

        if (Application.systemLanguage != SystemLanguage.Japanese)
        {
            value = naiseiMst.param[id].expEng;
        }
        else
        {
            value = naiseiMst.param[id].exp;
        }

        return(value);
    }
Ejemplo n.º 3
0
    public void OnClick()
    {
        MainStageController MainStageController = GameObject.Find("GameController").GetComponent <MainStageController>();

        //SE
        AudioSource sound = GameObject.Find("SEController").GetComponent <AudioSource> ();

        sound.PlayOneShot(sound.clip);

        //Initialization
        totalMoney   = 0;
        kozanMoney   = 0;
        totalHyourou = 0;
        totalYRL     = 0;
        totalKBL     = 0;
        totalYML     = 0;
        totalTPL     = 0;
        totalYRM     = 0;
        totalKBM     = 0;
        totalYMM     = 0;
        totalTPM     = 0;
        totalYRH     = 0;
        totalKBH     = 0;
        totalYMH     = 0;
        totalTPH     = 0;
        totalSNBL    = 0;
        totalSNBM    = 0;
        totalSNBH    = 0;

        /*Popup*/
        string     backPath = "Prefabs/Busyo/back";
        GameObject back     = Instantiate(Resources.Load(backPath)) as GameObject;

        back.transform.SetParent(GameObject.Find("Map").transform);
        back.transform.localScale = new Vector2(1, 1);
        RectTransform backTransform = back.GetComponent <RectTransform> ();

        backTransform.anchoredPosition = new Vector3(0, 0, 0);

        //Popup Screen
        string     popupPath = "Prefabs/Busyo/board";
        GameObject popup     = Instantiate(Resources.Load(popupPath)) as GameObject;

        popup.transform.SetParent(GameObject.Find("Map").transform);
        popup.transform.localScale = new Vector2(1, 1);
        RectTransform popupTransform = popup.GetComponent <RectTransform> ();

        popupTransform.anchoredPosition = new Vector3(0, 0, 0);
        popup.name = "board";

        //qa
        string     qaPath = "Prefabs/Common/Question";
        GameObject qa     = Instantiate(Resources.Load(qaPath)) as GameObject;

        qa.transform.SetParent(popup.transform);
        qa.transform.localScale = new Vector2(1, 1);
        RectTransform qaTransform = qa.GetComponent <RectTransform> ();

        qaTransform.anchoredPosition = new Vector3(-540, 285, 0);
        qa.name = "qa";
        qa.GetComponent <QA> ().qaId = 2;


        //Pop text
        string     popTextPath = "Prefabs/Busyo/popText";
        GameObject popText     = Instantiate(Resources.Load(popTextPath)) as GameObject;

        popText.transform.SetParent(popup.transform);
        popText.transform.localScale = new Vector2(0.35f, 0.35f);
        RectTransform popTextTransform = popText.GetComponent <RectTransform> ();

        popTextTransform.anchoredPosition = new Vector3(0, 260, 0);
        popText.name = "popText";
        if (Application.systemLanguage != SystemLanguage.Japanese)
        {
            popText.GetComponent <Text>().text = "Finance";
        }
        else
        {
            popText.GetComponent <Text> ().text = "内政状況";
        }

        //Cyosyu
        string     cyosyuPath = "Prefabs/Cyosyu/CyosyuObj";
        GameObject CyosyuObj  = Instantiate(Resources.Load(cyosyuPath)) as GameObject;

        CyosyuObj.transform.SetParent(popup.transform);
        CyosyuObj.transform.localScale = new Vector2(1, 1);



        string        seiryoku       = PlayerPrefs.GetString("seiryoku");
        List <string> seiryokuList   = new List <string> ();
        List <string> mySeiryokuList = new List <string> ();

        char[] delimiterChars = { ',' };

        seiryokuList = new List <string> (seiryoku.Split(delimiterChars));
        int myDaimyoId = PlayerPrefs.GetInt("myDaimyo");

        //Get my Kuni
        for (int i = 0; i < seiryokuList.Count; i++)
        {
            int seiryokuId = int.Parse(seiryokuList [i]);
            if (seiryokuId == myDaimyoId)
            {
                int kuniId = i + 1;
                mySeiryokuList.Add(kuniId.ToString());
            }
        }


        //Kuni Loop Start
        int naiseiBldg = 0;
        int syogyo     = 0;
        int nogyo      = 0;
        int gunjyu     = 0;
        int ashigaru   = 0;
        int boubi      = 0;
        int bukkyo     = 0;
        int kirisuto   = 0;
        int bunka      = 0;

        //seiryoku loop
        for (int i = 0; i < mySeiryokuList.Count; i++)
        {
            int kuniKozan  = 0;
            int kuniSyogyo = 0;

            int    kuniId      = int.Parse(mySeiryokuList[i]);
            string temp        = "kuni" + mySeiryokuList[i];
            string clearedKuni = PlayerPrefs.GetString(temp);
            //Shiro Qty
            if (clearedKuni != null && clearedKuni != "")
            {
                List <string> shiroList = new List <string>();
                shiroList = new List <string>(clearedKuni.Split(delimiterChars));
                shiro     = shiroList.Count;

                //Kuni Name
                Entity_kuni_mst kuniMst = Resources.Load("Data/kuni_mst") as Entity_kuni_mst;
                kuniName = kuniMst.param[kuniId - 1].kuniName;

                string naiseiTemp   = "naisei" + mySeiryokuList[i];
                string naiseiString = PlayerPrefs.GetString(naiseiTemp);
                if (PlayerPrefs.HasKey(naiseiTemp))
                {
                    List <string> naiseiList = new List <string>();
                    naiseiList = new List <string>(naiseiString.Split(delimiterChars));
                    char[]        delimiterChars2 = { ':' };
                    List <string> deletePanelList = new List <string>();


                    for (int j = 1; j < naiseiList.Count; j++)
                    {
                        List <string> naiseiContentList = new List <string>();
                        naiseiContentList = new List <string>(naiseiList[j].Split(delimiterChars2));


                        if (naiseiContentList[0] != "0")
                        {
                            //Exist
                            Entity_naisei_mst naiseiMst = Resources.Load("Data/naisei_mst") as Entity_naisei_mst;
                            string            type      = naiseiMst.param [int.Parse(naiseiContentList[0])].code;
                            naiseiBldg = naiseiBldg + 1;

                            //Effect by Level
                            List <int>       naiseiEffectList = new List <int>();
                            NaiseiController naisei           = new NaiseiController();
                            naiseiEffectList = naisei.getNaiseiList(type, int.Parse(naiseiContentList[1]));


                            //Status
                            if (type == "shop")
                            {
                                kuniSyogyo = kuniSyogyo + naiseiEffectList[0];
                            }
                            else if (type == "kzn")
                            {
                                kuniKozan = kuniKozan + naiseiEffectList[0];
                            }
                            else if (type == "ta")
                            {
                                nogyo        = nogyo + naiseiEffectList[0];
                                totalHyourou = totalHyourou + naiseiEffectList[0];
                            }
                            else if (type == "yr")
                            {
                                if (int.Parse(naiseiContentList[1]) < 11)
                                {
                                    //Low
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalYRL = totalYRL + naiseiEffectList[0];
                                }
                                else if (int.Parse(naiseiContentList[1]) < 16)
                                {
                                    //Middle
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalYRM = totalYRM + naiseiEffectList[0];
                                }
                                else if (15 <= int.Parse(naiseiContentList[1]))
                                {
                                    //High
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalYRH = totalYRH + naiseiEffectList[0];
                                }
                            }
                            else if (type == "kb")
                            {
                                if (int.Parse(naiseiContentList[1]) < 11)
                                {
                                    //Low
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalKBL = totalKBL + naiseiEffectList[0];
                                }
                                else if (int.Parse(naiseiContentList[1]) < 16)
                                {
                                    //Middle
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalKBM = totalKBM + naiseiEffectList[0];
                                }
                                else if (15 <= int.Parse(naiseiContentList[1]))
                                {
                                    //High
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalKBH = totalKBH + naiseiEffectList[0];
                                }
                            }
                            else if (type == "ym")
                            {
                                if (int.Parse(naiseiContentList[1]) < 11)
                                {
                                    //Low
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalYML = totalYML + naiseiEffectList[0];
                                }
                                else if (int.Parse(naiseiContentList[1]) < 16)
                                {
                                    //Middle
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalYMM = totalYMM + naiseiEffectList[0];
                                }
                                else if (15 <= int.Parse(naiseiContentList[1]))
                                {
                                    //High
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalYMH = totalYMH + naiseiEffectList[0];
                                }
                            }
                            else if (type == "tp")
                            {
                                if (int.Parse(naiseiContentList[1]) < 11)
                                {
                                    //Low
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalTPL = totalTPL + naiseiEffectList[0];
                                }
                                else if (int.Parse(naiseiContentList[1]) < 16)
                                {
                                    //Middle
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalTPM = totalTPM + naiseiEffectList[0];
                                }
                                else if (15 <= int.Parse(naiseiContentList[1]))
                                {
                                    //High
                                    gunjyu   = gunjyu + naiseiEffectList[0];
                                    totalTPH = totalTPH + naiseiEffectList[0];
                                }
                            }
                            else if (type == "snb")
                            {
                                if (int.Parse(naiseiContentList[1]) < 11)
                                {
                                    //Low
                                    gunjyu    = gunjyu + naiseiEffectList[0];
                                    totalSNBL = totalSNBL + naiseiEffectList[0];
                                }
                                else if (int.Parse(naiseiContentList[1]) < 16)
                                {
                                    //Middle
                                    gunjyu    = gunjyu + naiseiEffectList[0];
                                    totalSNBM = totalSNBM + naiseiEffectList[0];
                                }
                                else if (15 <= int.Parse(naiseiContentList[1]))
                                {
                                    //High
                                    gunjyu    = gunjyu + naiseiEffectList[0];
                                    totalSNBH = totalSNBH + naiseiEffectList[0];
                                }
                            }
                            else if (type == "trd")
                            {
                                boubi = boubi + naiseiEffectList[0];
                            }
                            else if (type == "nbn")
                            {
                                kirisuto = kirisuto + naiseiEffectList[0];
                            }
                            else if (type == "kgy")
                            {
                                bunka = bunka + naiseiEffectList [0];
                            }
                            else if (type == "bky")
                            {
                                bukkyo = bukkyo + naiseiEffectList [0];
                            }
                            else if (type == "hsy")
                            {
                                ashigaru = ashigaru + naiseiEffectList [0];
                            }
                        }
                    }

                    //Shiro
                    int shiroLv            = int.Parse(naiseiList[0]);
                    NaiseiController naise = new NaiseiController();
                    List <int>       naiseiShiroEffectList = new List <int>();
                    naiseiShiroEffectList = naise.getNaiseiList("shiro", shiroLv);
                    ashigaru = ashigaru + naiseiShiroEffectList[0];
                    boubi    = boubi + naiseiShiroEffectList[0];


                    //Jyosyu Addition
                    string jyosyuTemp = "jyosyu" + kuniId;

                    if (PlayerPrefs.HasKey(jyosyuTemp))
                    {
                        int       jyosyuId  = PlayerPrefs.GetInt(jyosyuTemp);
                        StatusGet sts       = new StatusGet();
                        int       lv        = PlayerPrefs.GetInt(jyosyuId.ToString());
                        float     naiseiSts = (float)sts.getDfc(jyosyuId, lv);

                        float hpSts  = (float)sts.getHp(jyosyuId, lv);
                        float atkSts = (float)sts.getAtk(jyosyuId, lv);

                        float tempKuniSyogyo = (float)kuniSyogyo;
                        tempKuniSyogyo = tempKuniSyogyo + (tempKuniSyogyo * naiseiSts / 200);
                        kuniSyogyo     = (int)tempKuniSyogyo;

                        float tempKuniKozan = (float)kuniKozan;
                        tempKuniKozan = tempKuniKozan + (tempKuniKozan * naiseiSts / 200);
                        kuniKozan     = (int)tempKuniKozan;
                    }
                }
            }
            kozanMoney = kozanMoney + kuniKozan;
            totalMoney = totalMoney + kuniSyogyo;
            syogyo     = syogyo + (kuniKozan * 4 + kuniSyogyo);
        }//Kuni Loop Finish


        /*visualize*/
        //Upper Board
        GameObject spring = CyosyuObj.transform.FindChild("spring").gameObject;

        spring.transform.FindChild("TargetMoney").transform.FindChild("Value").GetComponent <Text>().text = (totalMoney + kozanMoney).ToString();

        GameObject summerWinter = CyosyuObj.transform.FindChild("summerWinter").gameObject;

        summerWinter.transform.FindChild("TargetMoney").transform.FindChild("Value").GetComponent <Text>().text = kozanMoney.ToString();
        GameObject TargetGunjyu = summerWinter.transform.FindChild("TargetGunjyu").gameObject;

        if (totalYRH != 0)
        {
            TargetGunjyu.transform.FindChild("YR").transform.FindChild("CyouheiYRValueH").GetComponent <Text>().text = totalYRH.ToString();
        }
        if (totalYRM != 0)
        {
            TargetGunjyu.transform.FindChild("YR").transform.FindChild("CyouheiYRValueM").GetComponent <Text>().text = totalYRM.ToString();
        }
        if (totalYRL != 0)
        {
            TargetGunjyu.transform.FindChild("YR").transform.FindChild("CyouheiYRValueL").GetComponent <Text>().text = totalYRL.ToString();
        }
        if (totalKBH != 0)
        {
            TargetGunjyu.transform.FindChild("KB").transform.FindChild("CyouheiKBValueH").GetComponent <Text>().text = totalKBH.ToString();
        }
        if (totalKBM != 0)
        {
            TargetGunjyu.transform.FindChild("KB").transform.FindChild("CyouheiKBValueM").GetComponent <Text>().text = totalKBM.ToString();
        }
        if (totalKBL != 0)
        {
            TargetGunjyu.transform.FindChild("KB").transform.FindChild("CyouheiKBValueL").GetComponent <Text>().text = totalKBL.ToString();
        }
        if (totalYMH != 0)
        {
            TargetGunjyu.transform.FindChild("YM").transform.FindChild("CyouheiYMValueH").GetComponent <Text>().text = totalYMH.ToString();
        }
        if (totalYMM != 0)
        {
            TargetGunjyu.transform.FindChild("YM").transform.FindChild("CyouheiYMValueM").GetComponent <Text>().text = totalYMM.ToString();
        }
        if (totalYML != 0)
        {
            TargetGunjyu.transform.FindChild("YM").transform.FindChild("CyouheiYMValueL").GetComponent <Text>().text = totalYML.ToString();
        }
        if (totalTPH != 0)
        {
            TargetGunjyu.transform.FindChild("TP").transform.FindChild("CyouheiTPValueH").GetComponent <Text>().text = totalTPH.ToString();
        }
        if (totalTPM != 0)
        {
            TargetGunjyu.transform.FindChild("TP").transform.FindChild("CyouheiTPValueM").GetComponent <Text>().text = totalTPM.ToString();
        }
        if (totalTPL != 0)
        {
            TargetGunjyu.transform.FindChild("TP").transform.FindChild("CyouheiTPValueL").GetComponent <Text>().text = totalTPL.ToString();
        }
        if (totalSNBH != 0)
        {
            TargetGunjyu.transform.FindChild("SNB").transform.FindChild("SNBValueH").GetComponent <Text>().text = totalSNBH.ToString();
        }
        if (totalSNBM != 0)
        {
            TargetGunjyu.transform.FindChild("SNB").transform.FindChild("SNBValueM").GetComponent <Text>().text = totalSNBM.ToString();
        }
        if (totalSNBL != 0)
        {
            TargetGunjyu.transform.FindChild("SNB").transform.FindChild("SNBValueL").GetComponent <Text>().text = totalSNBL.ToString();
        }

        GameObject autumn = CyosyuObj.transform.FindChild("autumn").gameObject;

        autumn.transform.FindChild("TargetMoney").transform.FindChild("Value").GetComponent <Text>().text   = kozanMoney.ToString();
        autumn.transform.FindChild("TargetHyourou").transform.FindChild("Value").GetComponent <Text>().text = totalHyourou.ToString();

        //Color
        int nowSeason = MainStageController.nowSeason;

        if (nowSeason == 1)
        {
            summerWinter.transform.FindChild("summer").gameObject.AddComponent <TextBlinker>();
        }
        else if (nowSeason == 2)
        {
            autumn.transform.FindChild("autumn").gameObject.AddComponent <TextBlinker>();
        }
        else if (nowSeason == 3)
        {
            summerWinter.transform.FindChild("winter").gameObject.AddComponent <TextBlinker>();
        }
        else if (nowSeason == 4)
        {
            spring.transform.FindChild("spring").gameObject.AddComponent <TextBlinker>();
        }


        //Lower Board
        GameObject status = CyosyuObj.transform.FindChild("statusBack").gameObject;

        //Kamon
        string     imagePath = "Prefabs/Kamon/MyDaimyoKamon/" + myDaimyoId.ToString();
        GameObject kamon     = status.transform.FindChild("Kamon").gameObject;

        kamon.GetComponent <Image> ().sprite =
            Resources.Load(imagePath, typeof(Sprite)) as Sprite;
        if (Application.systemLanguage == SystemLanguage.Japanese)
        {
            kamon.transform.FindChild("Value").GetComponent <Text> ().text = GameObject.Find("DaimyoValue").GetComponent <Text> ().text + "  国状況";
        }
        else
        {
            kamon.transform.FindChild("Value").GetComponent <Text>().text = GameObject.Find("DaimyoValue").GetComponent <Text>().text + " Status";
        }
        //Kuni
        status.transform.FindChild("Shiro").transform.FindChild("No").GetComponent <Text>().text = mySeiryokuList.Count.ToString();

        //Naisei Bldg.
        status.transform.FindChild("Naisei").transform.FindChild("No").GetComponent <Text>().text = (naiseiBldg + mySeiryokuList.Count).ToString();

        //Tabibito
        int tabibitoQty = PlayerPrefs.GetInt("HstTabibito");

        status.transform.FindChild("Tabibito").transform.FindChild("No").GetComponent <Text>().text = tabibitoQty.ToString();

        //Nanbansen
        int nanbansenQty = PlayerPrefs.GetInt("HstNanbansen");

        status.transform.FindChild("Ship").transform.FindChild("No").GetComponent <Text>().text = nanbansenQty.ToString();

        //Syogyo
        status.transform.FindChild("StatusSyogyo").transform.FindChild("SyogyoValue").GetComponent <Text>().text = syogyo.ToString();

        //Nogyo
        status.transform.FindChild("StatusNougyo").transform.FindChild("NougyoValue").GetComponent <Text>().text = nogyo.ToString();

        //Gunjyu
        status.transform.FindChild("StatusGunjyu").transform.FindChild("GunjyuValue").GetComponent <Text>().text = (gunjyu * 2).ToString();

        //Ashigaru
        status.transform.FindChild("StatusAshigaru").transform.FindChild("AshigaruValue").GetComponent <Text>().text = ashigaru.ToString();

        //Boubi
        status.transform.FindChild("StatusBoubi").transform.FindChild("BoubiValue").GetComponent <Text>().text = boubi.ToString();

        //Bukkyo
        status.transform.FindChild("StatusBukkyo").transform.FindChild("BukkyoValue").GetComponent <Text>().text = bukkyo.ToString();

        //Kirisuto
        status.transform.FindChild("StatusKirisuto").transform.FindChild("KirisutoValue").GetComponent <Text>().text = kirisuto.ToString();

        //Bunka
        status.transform.FindChild("StatusBunka").transform.FindChild("BunkaValue").GetComponent <Text>().text = bunka.ToString();

        //tutorial
        if (Application.loadedLevelName == "tutorialMain")
        {
            Destroy(transform.FindChild("point_up").gameObject);
            TutorialController TutorialController = new TutorialController();
            Vector2            vect     = new Vector2(0, 50);
            GameObject         closeObj = popup.transform.FindChild("close").gameObject;
            GameObject         animObj  = TutorialController.SetPointer(closeObj, vect);
            animObj.transform.localScale = new Vector2(120, 120);

            GameObject SubButtonViewLeft = GameObject.Find("SubButtonViewLeft").gameObject;
            GameObject.Find("SeiryokuInfo").transform.SetParent(SubButtonViewLeft.transform);
        }
    }
Ejemplo n.º 4
0
    public void OnClick()
    {
        AudioSource[] audioSources = GameObject.Find("SEController").GetComponents <AudioSource>();

        if (blank)
        {
            audioSources[0].Play();
            BusyoStatusButton pop = new BusyoStatusButton();
            pop.commonPopup(20);

            //New
            //Label
            if (Application.systemLanguage != SystemLanguage.Japanese)
            {
                GameObject.Find("popText").GetComponent <Text> ().text = "Development";
            }
            else
            {
                GameObject.Find("popText").GetComponent <Text>().text = "内政開発";
            }
            //Set Scroll View
            string     scrollPath = "Prefabs/Naisei/ScrollView";
            GameObject scroll     = Instantiate(Resources.Load(scrollPath)) as GameObject;
            scroll.transform.SetParent(GameObject.Find("board(Clone)").transform);
            scroll.transform.localScale = new Vector2(1, 1);
            scroll.name = "ScrollView";
            RectTransform scrollTransform = scroll.GetComponent <RectTransform> ();
            scrollTransform.anchoredPosition = new Vector3(0, 0, 0);

            //Naisei Master
            Entity_naisei_mst naiseiMst = Resources.Load("Data/naisei_mst") as Entity_naisei_mst;

            //Re-make Common & Shigen
            List <string> avlNaiseiList  = new List <string> ();
            char[]        delimiterChars = { ':' };
            string        shigen         = GameObject.Find("NaiseiController").GetComponent <NaiseiController>().shigen;
            if (shigen != "null")
            {
                if (shigen.Contains(":"))
                {
                    avlNaiseiList = new List <string> (shigen.Split(delimiterChars));
                }
                else
                {
                    avlNaiseiList.Add(shigen);
                }
            }

            /***Tech Item Start***/
            List <string> avlTechList = new List <string> ();

            int tpQty  = PlayerPrefs.GetInt("transferTP");
            int kbQty  = PlayerPrefs.GetInt("transferKB");
            int snbQty = PlayerPrefs.GetInt("transferSNB");
            if (tpQty > 0 && !avlNaiseiList.Contains("tp"))
            {
                avlTechList.Add("tp");
            }
            if (kbQty > 0 && !avlNaiseiList.Contains("kb"))
            {
                avlTechList.Add("kb");
            }
            if (snbQty > 0 && !avlNaiseiList.Contains("snb"))
            {
                avlTechList.Add("snb");
            }
            /***Tech Item Finish***/



            NaiseiInfo naiseiInfo = new NaiseiInfo();
            for (int i = 1; i < naiseiMst.param.Count; i++)
            {
                string code = naiseiMst.param [i].code;

                //if (code != "NotYet"){ // for test
                if ((naiseiMst.param [i].common == 1 && code != "NotYet") ||
                    (avlNaiseiList.Contains(naiseiMst.param [i].code) && code != "NotYet"))
                {
                    //Slot
                    string     slotPath = "Prefabs/Naisei/NaiseiSlot";
                    GameObject slot     = Instantiate(Resources.Load(slotPath)) as GameObject;
                    slot.transform.SetParent(scroll.transform.FindChild("NaiseiContent").transform);
                    slot.transform.localScale = new Vector2(1, 1);

                    //Bldg
                    string naiseiNameText = naiseiInfo.getNaiseiName(i);
                    string naiseExpText   = naiseiInfo.getNaiseiExp(i);


                    GameObject naiseiName = slot.transform.FindChild("NaiseiName").gameObject;
                    naiseiName.GetComponent <Text> ().text = naiseiNameText;
                    string     bldgPath = "Prefabs/Naisei/Bldg/" + naiseiMst.param [i].code + "_s";
                    GameObject bldg     = Instantiate(Resources.Load(bldgPath)) as GameObject;
                    bldg.transform.SetParent(naiseiName.transform);
                    RectTransform bldgTransform = bldg.GetComponent <RectTransform> ();
                    bldgTransform.anchoredPosition       = new Vector3(0, -315, 0);
                    bldg.transform.localScale            = new Vector2(3, 3);
                    bldg.GetComponent <Button>().enabled = false;

                    //Some Value
                    naiseiName.transform.FindChild("NaiseiExp").GetComponent <Text> ().text = naiseExpText;
                    string target  = naiseiMst.param [i].target;
                    int    effect1 = naiseiMst.param [i].effect1;
                    if (Application.systemLanguage != SystemLanguage.Japanese)
                    {
                        if (target == "money")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Money";
                        }
                        else if (target == "hyourou")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Stamina";
                        }
                        else if (target == "YR")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Spear Item";
                        }
                        else if (target == "KB")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Cavalry Item";
                        }
                        else if (target == "TP")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Gun Item";
                        }
                        else if (target == "YM")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Bow Item";
                        }
                        else if (target == "nbn")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Christian";
                        }
                        else if (target == "bnk")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Culture";
                        }
                        else if (target == "snb")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Ninja";
                        }
                        else if (target == "bky")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Buddhism";
                        }
                        else if (target == "child")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Additional Soldier";
                        }
                        else if (target == "dfc")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Defence";
                        }
                    }
                    else
                    {
                        if (target == "money")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "金";
                        }
                        else if (target == "hyourou")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "兵糧";
                        }
                        else if (target == "YR")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "槍刀素材";
                        }
                        else if (target == "KB")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "騎馬素材";
                        }
                        else if (target == "TP")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "鉄砲素材";
                        }
                        else if (target == "YM")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "弓矢素材";
                        }
                        else if (target == "nbn")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "基督教";
                        }
                        else if (target == "bnk")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "文化";
                        }
                        else if (target == "snb")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "忍";
                        }
                        else if (target == "bky")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "仏教";
                        }
                        else if (target == "child")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "足軽兵数";
                        }
                        else if (target == "dfc")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "防備";
                        }
                    }
                    //Label & Effect Value Adjustment
                    if (code != "kzn")
                    {
                        if (code != "yr" && code != "kb" && code != "tp" && code != "ym" && code != "snb")
                        {
                            if (code != "nbn" && code != "kgy" && code != "bky" && code != "hsy" && code != "trd")
                            {
                                naiseiName.transform.FindChild("NaiseiEffectValue").GetComponent <Text> ().text = "+" + effect1;
                            }
                            else
                            {
                                naiseiName.transform.FindChild("NaiseiUnit").GetComponent <Text>().enabled      = false;
                                naiseiName.transform.FindChild("NaiseiEffectValue").GetComponent <Text> ().text = "+" + effect1;
                            }
                        }
                        else
                        {
                            effect1 = effect1 * 2;

                            //Rank


                            naiseiName.transform.FindChild("NaiseiEffectValue").GetComponent <Text> ().text = "+" + effect1;
                        }
                    }
                    else
                    {
                        effect1 = effect1 * 4;
                        naiseiName.transform.FindChild("NaiseiEffectValue").GetComponent <Text> ().text = "+" + effect1;
                    }

                    naiseiName.transform.FindChild("RequiredMoney").GetComponent <Text> ().text   = naiseiMst.param [i].money1.ToString();
                    naiseiName.transform.FindChild("RequiredHyourou").GetComponent <Text> ().text = naiseiMst.param [i].hyourou.ToString();
                    GameObject createButton = naiseiName.transform.FindChild("CreateButton").gameObject;
                    createButton.GetComponent <BuildNaisei> ().panelId         = int.Parse(name);
                    createButton.GetComponent <BuildNaisei> ().naiseiId        = i;
                    createButton.GetComponent <BuildNaisei>().naiseiName       = naiseiNameText;
                    createButton.GetComponent <BuildNaisei> ().requiredMoney   = naiseiMst.param [i].money1;
                    createButton.GetComponent <BuildNaisei> ().requiredHyourou = naiseiMst.param [i].hyourou;
                }
                else if (naiseiMst.param [i].common == 0 && code != "NotYet" && avlTechList.Contains(naiseiMst.param [i].code))
                {
                    //Technical Item
                    string naiseiNameText = naiseiInfo.getNaiseiName(i);
                    string naiseExpText   = naiseiInfo.getNaiseiExp(i);

                    //Slot
                    string     slotPath = "Prefabs/Naisei/NaiseiSlotWithItem";
                    GameObject slot     = Instantiate(Resources.Load(slotPath)) as GameObject;
                    slot.transform.SetParent(scroll.transform.FindChild("NaiseiContent").transform);
                    slot.transform.localScale = new Vector2(1, 1);

                    //Bldg
                    GameObject naiseiName = slot.transform.FindChild("NaiseiName").gameObject;
                    naiseiName.GetComponent <Text>().text = naiseiNameText;
                    string     bldgPath = "Prefabs/Naisei/Bldg/" + naiseiMst.param [i].code + "_s";
                    GameObject bldg     = Instantiate(Resources.Load(bldgPath)) as GameObject;
                    bldg.transform.SetParent(naiseiName.transform);
                    RectTransform bldgTransform = bldg.GetComponent <RectTransform> ();
                    bldgTransform.anchoredPosition       = new Vector3(0, -315, 0);
                    bldg.transform.localScale            = new Vector2(3, 3);
                    bldg.GetComponent <Button>().enabled = false;

                    //Some Value
                    naiseiName.transform.FindChild("NaiseiExp").GetComponent <Text>().text = naiseExpText;
                    string target  = naiseiMst.param [i].target;
                    int    effect1 = naiseiMst.param [i].effect1;

                    int techId = 0;
                    if (Application.systemLanguage != SystemLanguage.Japanese)
                    {
                        if (target == "KB")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Cavalry Item";
                            techId = 2;
                        }
                        else if (target == "TP")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Gun Item";
                            techId = 1;
                        }
                        else if (target == "snb")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Ninja";
                            techId = 3;
                        }
                    }
                    else
                    {
                        if (target == "KB")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "騎馬素材";
                            techId = 2;
                        }
                        else if (target == "TP")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "鉄砲素材";
                            techId = 1;
                        }
                        else if (target == "snb")
                        {
                            naiseiName.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "忍";
                            techId = 3;
                        }
                    }
                    //Label & Effect Value Adjustment
                    effect1 = effect1 * 2;
                    naiseiName.transform.FindChild("NaiseiEffectValue").GetComponent <Text> ().text = "+" + effect1;

                    naiseiName.transform.FindChild("RequiredHyourou").GetComponent <Text> ().text = naiseiMst.param [i].hyourou.ToString();
                    GameObject createButton = naiseiName.transform.FindChild("CreateButton").gameObject;
                    createButton.GetComponent <BuildNaiseiWithItem> ().techId          = techId;
                    createButton.GetComponent <BuildNaiseiWithItem> ().panelId         = int.Parse(name);
                    createButton.GetComponent <BuildNaiseiWithItem> ().naiseiId        = i;
                    createButton.GetComponent <BuildNaiseiWithItem>().naiseiName       = naiseiNameText;
                    createButton.GetComponent <BuildNaiseiWithItem> ().requiredHyourou = naiseiMst.param [i].hyourou;
                }
            }

            //tutorial
            if (Application.loadedLevelName == "tutorialNaisei")
            {
                GameObject.Find("board(Clone)").transform.FindChild("close").gameObject.SetActive(false);

                foreach (Transform child in scroll.transform.FindChild("NaiseiContent").transform)
                {
                    if (child.transform.FindChild("NaiseiName").transform.FindChild("CreateButton").GetComponent <BuildNaisei>())
                    {
                        if (child.transform.FindChild("NaiseiName").transform.FindChild("CreateButton").GetComponent <BuildNaisei>().naiseiId != 1)
                        {
                            child.gameObject.SetActive(false);
                        }
                    }
                    else if (child.transform.FindChild("NaiseiName").transform.FindChild("CreateButton").GetComponent <BuildNaiseiWithItem>())
                    {
                        child.gameObject.SetActive(false);
                    }
                }

                TutorialController tutorialScript = new TutorialController();
                Vector2            vect           = new Vector2(0, 30);
                GameObject         createButton   = GameObject.Find("CreateButton").gameObject;
                GameObject         pointUp        = tutorialScript.SetPointer(createButton, vect);
                pointUp.transform.localScale = new Vector2(100, 100);

                //set zero
                GameObject.Find("RequiredMoney").GetComponent <Text>().text   = "0";
                GameObject.Find("RequiredHyourou").GetComponent <Text>().text = "0";
                createButton.GetComponent <BuildNaisei>().requiredHyourou     = 0;
                createButton.GetComponent <BuildNaisei>().requiredMoney       = 0;
            }
        }
        else
        {
            if (int.Parse(lv) == 20)
            {
                Message msg = new Message();
                msg.makeMessage(msg.getMessage(116));
                audioSources[4].Play();
            }
            else
            {
                BusyoStatusButton pop   = new BusyoStatusButton();
                GameObject        board = pop.commonPopup(21);
                audioSources[0].Play();

                //Update
                if (Application.systemLanguage != SystemLanguage.Japanese)
                {
                    GameObject.Find("popText").GetComponent <Text> ().text = "Development";
                }
                else
                {
                    GameObject.Find("popText").GetComponent <Text>().text = "内政強化";
                }

                string     naiseiUpdatePath = "Prefabs/Naisei/NaiseiUpdate";
                GameObject NaiseiUpdate     = Instantiate(Resources.Load(naiseiUpdatePath)) as GameObject;
                NaiseiUpdate.transform.SetParent(board.transform);
                NaiseiUpdate.transform.localScale = new Vector2(1, 1);
                RectTransform naiseiUpdateTransform = NaiseiUpdate.GetComponent <RectTransform> ();
                naiseiUpdateTransform.anchoredPosition = new Vector3(0, -40, 0);

                string bldgRank = "";
                int    nextLv   = int.Parse(lv) + 1;
                if (nextLv < 8)
                {
                    bldgRank = "s";
                }
                else if (nextLv < 15)
                {
                    bldgRank = "m";
                }
                else if (15 <= nextLv)
                {
                    bldgRank = "l";
                }
                string bldg    = type + "_" + bldgRank;
                string pathMod = "";
                if (type == "shiro")
                {
                    pathMod = "Shiro/";
                }
                else
                {
                    pathMod = "Bldg/";
                }

                string     bldgPath = "Prefabs/Naisei/" + pathMod + bldg;
                GameObject bldgObj  = Instantiate(Resources.Load(bldgPath)) as GameObject;
                bldgObj.transform.SetParent(NaiseiUpdate.transform);
                bldgObj.transform.localScale = new Vector3(1.5f, 1.5f, 1);
                RectTransform bldgTransform = bldgObj.GetComponent <RectTransform> ();
                bldgTransform.anchoredPosition          = new Vector3(-250, 0, 0);
                bldgObj.GetComponent <Button>().enabled = false;

                //Special Shiro
                if (type == "shiro")
                {
                    string shiroTmp = "shiro" + GameObject.Find("NaiseiController").GetComponent <NaiseiController>().activeKuniId;
                    if (PlayerPrefs.HasKey(shiroTmp))
                    {
                        int shiroId = PlayerPrefs.GetInt(shiroTmp);
                        if (shiroId != 0)
                        {
                            string imagePath = "Prefabs/Naisei/Shiro/Sprite/" + shiroId;
                            bldgObj.GetComponent <Image>().sprite =
                                Resources.Load(imagePath, typeof(Sprite)) as Sprite;
                        }
                    }
                }

                //Detail Info
                GameObject baseObj = NaiseiUpdate.transform.FindChild("Base").gameObject;
                baseObj.transform.FindChild("FromLv").GetComponent <Text>().text = "Lv" + lv;
                baseObj.transform.FindChild("ToLv").GetComponent <Text>().text   = nextLv.ToString();

                //Rank
                string nowRank = "";
                string nxtRank = "";
                if (type == "yr" || type == "kb" || type == "tp" || type == "ym" || type == "kb" || type == "snb")
                {
                    if (Application.systemLanguage != SystemLanguage.Japanese)
                    {
                        if (int.Parse(lv) < 11)
                        {
                            nowRank = "Low";
                        }
                        else if (int.Parse(lv) < 16)
                        {
                            nowRank = "Mid";
                        }
                        else
                        {
                            nowRank = "High";
                        }
                    }
                    else
                    {
                        if (int.Parse(lv) < 11)
                        {
                            nowRank = "下";
                        }
                        else if (int.Parse(lv) < 16)
                        {
                            nowRank = "中";
                        }
                        else
                        {
                            nowRank = "上";
                        }
                    }
                    if (Application.systemLanguage != SystemLanguage.Japanese)
                    {
                        if ((int.Parse(lv) + 1) < 11)
                        {
                            nxtRank = "Low";
                        }
                        else if ((int.Parse(lv) + 1) < 16)
                        {
                            nxtRank = "Mid";
                        }
                        else
                        {
                            nxtRank = "High";
                        }
                    }
                    else
                    {
                        if ((int.Parse(lv) + 1) < 11)
                        {
                            nxtRank = "下";
                        }
                        else if ((int.Parse(lv) + 1) < 16)
                        {
                            nxtRank = "中";
                        }
                        else
                        {
                            nxtRank = "上";
                        }
                    }
                }

                baseObj.transform.FindChild("NowNaiseiEffectValue").GetComponent <Text>().text  = nowRank + " +" + effect.ToString();
                baseObj.transform.FindChild("NextNaiseiEffectValue").GetComponent <Text>().text = nxtRank + " +" + effectNextLv.ToString();
                baseObj.transform.FindChild("RequiredMoney").GetComponent <Text>().text         = moneyNextLv.ToString();
                baseObj.transform.FindChild("RequiredHyourou").GetComponent <Text>().text       = requiredHyourou.ToString();


                if (type == "shiro")
                {
                    if (Application.systemLanguage != SystemLanguage.Japanese)
                    {
                        baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Defence";
                    }
                    else
                    {
                        baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "防備";
                    }
                    baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text> ().enabled = false;
                    if (Application.systemLanguage != SystemLanguage.Japanese)
                    {
                        baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text = "Castle";
                    }
                    else
                    {
                        baseObj.transform.FindChild("BldgName").GetComponent <Text>().text = "城";
                    }
                    baseObj.transform.FindChild("NaiseiEffectLabel2").GetComponent <Text> ().enabled    = true;
                    baseObj.transform.FindChild("NowNaiseiEffectValue2").GetComponent <Text>().enabled  = true;
                    baseObj.transform.FindChild("NextNaiseiEffectValue2").GetComponent <Text>().enabled = true;
                    baseObj.transform.FindChild("arrow2").GetComponent <Image> ().enabled            = true;
                    baseObj.transform.FindChild("NowNaiseiEffectValue2").GetComponent <Text>().text  = "+" + effect.ToString();
                    baseObj.transform.FindChild("NextNaiseiEffectValue2").GetComponent <Text>().text = "+" + effectNextLv.ToString();

                    //Special Castle Check
                    string        nowQty         = PlayerPrefs.GetString("shiro");
                    List <string> nowQtyList     = new List <string>();
                    char[]        delimiterChars = { ',' };
                    if (nowQty != "" && nowQty != null)
                    {
                        //scroll view
                        string     scrollPath = "Prefabs/Naisei/Shiro/ShiroScrollView";
                        GameObject scroll     = Instantiate(Resources.Load(scrollPath)) as GameObject;
                        scroll.transform.SetParent(board.transform);

                        GameObject content = scroll.transform.FindChild("Content").gameObject;
                        scroll.transform.localScale    = new Vector2(0.8f, 0.8f);
                        scroll.transform.localPosition = new Vector2(-240, -240);

                        nowQtyList = new List <string>(nowQty.Split(delimiterChars));
                        string path  = "Prefabs/Item/Shiro/shiro";
                        Shiro  shiro = new Shiro();
                        for (int i = 0; i < nowQtyList.Count; i++)
                        {
                            string imagePath = "Prefabs/Naisei/Shiro/Sprite/";
                            int    qty       = int.Parse(nowQtyList[i]);
                            if (qty != 0)
                            {
                                int        shiroId = i + 1;
                                GameObject item    = Instantiate(Resources.Load(path)) as GameObject;
                                item.transform.SetParent(content.transform);
                                item.transform.localScale    = new Vector2(1, 1);
                                item.transform.localPosition = new Vector3(0, 0, 0);
                                item.transform.FindChild("Qty").GetComponent <Text>().text = qty.ToString();

                                string name = shiro.getName(shiroId);
                                item.transform.FindChild("name").GetComponent <Text>().text = name;
                                imagePath = imagePath + shiroId;
                                item.transform.FindChild("image").GetComponent <Image>().sprite =
                                    Resources.Load(imagePath, typeof(Sprite)) as Sprite;

                                //value
                                item.name = "shiro" + shiroId;
                                item.GetComponent <ItemInfo>().posessQty = qty;
                                item.GetComponent <ItemInfo>().itemId    = shiroId;
                                item.GetComponent <ItemInfo>().itemName  = name;
                            }
                        }
                        //scroll.GetComponent<ScrollRect>().enabled = false;
                    }
                }
                else
                {
                    //Destroy Button
                    string     dstryPath   = "Prefabs/Naisei/DestroyButton";
                    GameObject dstryBtnObj = Instantiate(Resources.Load(dstryPath)) as GameObject;
                    dstryBtnObj.transform.SetParent(GameObject.Find("board(Clone)").transform);
                    dstryBtnObj.transform.localPosition = new Vector2(-480, -220);
                    dstryBtnObj.transform.localScale    = new Vector2(1, 1);
                    dstryBtnObj.GetComponent <NaiseiDestroy> ().areaId       = int.Parse(name);
                    dstryBtnObj.GetComponent <NaiseiDestroy> ().activeKuniId = GameObject.Find("NaiseiController").GetComponent <NaiseiController> ().activeKuniId;

                    baseObj.transform.FindChild("NaiseiEffectLabel2").GetComponent <Text> ().enabled    = false;
                    baseObj.transform.FindChild("NowNaiseiEffectValue2").GetComponent <Text> ().enabled = false;
                    baseObj.transform.FindChild("arrow2").GetComponent <Image> ().enabled = false;
                    baseObj.transform.FindChild("NextNaiseiEffectValue2").GetComponent <Text> ().enabled = false;

                    if (Application.systemLanguage != SystemLanguage.Japanese)
                    {
                        if (type == "shop")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Money";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Store";
                        }
                        else if (type == "ta")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Stamina";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Farm";
                        }
                        else if (type == "yr")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Spear Item";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Sword Blacksmith";
                        }
                        else if (type == "kb")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Cavalry Item";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Stable";
                        }
                        else if (type == "tp")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Gun Item";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Gun Blacksmith";
                        }
                        else if (type == "ym")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Bow Item";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Archery House";
                        }
                        else if (type == "kzn")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Money";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Mine";
                        }
                        else if (type == "nbn")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Christian";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Church";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text> ().enabled     = false;
                        }
                        else if (type == "kgy")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Culture";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Court Noble House";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text> ().enabled     = false;
                        }
                        else if (type == "snb")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Ninja";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Ninja Town";
                        }
                        else if (type == "bky")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Buddhism";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Temple";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text> ().enabled     = false;
                        }
                        else if (type == "hsy")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Additional Soldier";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Barrack";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text> ().enabled     = false;
                        }
                        else if (type == "trd")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text> ().text = "Defence";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text> ().text          = "Fort";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text> ().enabled     = false;
                        }
                    }
                    else
                    {
                        if (type == "shop")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "金";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "商人町";
                        }
                        else if (type == "ta")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "兵糧";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "村落";
                        }
                        else if (type == "yr")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "槍刀素材";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "刀鍛冶屋";
                        }
                        else if (type == "kb")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "騎馬素材";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "厩舎";
                        }
                        else if (type == "tp")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "鉄砲素材";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "鉄砲鍛冶屋";
                        }
                        else if (type == "ym")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "弓矢素材";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "皮職人";
                        }
                        else if (type == "kzn")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "金";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "鉱山";
                        }
                        else if (type == "nbn")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "基督教";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "南蛮寺";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text>().enabled     = false;
                        }
                        else if (type == "kgy")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "文化";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "公家館";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text>().enabled     = false;
                        }
                        else if (type == "snb")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "忍";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "忍の里";
                        }
                        else if (type == "bky")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "仏教";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "寺";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text>().enabled     = false;
                        }
                        else if (type == "hsy")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "足軽兵数";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "兵舎";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text>().enabled     = false;
                        }
                        else if (type == "trd")
                        {
                            baseObj.transform.FindChild("NaiseiEffectLabel").GetComponent <Text>().text = "防備";
                            baseObj.transform.FindChild("BldgName").GetComponent <Text>().text          = "砦";
                            baseObj.transform.FindChild("NaiseiUnit").GetComponent <Text>().enabled     = false;
                        }
                    }
                }

                //Button Setting
                GameObject updateBtn = baseObj.transform.FindChild("NaiseiUpdateButton").gameObject;
                updateBtn.GetComponent <UpdateNaisei>().activeKuniId    = GameObject.Find("NaiseiController").GetComponent <NaiseiController>().activeKuniId;
                updateBtn.GetComponent <UpdateNaisei>().requiredMoney   = moneyNextLv;
                updateBtn.GetComponent <UpdateNaisei>().requiredHyourou = requiredHyourou;
                updateBtn.GetComponent <UpdateNaisei>().areaId          = name;
                updateBtn.GetComponent <UpdateNaisei>().naiseiId        = naiseiId;
                updateBtn.GetComponent <UpdateNaisei>().targetLv        = nextLv;
                updateBtn.GetComponent <UpdateNaisei>().naiseiName      = naiseiName;
            }
        }
    }