Exemplo n.º 1
0
    public void ApplySkillPoints()
    {
        General_Skillpoints.GetComponent <Text> ().text = currentCharacter.G_SkillPoints + "";

        switch (currentSkill.SkillIdentifier)
        {
        case 0:
            this.SkillPoints = currentCharacter.G_SkillPoints + currentCharacter.O_Skillpoints;
            Type_Text.GetComponent <Text> ().text        = "Offensive Skillpoints";
            Type_Skillpoints.GetComponent <Text> ().text = currentCharacter.O_Skillpoints + "";
            break;

        case 1:
            this.SkillPoints = currentCharacter.G_SkillPoints + currentCharacter.D_Skillpoints;
            Type_Text.GetComponent <Text> ().text        = "Deffensive Skillpoints";
            Type_Skillpoints.GetComponent <Text> ().text = currentCharacter.D_Skillpoints + "";
            break;

        case 2:
            this.SkillPoints = currentCharacter.G_SkillPoints + currentCharacter.U_Skillpoints;
            Type_Text.GetComponent <Text> ().text        = "Utility Skillpoints";
            Type_Skillpoints.GetComponent <Text> ().text = currentCharacter.U_Skillpoints + "";
            break;
        }
    }
Exemplo n.º 2
0
    public void ChangeSkillPoints(int value)
    {
        int dif = 0;

        switch (currentSkill.SkillIdentifier)
        {
        case 0:
            if (currentCharacter.O_Skillpoints > -value)
            {
                currentCharacter.O_Skillpoints += value;
            }
            else
            {
                dif = currentCharacter.O_Skillpoints + value;
                currentCharacter.O_Skillpoints = 0;
            }
            Type_Skillpoints.GetComponent <Text> ().text = currentCharacter.O_Skillpoints + "";
            break;

        case 1:
            if (currentCharacter.D_Skillpoints > -value)
            {
                currentCharacter.D_Skillpoints += value;
            }
            else
            {
                dif = currentCharacter.D_Skillpoints + value;
                currentCharacter.D_Skillpoints = 0;
            }
            Type_Skillpoints.GetComponent <Text> ().text = currentCharacter.D_Skillpoints + "";
            break;

        case 2:
            if (currentCharacter.U_Skillpoints > -value)
            {
                currentCharacter.U_Skillpoints += value;
            }
            else
            {
                dif = currentCharacter.U_Skillpoints + value;
                currentCharacter.U_Skillpoints = 0;
            }
            Type_Skillpoints.GetComponent <Text> ().text = currentCharacter.U_Skillpoints + "";
            break;
        }

        this.SkillPoints += value;
        currentCharacter.G_SkillPoints += dif;
        General_Skillpoints.GetComponent <Text> ().text = currentCharacter.G_SkillPoints + "";
    }