コード例 #1
0
ファイル: InputSystem.cs プロジェクト: HatiEth/RBCGJ2016
 private void KassenInput()
 {
     if (Input.GetButtonDown("ActionLeft"))
     {
         motherBehaviour.denyKasse();
         KassenEvent.grabNextItem();
     }
     else if (Input.GetButtonDown("ActionDown"))
     {
         motherBehaviour.approveKasse();
         KassenEvent.grabNextItem();
     }
 }
コード例 #2
0
    // Update is called once per frame
    void Update()
    {
        anim.SetBool(animId_bHoldItem, holdItem != null);
        if (KassenEvent.isRunning())
        {
            return;
        }


        //M�gliche aktive Effekte berechnen: verschnellert oder verlangsamt Simulation
        float deltaTime = calculateEffectValue(Time.deltaTime);


        if (quicktimeEvent.running)
        {
            if (eatingProgress == 1.0f)
            {
                quicktimeEvent.finishEvent();
                finishedEating();
            }
            else
            {
                quicktimeEvent.influenceEvent(quickTimeRate * deltaTime);
                eatingProgress = Mathf.Clamp01(eatingProgress + eatingRate * Time.deltaTime);
            }
        }

        //Abklingzeit und es darf nichts halten
        if (DoSomethingCooldown[0] <= 0.0f && holdItem == null)
        {
            makeDecision();
        }

        if (DoSomethingCooldown[0] > 0)
        {
            DoSomethingCooldown[0] -= deltaTime;
        }

        if (soothedEffect[0] > 0)
        {
            soothedEffect[0] -= Time.deltaTime;
        }

        if (enrageEffect[0] > 0)
        {
            enrageEffect[0] -= Time.deltaTime;
        }
    }
コード例 #3
0
ファイル: ShiroAttack.cs プロジェクト: pratikxman/Sengoku2d
    public void changeShiroOwner()
    {
        audioSources = GameObject.Find("SEController").GetComponents <AudioSource>();
        audioSources[7].Play();
        audioSources[6].Play();

        //Change Cleared Data
        string        clearedStage       = "kuni" + kuniId;
        string        clearedStageString = PlayerPrefs.GetString(clearedStage);
        List <string> clearedStageList   = new List <string>();

        char[] delimiterChars = { ',' };
        if (clearedStageString != null && clearedStageString != "")
        {
            clearedStageList = new List <string>(clearedStageString.Split(delimiterChars));
        }
        clearedStageList.Remove(toStageId.ToString());

        string newClearedStage = "";

        for (int i = 0; i < clearedStageList.Count; i++)
        {
            if (i == 0)
            {
                newClearedStage = clearedStageList[i];
            }
            else
            {
                newClearedStage = newClearedStage + "," + clearedStageList[i];
            }
        }
        PlayerPrefs.SetString(clearedStage, newClearedStage);

        //Delete Enemy Attack Data
        foreach (string key in keyList)
        {
            string deleteLabel1 = "attack" + key;
            string deleteLabel2 = "remain" + key;
            PlayerPrefs.DeleteKey(deleteLabel1);
            PlayerPrefs.DeleteKey(deleteLabel2);
        }
        PlayerPrefs.Flush();

        //Update
        GameObject kuniMap = GameObject.Find("kuniMap" + kuniId).gameObject;

        UpdateShiroStatus(kuniMap);

        GameObject toStageObj = kuniMap.transform.FindChild("stage" + toStageId).gameObject;

        Destroy(toStageObj.transform.FindChild("cleared").gameObject);
        foreach (GameObject obs in GameObject.FindGameObjectsWithTag("StageGunzei"))
        {
            if (obs.GetComponent <TabStageGunzei>().toStageId == toStageId)
            {
                Destroy(obs);
            }
        }

        //Animation
        string     animPath   = "Prefabs/Naisei/DestroyAnim";
        GameObject destroyObj = Instantiate(Resources.Load(animPath)) as GameObject;

        destroyObj.transform.SetParent(kuniMap.transform);
        destroyObj.transform.localScale    = new Vector2(20, 20);
        destroyObj.transform.localPosition = new Vector2(toStageObj.transform.localPosition.x, toStageObj.transform.localPosition.y + 14);

        KassenEvent kassenEventScript = new KassenEvent();
        GameObject  commentObj        = kassenEventScript.MakeCommentObj(enemyDaimyoId, kuniId);
        Stage       stageScript       = new Stage();
        string      stageName         = stageScript.getStageName(kuniId, toStageId);

        if (Application.systemLanguage != SystemLanguage.Japanese)
        {
            commentObj.transform.FindChild("SerihuText").GetComponent <Text>().text = "Hahaha, I got " + stageName + " castle!";
        }
        else
        {
            commentObj.transform.FindChild("SerihuText").GetComponent <Text>().text = "ははは、" + stageName + "を盗り返したぞ!";
        }
    }
