Added player task system. simple interaction with objects. Known issue - no player stats canvas

This commit is contained in:
Vladimir Koshevarov
2023-02-21 18:58:06 +02:00
parent 7c26b80584
commit 59d2f7cc30
46 changed files with 2289 additions and 3121 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ namespace Assets.Scripts.Actions
DurationInTicks = durationTicks;
}
public abstract void ApplyAction(PlayerManager playerController);
public abstract void ApplyAction(Player playerController);
}
}
+2 -2
View File
@@ -19,9 +19,9 @@ namespace Assets.Scripts.Actions
}
public void ApplyAction(PlayerManager playerController)
public void ApplyAction(Player playerController)
{
playerController.PlayerStats[GameManager.StatsId.Food].increase(_energy);
playerController.PlayerStats[StatsId.Food].increase(_energy);
}
}
}
@@ -4,7 +4,7 @@
public interface IPlayerAction
{
public string Description { get; }
public void ApplyAction(PlayerManager player);
public void ApplyAction(Player player);
}
public interface ISellable
+1 -1
View File
@@ -16,7 +16,7 @@ namespace Assets.Scripts.Actions
_position = position;
Sallary = sallary;
}
public void ApplyAction(PlayerManager playerController)
public void ApplyAction(Player playerController)
{
playerController.WorkPlace = this;
}
+2 -2
View File
@@ -12,9 +12,9 @@ namespace Assets.Scripts.Actions
public string Description => throw new System.NotImplementedException();
public void ApplyAction(PlayerManager playerController)
public void ApplyAction(Player playerController)
{
playerController.PlayerStats[GameManager.StatsId.Energy].increase(_energyPerTick);
playerController.PlayerStats[StatsId.Energy].increase(_energyPerTick);
}
}
}