Added player task system. simple interaction with objects. Known issue - no player stats canvas
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Assets.Scripts.Actions
|
||||
DurationInTicks = durationTicks;
|
||||
}
|
||||
|
||||
public abstract void ApplyAction(PlayerManager playerController);
|
||||
public abstract void ApplyAction(Player playerController);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user