25 lines
747 B
C#
25 lines
747 B
C#
using System.Collections.Generic;
|
|
|
|
namespace DanieleMarotta.RiversongCodeShowcase
|
|
{
|
|
public class UnlocksState
|
|
{
|
|
private Dictionary<int, int> _buildingUnlockLookup = new();
|
|
|
|
public HashSet<int> Unlocked { get; } = new();
|
|
|
|
public HashSet<int> UnlockedBuildings { get; } = new();
|
|
|
|
public HashSet<int> TeasedBuildings { get; } = new();
|
|
|
|
public void AddBuildingUnlock(BuildingDefinition building, int unlockId)
|
|
{
|
|
_buildingUnlockLookup.Add(building.RuntimeId, unlockId);
|
|
}
|
|
|
|
public bool TryGetBuildingUnlock(BuildingDefinition building, out int unlockId)
|
|
{
|
|
return _buildingUnlockLookup.TryGetValue(building.RuntimeId, out unlockId);
|
|
}
|
|
}
|
|
} |