private void CleanupSlot(SkillSlot slot) { slot.Skill.CooldownStarted -= OnSkillCooldownStarted; slot.Skill.CooldownUpdated -= OnSkillCooldownUpdated; slot.Skill.CooldownFinished -= OnSkillCooldownFinished; slot.ChangeSkill(slot.SkillType == SkillType.Weapon ? GetDefaultWeaponSkill() : Skill.Empty); }
private static void Swap(SkillSlot slotA, SkillSlot slotB) { var temp = slotA.Skill; slotA.ChangeSkill(slotB.Skill); slotB.ChangeSkill(temp); }
private void SetupSlot(SkillSlot slot, Skill skill) { skill.Caster = gameObject; skill.CooldownStarted += OnSkillCooldownStarted; skill.CooldownUpdated += OnSkillCooldownUpdated; skill.CooldownFinished += OnSkillCooldownFinished; slot.ChangeSkill(skill); }