コード例 #4
0
ファイル: InputSystem.cs プロジェクト: HatiEth/RBCGJ2016
    // Update is called once per frame
    void Update()
    {
        if (KassenEvent.isRunning())
        {
            KassenInput();
            return;
        }

        if (Input.GetButtonDown("ActionLeft"))
        {
            if (motherBehaviour.handsFree() && motherBehaviour.quicktimeEvent.running)
            {
                motherBehaviour.takeFromChild();
            }
            else if (!motherBehaviour.handsFree())
            {
                motherBehaviour.throwAway();
            }
        }
        else if (Input.GetButtonDown("ActionUp") && !motherBehaviour.handsFree())
        {
            motherBehaviour.giveToChild();
        }
        else if (Input.GetButtonDown("ActionDown"))
        {
            if (motherBehaviour.handsFree())
            {
                motherBehaviour.checkChildItem();
            }
            else if (motherBehaviour.inspecting)
            {
                motherBehaviour.putIntoCart();
            }
            else
            {
                motherBehaviour.inspect();
            }
        }

        IItem item = null;

        if (motherBehaviour.handsFree())
        {
            if (Input.GetButtonDown("takeOben"))
            {
                item = takeControl.take(Enums.TakeType.Oben);
            }
            else if (Input.GetButtonDown("takeMitte"))
            {
                item = takeControl.take(Enums.TakeType.Mitte);
            }
            else if (Input.GetButtonDown("takeUnten"))
            {
                item = takeControl.take(Enums.TakeType.Unten);
            }
        }
        if (item != null)
        {
            motherBehaviour.takeFromShelf(item);
        }
    }
