/// <summary> /// Try to buy and equip user selected item. /// </summary> /// <param name="selectedItem">Shop item to buy and equip.</param> public void TryBuyAndEquipItem(ShopItem selectedItem) { if (!IsSelectedItemCanBeBought) { return; } selectedItem.EquipItem(); playerMoney.TrySubtractMoney(selectedItem.buyCost); }