コード例 #1
0
    //public void SpendTalentPoint(string talent){
    public void SpendTalentPoint(int talentId)
    {
        if (PlayerModel.TalentPoints > 0)
        {
            switch (talentId)
            {
            case 0:
                PlayerModel.TalentPower++;

                break;

            case 1:
                PlayerModel.TalentSpeed++;
                break;

            case 2:
                PlayerModel.TalentHealth++;
                break;

            case 3:
                PlayerModel.TalentArrows++;
                break;
            }

            PlayerModel.TalentPoints--;

            PlayerModel.CalculaterValues();

            PlayerModel.Save();

            DisplayTalentPoints();
        }
    }
コード例 #2
0
 public void Start()
 {
     PlayerModel.CalculaterValues();
 }