public void OnTacklePickedUp(TackleInfo tackle) { // pick up skill tackle if (tackle.tackleProperty == TackleProperty.SKILL) { SkillSlot slot_Skill = (SkillSlot)InventoryManager.GetInstance.GetAvailableSlot(); slot_Skill.SetSlotImage(tackle.tackleIcon); slot_Skill.SlotTackleType = tackle.tackleContent; if (slot_Skill.SlotTackleType == TackleContent.SWORD) { slot_Skill.SkillCoolDownDuration = _motor.waveCooldown; _motor._isWaveEnabled = true; } else if (slot_Skill.SlotTackleType == TackleContent.DAGGER) { slot_Skill.SkillCoolDownDuration = _motor.throwCooldown; _motor._isThrowEnabled = true; } else if (slot_Skill.SlotTackleType == TackleContent.DASH_SHOE) { slot_Skill.SkillCoolDownDuration = _motor.dashCooldown; _motor._isDashEnabled = true; } slot_Skill.FillSlot(); if (tackle.tackleContent == TackleContent.DAGGER) { if (PickUpDaggerSkill != null) { PickUpDaggerSkill(); } } Debug.Log(string.Format("Put tackle: {0} into slot: {1}", tackle.tackleContent, slot_Skill.slotIndex)); } // pick up bonus tackle else if (tackle.tackleProperty == TackleProperty.BONUS) { if (tackle.tackleContent == TackleContent.HEALTH_POINT) { GetComponent <Damageable>().GainHealth(1); } } }