Fix Blueprint Class

Blueprint dependencies was a dict, should be a list
This commit is contained in:
hyperion51 2020-04-14 05:32:00 +01:00
commit dabfc62481
6 changed files with 56 additions and 21 deletions

View file

@ -13,6 +13,8 @@ public class StrategyGameManager : MonoBehaviour
public TabGroup PrimaryTabGroup;
public TabButton GalaxyTabButton;
public TabButton ZoneTabButton;
public TabButton TechTabButton;
public TechTreeMsagl TechTree;
public Prototype GalaxyZonePrototype;
public Prototype GalaxyZoneLinkPrototype;
public MeshRenderer GalaxyBackground;
@ -52,6 +54,7 @@ public class StrategyGameManager : MonoBehaviour
private float _galaxyOrthoSize = 50;
private Material _boundaryMaterial;
private Material _backgroundMaterial;
private bool _techLayoutGenerated;
void Start()
{
@ -99,6 +102,15 @@ public class StrategyGameManager : MonoBehaviour
PopulateZone();
Camera.transform.position = -Vector3.forward;
}
if (_currentTab == TechTabButton)
{
if (!_techLayoutGenerated)
{
TechTree.Blueprints = _cache.GetAll<BlueprintData>().ToArray();
TechTree.GenerateTechs();
}
}
};
_boundaryMaterial = ZoneBoundary.material;