Example #1
0
    //IEnumerator StopExpText()
    //{
    //    yield return new WaitForSeconds(1f);
    //    expGainText.gameObject.SetActive(false);
    //}

    private void InitialLevelUp(int level)
    {
        var changeweapon = player.GetComponent <ChangeWeapon>();

        for (int i = 0; i < level; i++)
        {
            lifeStat.stat += 10;
            strStat.stat  += 10;
            dexStat.stat  += 10;

            player.UpdateMaxLife(player.maxLife + 10 * 25f);
            changeweapon.str += 5;
            changeweapon.dex += 5;
            maxExp           *= expFactor;
        }
    }