Live Tree Gen
Added client-server communication to sync client techs with DB techs and visualize the tree of actual techs
This commit is contained in:
parent
dabfc62481
commit
6ca699be26
7 changed files with 159 additions and 111 deletions
|
|
@ -64,6 +64,9 @@ public class StrategyGameManager : MonoBehaviour
|
|||
// Request galaxy description from the server
|
||||
CultClient.Send(new GalaxyRequestMessage());
|
||||
|
||||
// Request blueprints from the server
|
||||
CultClient.Send(new BlueprintsRequestMessage());
|
||||
|
||||
// Listen for the server's galaxy description
|
||||
CultClient.AddMessageListener<GalaxyResponseMessage>(galaxy =>
|
||||
{
|
||||
|
|
@ -74,6 +77,8 @@ public class StrategyGameManager : MonoBehaviour
|
|||
if (_currentTab == GalaxyTabButton && !_galaxyPopulated) PopulateGalaxy();
|
||||
});
|
||||
|
||||
CultClient.AddMessageListener<BlueprintsResponseMessage>(response => _cache.AddAll(response.Blueprints, true));
|
||||
|
||||
// Listen for zone descriptions from the server
|
||||
CultClient.AddMessageListener<ZoneResponseMessage>(zone =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue