Beispiel #1
0
        public override void EquipItem(Item item)
        {
            AbilityManager manager = PlayerInfo.GetPlayer().GetComponent <AbilityManager>();

            if (manager.AbilityTypeIsAlreadyEquiped(item.name) && abilityCooldownDisplay.ability?.name != item.name)
            {
                return;
            }

            base.EquipItem(item);
            AbilityGem gem = (item as AbilityGem);

            if (gem == null)
            {
                return;
            }

            manager.SetNewAbility(gem, abilityCooldownDisplay);
        }
 private void DisplayAbilityText(AbilityGem abilityGem)
 {
     abilityText.text = abilityGem.GetDescription();
 }