예제 #1
0
    public expLevelInfo calcLv(float argsExp)
    {
        expLevelInfo retExp = new expLevelInfo();

        for (int i = 0; i < 200; i++)
        {
            if (expList[i] > argsExp)
            {
                //対象の経験値より小さい場合,このレベル

                retExp.Lv      = i;
                retExp.nextExp = expList[i] - argsExp;

                if (i == 0)
                {
                    retExp.beforeExp = 0;
                }
                else
                {
                    retExp.beforeExp = expList[i - 1];
                }

                retExp.nextLvExp = expList[i];
                retExp.totalExp  = argsExp;

                break;
            }
        }
        return(retExp);
    }
예제 #2
0
    public charaUserStatus(enumCharaNum charaNo, float charaExp)
    {
        this.battleStatus = new charaBattleStatus(charaNo);
        this.totalExp     = charaExp;
        this.charaNo      = charaNo;

        expLevelInfo tmpExp = characterLevelManagerGetter.getManager().calcLv(charaExp);

        this.nowLv   = tmpExp.Lv;
        this.nextExp = tmpExp.nextExp;

        this.initParameter();
    }
예제 #3
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;
    }
예제 #4
0
    //
    //Exp
    //
    public void getExp(float argsExp)
    {
        thisChara.totalExp += argsExp;

        this.calcdExp = characterLevelManagerGetter.getManager().calcLv(thisChara.totalExp);

        if (thisChara.nowLv != this.calcdExp.Lv)
        {
            //
            thisChara.initParameter();
            thisChara.nowLv = this.calcdExp.Lv;

            soundManagerGetter.getManager().playOneShotSound(enm_oneShotSound.Voice_LvUp);

            GameObject tmpGO = Instantiate(_LevelUpEff);
            tmpGO.transform.parent        = this.transform;
            tmpGO.transform.localPosition = Vector3.zero;

            this.createHPBar();
        }
    }