public bool ApplyModificators(CharacterCreationScript player, SkillsManagerScript skillManager) { player.BonusStatPoints = BonusStatPoints; if (modifiedStatDeclaration == null || modifiedStatDeclaration.Length == 0) { modifiedStatDeclaration = new CharacterAttribute[] { CharacterAttribute.Agility, CharacterAttribute.Perception, CharacterAttribute.Character, CharacterAttribute.Wits, CharacterAttribute.Physique }; } if (modifiedStatValues == null || modifiedStatValues.Length == 0) { modifiedStatValues = new int[] { Agility, Perception, Character, Wits, Physique }; } return (player.SetBackground(this) && player.ApplyBackgroundModificators(modifiedStatDeclaration, modifiedStatValues) && skillManager.ApplyBackgroundSkills(skillsGranted)); }
void Awake() { previousTagWasInvalid = false; skillManager = gameObject.GetComponentInParent <SkillsManagerScript>(); toggle = gameObject.GetComponent <Toggle>(); toggle.GetComponentInChildren <Text>().text = skill.ToString(false); skillManager.RegisterHandle(skill, toggle); toggle.onValueChanged.AddListener(OnChanged); }