public void RemoveSkill(object x) { SkillButton skillButton = (SkillButton)x; if (skillButton == LeftButtonSkill) { player.OnLeftClickSkill = null; } if (skillButton == RightButtonSkill) { player.OnRightClickSkill = null; player.ActiveSkill = null; } skillButton.Remove(); skillButton.Show(); }