merge projects and arrange script folders

This commit is contained in:
voffka81
2022-08-17 11:14:32 +03:00
parent beea2145cb
commit c0ea0addcb
35 changed files with 608 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
namespace Assets.Scripts.Actions
{
public abstract class BaseAction
{
protected int DurationInTicks { get; }
protected int ElapsedTicks { get; }
protected BaseAction(int durationTicks)
{
DurationInTicks = durationTicks;
}
public abstract void ConsumeTick();
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e13454be9a4755a4cb902ce4492c0d47
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+17
View File
@@ -0,0 +1,17 @@
namespace Assets.Scripts.Actions
{
public class Eat : BaseAction
{
private PlayerController playerController;
private int energyPerTick;
public Eat(PlayerController player, int duration, int energyPerTick, double cost) : base(duration)
{
this.playerController = player;
this.energyPerTick = energyPerTick;
}
public override void ConsumeTick()
{
playerController.foodEnergy.increase(energyPerTick);
}
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 88b69afebf64e464981dc504941a0887
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+17
View File
@@ -0,0 +1,17 @@
namespace Assets.Scripts.Actions
{
public class Relax : BaseAction
{
private PlayerController _playerController;
private int _energyPerTick;
public Relax(PlayerController player, int duration, int energyPerTick) : base(duration)
{
_playerController = player;
_energyPerTick = energyPerTick;
}
public override void ConsumeTick()
{
_playerController.restEnergy.increase(_energyPerTick);
}
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 986e2b29060766347a43dc46e30a648e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+17
View File
@@ -0,0 +1,17 @@
namespace Assets.Scripts.Actions
{
public class Work : BaseAction
{
private PlayerController playerController;
private int energyPerTick;
public Work(PlayerController player, int duration, int energyPerTick) : base(duration)
{
this.playerController = player;
this.energyPerTick = energyPerTick;
}
public override void ConsumeTick()
{
throw new System.NotImplementedException();
}
}
}
+11
View File
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a40c2851bc6f1454789ac4d529a148c9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: