Esempio n. 1
0
 public World(GameSettings gameSettings)
 {
     GameSettings                        = gameSettings;
     StructureManager                    = new StructureManager();
     GlobalResourceManager               = new GlobalResourceManager(GameSettings.GameplaySettings);
     HexagonManager                      = new HexagonManager(GameSettings.GameplaySettings);
     ButtonManager                       = new ButtonManager(GameSettings.LayoutSettings);
     UnlockManager                       = new UnlockManager(GlobalResourceManager, gameSettings.BuildingDescriptionDatabase);
     PathFinder                          = new CachedPathFinder(HexagonManager, StructureManager, GameSettings.GameplaySettings);
     ResourceManager                     = new ResourceManager(this);
     StructureManager.StructureAdded    += StructureAdded;
     StructureManager.StructureRemoved  += StructureRemoved;
     GlobalResourceManager.OutOfOxygen  += grm => OnDefeat();
     GlobalResourceManager.ValueChanged += CheckWinCondition;
 }
Esempio n. 2
0
 public ResourcePackage(ResourceType resourceType, CachedPathFinder pathFinder, GameplaySettings gameplaySettings)
 {
     ResourceType     = resourceType;
     PathFinder       = pathFinder;
     GameplaySettings = gameplaySettings;
 }