Exemple #1
0
    public void showSelectedCharaInfo(int argsInt)
    {
        //表示情報の変更
        //選択情報の移動も同時に行う
        selectedIconIndex = argsInt;

        saveCharaValueClass tmpChara = sVMS.getSaveCharaValue(selectedIconIndex);

        expLevelInfo tmpExpInfo = characterLevelManagerGetter.getManager().calcLv(tmpChara.exp);

        string tmpCap = "Level " + tmpChara.level + "\n\n";

        tmpCap += tmpChara.getCharaName() + "\n";
        tmpCap += "Next Level\n" + tmpExpInfo.nextExp + "\n";
        tmpCap += "\n";
        tmpCap += "Equipment:\n";

        _charaInfoText.text = tmpCap;
    }
    void battleStageStarter( )
    {
        loadedCharaList = new gameStartingVariable();

        //charaStartBattleInfo cSBI = new charaStartBattleInfo (sVMS.getNowSceneChangeValue ());
        //sVMS.getNowSceneChangeValue ().sceneFileName = "0-3-0-0";

        charaStartBattleInfo cSBI = new charaStartBattleInfo(sVMS.getNowSceneChangeValue());

        if (_forDebug)
        {
            //for debug
            //インスペクター上で設定する
        }
        else
        {
            _sortieCharas = sVMS.getSortieCharaNo();
        }


        for (int loopI = 0; loopI < 9; loopI++)
        {
            enumCharaNum tmpC = (enumCharaNum)loopI;

            //すべてのキャラを作成
            if (_sortieCharas[loopI])
            {
                saveCharaValueClass tmpCVC = sVMS.getSaveCharaValue((int)tmpC);
                //Debug.Log (tmpCVC.exp);
                loadedCharaList.setData(tmpC, tmpCVC.exp, 0);
            }
        }

        //Prefabsからロード
        //loadedCharaList.setData (enumCharaNum.syusuran_02, 1, 0);
        //chataList.setData (enumCharaNum.suzusiro_03, 1, 0);
        //chataList.setData (enumCharaNum.gyokuran_04, 1, 0);

        for (int i = 0; i < loadedCharaList.charalist.Count; i++)
        {
            gameStartingVariable_Single tmpChara = loadedCharaList.charalist[i];

            //charaMain
            tmpChara.charaBase = Instantiate(tmpChara.Prefab_charaGrh) as GameObject;
            tmpChara.charaBase.transform.name = "charaBase_" + tmpChara.CharaNumber.ToString();

            //キャラクターの初期位置
            tmpChara.charaBase.transform.position = cSBI.getCharaPosition(i);

            //charaAnime
            Animator tmpAnime = tmpChara.charaBase.transform.FindChild("charaAnime").GetComponent <Animator>();
            tmpAnime.runtimeAnimatorController = this.getCharaAnimator(tmpChara.CharaNumber);

            //charaSprite
            SpriteRenderer tmpSprite = tmpChara.charaBase.transform.FindChild("charaAnime").GetComponent <SpriteRenderer>();
            tmpSprite.sprite = this.getCharaSprite(tmpChara.CharaNumber);

            tmpChara.charaScript = tmpChara.charaBase.GetComponentInParent <allCharaBase>();

            tmpChara.charaScript.thisChara = new charaUserStatus(tmpChara.CharaNumber, tmpChara.totalExp);                              //経験値の大本もここで渡す
            tmpChara.charaScript.calcdExp  = characterLevelManagerGetter.getManager().calcLv(tmpChara.totalExp);                        //次への経験値などの経験値情報

            tmpChara.charaFlag = Instantiate(tmpChara.Prefab_charaFlag, cSBI.getFlagPosition(i), Quaternion.identity) as GameObject;

            tmpChara.charaScript.thisCharaIndex = i;
            tmpChara.charaScript.thisCharaFlag  = tmpChara.charaFlag;

            tmpChara.charaScript.movingStopFlag = false;
        }

        //キャラアイコンの1ページ目の作成
        this.createCharaIconSet(1);
    }