void UseSkill(Button button, SkillModel skill) { //don't do anything when there is no skill or PP are 0 if (skill == null || skill.CurrentPP <= 0) { return; } //call it in fight manager fightManager.UseSkill(skill); //change PP in text button.GetComponentInChildren <Text>().text = skill.GetButtonName(); }