forked from Shardstone/trail-into-darkness
First commit on my server, yey!
This commit is contained in:
25
Assets/Code/GameState/PlayModes/PartyInventoryHandler.cs
Normal file
25
Assets/Code/GameState/PlayModes/PartyInventoryHandler.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace Nox.Game {
|
||||
public class PartyInventoryHandler {
|
||||
private readonly AdventureData adventureData;
|
||||
private readonly AdventureSettings adventureSettings;
|
||||
private int currentDay;
|
||||
|
||||
public PartyInventoryHandler(AdventureData adventureData, AdventureSettings adventureSettings) {
|
||||
this.adventureData = adventureData;
|
||||
this.adventureSettings = adventureSettings;
|
||||
}
|
||||
|
||||
public void Initialize() {
|
||||
currentDay = adventureData.currentDay;
|
||||
}
|
||||
|
||||
public void Tick() {
|
||||
if(currentDay != adventureData.currentDay) {
|
||||
currentDay = adventureData.currentDay;
|
||||
if(adventureData.suppliesAvailable > 0) {
|
||||
adventureData.suppliesAvailable--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user