private void EquipFromInventory(Item item) { if (item is EatableItem) { EI = (EatableItem)item; Healing = EI.healingDone; player.Heal(Healing); inventory.RemoveItem(item); } if (item is EquipableItem) { Equip((EquipableItem)item); AttaquePersonnageEnPlus = 10 + equipmentPanel.Nombreattaque(); AttackDisplay.text = AttaquePersonnageEnPlus.ToString(); mmplayer.SetAttaque(AttaquePersonnageEnPlus); speed = equipmentPanel.nombreDeSpeed(); pcm.SetSpeed(speed); DefencPersonnage = equipmentPanel.NombreDefence(); DeffenceDisplay.text = DefencPersonnage.ToString(); player.AjouterArmure(DefencPersonnage); } }