display player money, dialog when player have not enough money
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
namespace Assets.Scripts.Actions
|
||||
using Assets.Scripts.Actions.Interfaces;
|
||||
|
||||
namespace Assets.Scripts.Actions
|
||||
{
|
||||
public class Eat : BaseAction
|
||||
public class Eat : BaseAction, ISellableItem
|
||||
{
|
||||
public double Cost { get; private set; }
|
||||
private int energyPerTick;
|
||||
public Eat(int duration, int energyPerTick, double cost) : base(duration)
|
||||
{
|
||||
Cost = cost;
|
||||
this.energyPerTick = energyPerTick;
|
||||
}
|
||||
public override void ApplyAction(PlayerController playerController)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 75ecd68a88c4c904393604b692b01a43
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
namespace Assets.Scripts.Actions.Interfaces
|
||||
{
|
||||
internal interface ISellableItem
|
||||
{
|
||||
public double Cost { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11ca03325bf76704b91eb2f9b2fafec9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user