Пример #1
0
    public void ConfirmChoice()
    {
        Debug.Log("Selection confirmed: " + SelectedChoice.Attribute);


        switch (SelectedChoice.Type)
        {
        case LevelController.ChoiceType.Attribute:
            LevelUp(character, character.Stats[SelectedChoice.Attribute]);
            break;

        case LevelController.ChoiceType.Class:
            SelectClass(character, SelectedChoice.Class);
            break;

        case LevelController.ChoiceType.Skill:
            break;

        default:
            throw new ArgumentOutOfRangeException();
        }

        Close();

        character.LevelUps++;

        //TODO: use goblin change event
        GoblinUIList.UpdateGoblinList();

        //TODO: use a character stat change event instead.
        CharacterView.ShowCharacter(character);


        Debug.Log("Closing level view");
        ViewHolder.SetActive(false);
    }