コード例 #5
0
    //Asset Manager
    //public AssetBundleManager assetBundleManager;
    //public Image image;

    //public IEnumerator Start() {
    //
    //assetBundleManager = GameObject.Find("AssetManager").GetComponent<AssetBundleManager>();
    //
    //    yield return StartCoroutine(assetBundleManager.LoadAssetBundleCoroutine());
    //
    //}


    public void OnClick()
    {
        cyouhouSnbRankId = transform.parent.gameObject.transform.FindChild("close").GetComponent <CloseBoard>().cyouhouSnbRankId;

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


        /*Common Process*/
        string     pathOfBoard = "Prefabs/Map/Popup";
        GameObject board       = Instantiate(Resources.Load(pathOfBoard)) as GameObject;

        board.transform.parent        = GameObject.Find("Map").transform;
        board.transform.localScale    = new Vector2(1, 0.8f);
        board.transform.localPosition = new Vector2(0, 0);
        board.name = "AttackStagePopup";
        Daimyo daimyo = new Daimyo();

        char[] delimiterChars = { ',' };

        if (Application.loadedLevelName == "tutorialMain")
        {
            board.transform.FindChild("board").transform.FindChild("close").gameObject.SetActive(false);
        }

        /*Indivisual Process by Kuni*/
        string     pathOfKuniMap = "Prefabs/Map/stage/kuniMap";
        GameObject kuniMap       = Instantiate(Resources.Load(pathOfKuniMap)) as GameObject;

        board.transform.FindChild("kuniName").GetComponent <Text> ().text = kuniName;

        string kuniImagePath   = "Prefabs/Map/stage/MapSprite/stage" + kuniId.ToString();
        string assetBundlePath = "stage" + kuniId.ToString();

        kuniMap.GetComponent <Image> ().sprite =
            Resources.Load(kuniImagePath, typeof(Sprite)) as Sprite;
        //assetBundleManager.GetSpriteFromAssetBundle(assetBundlePath); //Asset
        //assetBundleManager.assetBundleCache.Unload(false);

        //kuni
        GameObject boardObj = board.transform.FindChild("board").gameObject;

        kuniMap.transform.SetParent(boardObj.transform);
        kuniMap.transform.localScale    = new Vector2(9, 6);
        kuniMap.transform.localPosition = new Vector3(-145, 4, 0);
        kuniMap.name = "kuniMap" + kuniId;


        //Clear Stage Setting
        string clearedStage       = "kuni" + kuniId;
        string clearedStageString = "";

        if (Application.loadedLevelName != "tutorialMain")
        {
            clearedStageString = PlayerPrefs.GetString(clearedStage);
        }
        else
        {
            clearedStageString = "1,2,3,4,5,6,7,8,9,10";
        }
        List <string> clearedStageList = new List <string> ();

        if (clearedStageString != null && clearedStageString != "")
        {
            clearedStageList = new List <string> (clearedStageString.Split(delimiterChars));
        }

        //Data adjustment
        if (!clearFlg && clearedStageList.Count == 10)
        {
            clearedStageList   = new List <string>();
            clearedStageString = "";
            PlayerPrefs.DeleteKey(clearedStage);
        }


        //Default Value
        Entity_stage_mst stageMst = Resources.Load("Data/stage_mst") as Entity_stage_mst;
        int    startline          = 10 * kuniId - 10;
        string stagePath          = "Prefabs/Map/stage/stage";
        string clearedPath        = "Prefabs/Map/cleared";


        int   stageId       = 1;
        bool  clearedFlg    = false;
        int   mySenryoku    = daimyo.getSenryoku(myDaimyoId);
        int   enemySenryoku = daimyo.getSenryoku(daimyoId);
        float senryokuRatio = (float)enemySenryoku / (float)mySenryoku;

        for (int i = startline; i < startline + 10; i++)
        {
            GameObject stage = Instantiate(Resources.Load(stagePath)) as GameObject;
            stage.transform.SetParent(kuniMap.transform);
            stage.transform.localScale = new Vector2(1, 1);
            stage.name = "stage" + stageId.ToString();

            //Cleared Check
            if (clearedStageList.Contains(stageId.ToString()) == true)
            {
                GameObject cleared = Instantiate(Resources.Load(clearedPath)) as GameObject;
                cleared.transform.SetParent(stage.transform);
                stage.GetComponent <ShowStageDtl> ().clearedFlg = true;
                cleared.transform.localScale    = new Vector2(3, 5);
                cleared.transform.localPosition = new Vector2(0, 0);
                clearedFlg   = true;
                cleared.name = "cleared";
            }

            //Get Stage Info
            string stageName = "";
            int    locationX = stageMst.param [i].LocationX;
            int    locationY = stageMst.param [i].LocationY;
            int    powerType = stageMst.param [i].powerTyp;
            if (Application.systemLanguage != SystemLanguage.Japanese)
            {
                stageName = stageMst.param[i].stageNameEng;
            }
            else
            {
                stageName = stageMst.param[i].stageName;
            }
            RectTransform stageTransform = stage.GetComponent <RectTransform> ();
            stageTransform.anchoredPosition = new Vector3(locationX, locationY, 0);


            //money and exp calculation
            int minExp = getMinExp(powerType, senryokuRatio);
            int maxExp = getMaxExp(powerType, senryokuRatio);
            int exp    = UnityEngine.Random.Range(minExp, maxExp + 1);

            int minMoney = minExp * 2;
            int maxMoney = maxExp * 3;
            int money    = UnityEngine.Random.Range(minMoney, maxMoney + 1);

            string itemGrp = getRandomItemGrp();
            string itemTyp = "";
            int    itemId  = 0;
            int    itemQty = 1;

            if (itemGrp == "item")
            {
                itemTyp = getRandomItemTyp(itemGrp);
                if (itemTyp == "tech")
                {
                    itemId = getItemRank(66, 33);
                }
                else if (itemTyp == "Tama")
                {
                    itemId = getItemRank(20, 5);
                    if (itemId == 3)
                    {
                        itemQty = 100;
                    }
                    else if (itemId == 2)
                    {
                        itemQty = 20;
                    }
                    else if (itemId == 1)
                    {
                        itemQty = 5;
                    }
                }
                else
                {
                    itemId = getItemRank(20, 5);
                }
            }
            else if (itemGrp == "kahou")
            {
                itemTyp = getRandomItemTyp(itemGrp);
                Kahou  kahou     = new Kahou();
                string kahouRank = getKahouRank();
                itemId = kahou.getRamdomKahouId(itemTyp, kahouRank);
            }


            stage.GetComponent <ShowStageDtl> ().kuniId    = kuniId;
            stage.GetComponent <ShowStageDtl> ().stageId   = stageId;
            stage.GetComponent <ShowStageDtl> ().stageName = stageName;
            stage.GetComponent <ShowStageDtl> ().exp       = exp;
            stage.GetComponent <ShowStageDtl> ().showExp   = minExp + " - " + maxExp;
            stage.GetComponent <ShowStageDtl> ().money     = money;
            stage.GetComponent <ShowStageDtl> ().showMoney = minMoney + " - " + maxMoney;
            stage.GetComponent <ShowStageDtl> ().itemGrp   = itemGrp;
            stage.GetComponent <ShowStageDtl> ().itemTyp   = itemTyp;
            stage.GetComponent <ShowStageDtl> ().itemId    = itemId.ToString();
            stage.GetComponent <ShowStageDtl> ().itemQty   = itemQty;
            stage.GetComponent <ShowStageDtl> ().powerType = powerType;

            if (powerType == 2)
            {
                string imagePath = "Prefabs/Naisei/Shiro/Sprite/shiro_m";
                stage.transform.FindChild("shiroImage").GetComponent <SpriteRenderer> ().sprite =
                    Resources.Load(imagePath, typeof(Sprite)) as Sprite;
            }
            else if (powerType == 3)
            {
                string imagePath = "Prefabs/Naisei/Shiro/Sprite/shiro_l";
                stage.transform.FindChild("shiroImage").GetComponent <SpriteRenderer> ().sprite =
                    Resources.Load(imagePath, typeof(Sprite)) as Sprite;
            }



            stageId = stageId + 1;
        }


        //Line Setting
        Entity_stageLink_mst stageLinkMst = Resources.Load("Data/stageLink_mst") as Entity_stageLink_mst;
        List <string>        myStageLink  = new List <string> ();

        for (int i = 0; i < stageLinkMst.param.Count; i++)
        {
            int tempKuniId = stageLinkMst.param[i].kuniId;
            if (tempKuniId == kuniId)
            {
                myStageLink.Add(stageLinkMst.param[i].Link);
            }
        }
        List <string> myOriginalStageLink = new List <string>(myStageLink);

        //Reduce Linkcut kousaku
        string        tempLinkuct = "linkcut" + kuniId;
        string        linkcut     = PlayerPrefs.GetString(tempLinkuct);
        List <string> linkcutList = new List <string> ();

        if (linkcut != null && linkcut != "")
        {
            if (linkcut.Contains(","))
            {
                linkcutList = new List <string> (linkcut.Split(delimiterChars));
            }
            else
            {
                linkcutList.Add(linkcut);
            }
        }

        myStageLink.RemoveAll(linkcutList.Contains);



        char[] delimiterChars2 = { '-' };
        string linkPath        = "Prefabs/Map/stage/link";

        for (int j = 0; j < myStageLink.Count; j++)
        {
            List <string> linkList   = new List <string> (myStageLink[j].Split(delimiterChars2));
            string        stage1Name = linkList[0];
            string        stage2Name = linkList[1];

            //if(!clearedStageList.Contains(stage1Name) && !clearedStageList.Contains(stage2Name)){

            //1st
            string        temp1      = "stage" + stage1Name;
            GameObject    stage1     = kuniMap.transform.FindChild(temp1).gameObject;
            RectTransform rectStage1 = stage1.GetComponent <RectTransform>();
            Vector3       vect1      = new Vector3(rectStage1.anchoredPosition.x, rectStage1.anchoredPosition.y, 0);

            //2nd
            string        temp2      = "stage" + stage2Name;
            GameObject    stage2     = kuniMap.transform.FindChild(temp2).gameObject;
            RectTransform rectStage2 = stage2.GetComponent <RectTransform>();
            Vector3       vect2      = new Vector3(rectStage2.anchoredPosition.x, rectStage2.anchoredPosition.y, 0);



            //Set
            GameObject link = Instantiate(Resources.Load(linkPath)) as GameObject;
            link.transform.SetParent(kuniMap.transform);
            link.transform.localScale = new Vector2(1, 1);
            RectTransform linkRectTransform = link.GetComponent <RectTransform>();
            linkRectTransform.anchoredPosition = new Vector3(0, 0, 0);
            link.GetComponent <LineRenderer>().SetPosition(0, vect1);
            link.GetComponent <LineRenderer>().SetPosition(1, vect2);

            if (!clearedStageList.Contains(stage1Name) && !clearedStageList.Contains(stage2Name))
            {
                //Line No
                stage1.GetComponent <ShowStageDtl>().linkNo = stage1.GetComponent <ShowStageDtl>().linkNo + 1;
                stage2.GetComponent <ShowStageDtl>().linkNo = stage2.GetComponent <ShowStageDtl>().linkNo + 1;
            }

            //Name
            link.name = "link" + stage1Name + "-" + stage2Name;
        }


        //Battle Initial Setting
        StartKassen sk = GameObject.Find("BattleButton").GetComponent <StartKassen> ();

        sk.activeBusyoQty = activeBusyoQty;
        sk.activeBusyoLv  = activeBusyoLv;
        sk.activeButaiQty = activeButaiQty;
        sk.activeButaiLv  = activeButaiLv;
        sk.activeDaimyoId = daimyoId;
        sk.doumeiFlg      = doumeiFlg;

        /*Naisei Button*/
        string        seiryoku     = PlayerPrefs.GetString("seiryoku");
        List <string> seiryokuList = new List <string>();

        seiryokuList = new List <string>(seiryoku.Split(delimiterChars));

        //Only for all clear
        if (clearFlg)
        {
            string     naiseiPath = "Prefabs/Map/NaiseiButton";
            GameObject naiseiBtn  = Instantiate(Resources.Load(naiseiPath)) as GameObject;
            naiseiBtn.transform.SetParent(board.transform);
            naiseiBtn.GetComponent <StartNaisei> ().activeKuniId   = kuniId;
            naiseiBtn.GetComponent <StartNaisei> ().activeKuniName = kuniName;
            naiseiBtn.GetComponent <StartNaisei> ().clearedFlg     = clearedFlg;
            naiseiBtn.transform.localScale    = new Vector2(0.4f, 0.4f);
            naiseiBtn.transform.localPosition = new Vector2(-490, -300);
            if (Application.systemLanguage != SystemLanguage.Japanese)
            {
                boardObj.transform.FindChild("stageDtl").transform.FindChild("BattleButton").transform.FindChild("Text").GetComponent <Text> ().text = "Training";
            }
            else
            {
                boardObj.transform.FindChild("stageDtl").transform.FindChild("BattleButton").transform.FindChild("Text").GetComponent <Text>().text = "訓練";
            }
            GameObject firstStage = GameObject.Find("stage1");
            firstStage.GetComponent <ShowStageDtl>().OnClick();

            if (Application.loadedLevelName == "tutorialMain")
            {
                GameObject battleBtnObj = boardObj.transform.FindChild("stageDtl").transform.FindChild("BattleButton").gameObject;
                battleBtnObj.GetComponent <Button>().interactable = false;
                battleBtnObj.transform.FindChild("Text").GetComponent <Text>().color = new Color(220f / 255f, 190f / 255f, 40f / 255f, 100f / 255f);

                TutorialController tutorialScript = new TutorialController();
                Vector2            vect           = new Vector2(0, 100);
                GameObject         animObj        = tutorialScript.SetPointer(naiseiBtn, vect);
                animObj.transform.localScale = new Vector2(300, 300);
            }
        }
        else
        {
            //enemy attack

            GameObject        closeObj   = boardObj.transform.FindChild("close").gameObject;
            EnemyEventHandler enemyEvent = board.transform.FindChild("board").GetComponent <EnemyEventHandler>();
            enemyEvent.doEnemyEvent(kuniMap, closeObj, kuniId, daimyoId, activeBusyoQty, activeBusyoLv, activeButaiQty, activeButaiLv);

            //open shiro
            List <int> closeStageIdList = new List <int> {
                1, 2, 3, 4, 5, 6, 7, 8, 9, 10
            };

            //compare linkKuni with mySeiryoku
            List <int> linkKuniList   = new List <int>();
            List <int> linkMyKuniList = new List <int>();

            KuniInfo kuniScript = new KuniInfo();
            linkKuniList = kuniScript.getMappingKuni(kuniId);
            for (int i = 0; i < linkKuniList.Count; i++)
            {
                int linkKuniId = linkKuniList[i];
                if (seiryokuList[linkKuniId - 1] == myDaimyoId.ToString())
                {
                    linkMyKuniList.Add(linkKuniId);
                }
            }

            //open initial stage
            for (int j = 0; j < linkMyKuniList.Count; j++)
            {
                int    srcKuniId = linkMyKuniList[j];
                string linkStage = kuniScript.getLinkStage(srcKuniId, kuniId);
                linkStage = linkStage.Replace("stage", "");
                List <int> linkStageList = new List <int>(Array.ConvertAll(linkStage.Split(','),
                                                                           new Converter <string, int>((s) => { return(Convert.ToInt32(s)); })));
                closeStageIdList.RemoveAll(linkStageList.Contains);
            }


            //open cleared kuni & linked stage
            List <int> clearedStageIntList = clearedStageList.ConvertAll(x => int.Parse(x));
            closeStageIdList.RemoveAll(clearedStageIntList.Contains);
            for (int l = 0; l < clearedStageIntList.Count; l++)
            {
                int srcStageId = clearedStageIntList[l];

                for (int m = 0; m < myOriginalStageLink.Count; m++)
                {
                    List <string> linkList = new List <string>(myOriginalStageLink[m].Split(delimiterChars2));
                    int           stage1Id = int.Parse(linkList[0]);
                    int           stage2Id = int.Parse(linkList[1]);
                    if (srcStageId == stage1Id)
                    {
                        if (!getStageGunzeiExistFlg(stage1Id, stage2Id))
                        {
                            closeStageIdList.Remove(stage2Id);
                        }
                    }
                    else if (srcStageId == stage2Id)
                    {
                        if (!getStageGunzeiExistFlg(stage2Id, stage1Id))
                        {
                            closeStageIdList.Remove(stage1Id);
                        }
                    }
                }
            }


            Color closeColor = new Color(60f / 255f, 60f / 255f, 60f / 255f, 255f / 255f); //Black
            for (int k = 0; k < closeStageIdList.Count; k++)
            {
                int        closeStageId  = closeStageIdList[k];
                string     stageName     = "stage" + closeStageId.ToString();
                GameObject closeStageObj = kuniMap.transform.FindChild(stageName).gameObject;
                closeStageObj.GetComponent <Button>().enabled = false;
                closeStageObj.transform.FindChild("shiroImage").GetComponent <SpriteRenderer>().color = closeColor;
            }


            //Initial Setting
            int initStageId = 1;
            for (int i = 1; i <= 10; i++)
            {
                if (!closeStageIdList.Contains(i))
                {
                    initStageId = i;
                }
            }

            string     initStageName = "stage" + initStageId.ToString();
            GameObject firstStage    = GameObject.Find(initStageName);
            firstStage.GetComponent <ShowStageDtl>().OnClick();
        }

        //Kousaku
        if (!clearFlg)
        {
            string     pathOfScroll = "Prefabs/Map/kousaku/BusyoSelectScroll";
            GameObject scroll       = Instantiate(Resources.Load(pathOfScroll)) as GameObject;
            scroll.transform.SetParent(board.transform);
            scroll.transform.localScale = new Vector2(1, 1);
            RectTransform rectScroll = scroll.GetComponent <RectTransform> ();
            rectScroll.anchoredPosition3D = new Vector3(410, 0, 0);
            rectScroll.sizeDelta          = new Vector2(300, 750);
            scroll.name = "BusyoSelectScroll";
            scroll.SetActive(false);

            KousakuConfirm kousakuScript = GameObject.Find("LinkCutButton").GetComponent <KousakuConfirm> ();
            kousakuScript.cyouhouSnbRankId = cyouhouSnbRankId;
            kousakuScript.scrollObj        = scroll;

            KousakuConfirm kousakuScript2 = GameObject.Find("CyouryakuButton").GetComponent <KousakuConfirm> ();
            kousakuScript2.cyouhouSnbRankId = cyouhouSnbRankId;
            kousakuScript2.scrollObj        = scroll;
        }
        else
        {
            GameObject LinkCutButton = GameObject.Find("LinkCutButton").gameObject;
            LinkCutButton.GetComponent <Button> ().interactable = false;
            LinkCutButton.transform.FindChild("Text").GetComponent <Text> ().color = new Color(220f / 255f, 190f / 255f, 40f / 255f, 100f / 255f);

            GameObject CyouryakuButton = GameObject.Find("CyouryakuButton").gameObject;
            CyouryakuButton.GetComponent <Button> ().interactable = false;
            CyouryakuButton.transform.FindChild("Text").GetComponent <Text> ().color = new Color(220f / 255f, 190f / 255f, 40f / 255f, 100f / 255f);
        }


        /*Kassen Event Controller Start*/
        KassenEvent kEvent = new KassenEvent();

        kEvent.MakeEvent(clearFlg, kuniId, kuniMap, daimyoId);

        viewKuniLink(board, kuniMap, seiryokuList);

        /*Kassen Event Controller End*/
    }