Removed currency ammount
This commit is contained in:
@@ -21,8 +21,8 @@ namespace Fruitomation.Game.Items
|
||||
[SerializeField, InspectorReadOnly("Item Type")]
|
||||
private ItemType InternalItemType = ItemType.None;
|
||||
|
||||
[SerializeField, InspectorReadOnly("Item Value")]
|
||||
private CurrencyAmount InternalItemValue;
|
||||
[SerializeField, InspectorReadOnly]
|
||||
private double InternalItemValue;
|
||||
|
||||
public ItemType CurrentType
|
||||
{
|
||||
@@ -84,6 +84,16 @@ namespace Fruitomation.Game.Items
|
||||
ItemInfo info = ItemInfoRegistry.Get(CurrentType);
|
||||
CurrentChild = Instantiate(info.Prefab, transform);
|
||||
|
||||
if (info.OverrideCost)
|
||||
{
|
||||
InternalItemValue = info.Cost;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
InternalItemValue = Mathf.Pow((float)InternalItemValue, 1.1f);
|
||||
}
|
||||
|
||||
CustomBehaviour = info.GetCustomBehaviour();
|
||||
if (CustomBehaviour is not null)
|
||||
{
|
||||
@@ -143,7 +153,6 @@ namespace Fruitomation.Game.Items
|
||||
{
|
||||
if (harvest)
|
||||
{
|
||||
ItemInfo info = ItemInfoRegistry.Get(CurrentType);
|
||||
MoneyController.Add(InternalItemValue);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,8 +70,9 @@ namespace Fruitomation.Game.Items
|
||||
|
||||
[SerializeField] private CustomBehaviourType CustomBehaviour;
|
||||
|
||||
public bool OverrideCost;
|
||||
public double Cost;
|
||||
public GameObject Prefab;
|
||||
public float BaseItemValue;
|
||||
|
||||
public CustomItemBehaviour GetCustomBehaviour()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user