Updated to use CurrencyAmmount
This commit is contained in:
@@ -46,7 +46,7 @@ namespace Fruitomation.Game
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@ namespace Fruitomation.Game.Items
|
||||
[SerializeField, InspectorReadOnly("Item Type")]
|
||||
private ItemType InternalItemType = ItemType.None;
|
||||
|
||||
[SerializeField, InspectorReadOnly("Item Value")]
|
||||
private CurrencyAmount InternalItemValue;
|
||||
|
||||
public ItemType CurrentType
|
||||
{
|
||||
get => InternalItemType;
|
||||
@@ -138,8 +141,7 @@ namespace Fruitomation.Game.Items
|
||||
if (harvest)
|
||||
{
|
||||
ItemInfo info = ItemInfoRegistry.Get(CurrentType);
|
||||
float money = Random.Range(info.MinMoney, info.MaxMoney);
|
||||
MoneyController.Add(money);
|
||||
MoneyController.Add(InternalItemValue);
|
||||
}
|
||||
|
||||
Destroy(gameObject);
|
||||
|
||||
@@ -71,8 +71,7 @@ namespace Fruitomation.Game.Items
|
||||
[SerializeField] private CustomBehaviourType CustomBehaviour;
|
||||
|
||||
public GameObject Prefab;
|
||||
public float MinMoney;
|
||||
public float MaxMoney;
|
||||
public float BaseItemValue;
|
||||
|
||||
public CustomItemBehaviour GetCustomBehaviour()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user