protected override void Initialize() { IsMouseVisible = true; base.Initialize(); var size = new Vector3(512, 512, 2); area = Generation.Generate(size); colm = new ColonistManager(area); Inventory.LoadCraftingRecipes(); }
//Awake private void Awake() { terrainGenerator = new TerrainGenerator(seed, new NoiseGeneratorSettings(TerrainOctaves, TerrainPersistence, TerrainFrequency, TerrainAmplitude, TerrainHeightPerLevel, TerrainNumLevels), new NoiseGeneratorSettings(IronOctaves, IronPersistence, IronFrequency, IronAmplitude), new NoiseGeneratorSettings(IceOctaves, IcePersistence, IceFrequency, IceAmplitude), new NoiseGeneratorSettings(HeliumOctaves, HeliumPersistence, HeliumFrequency, HeliumAmplitude), new NoiseGeneratorSettings(RegolithOctaves, RegolithPersistence, RegolithFrequency, RegolithAmplitude)); terrainManager = new GameObject().AddComponent <TerrainManager>().Initialize(this, terrainGenerator, chunkSize, chunkMapWidth, chunkMaterial); terrainManager.transform.parent = transform; buildingManager = new GameObject().AddComponent <BuildingManager>().Initialize(this); buildingManager.transform.parent = transform; workTaskManager = new GameObject().AddComponent <WorkTaskManager>().Initialize(this); workTaskManager.transform.parent = transform; colonistManager = new GameObject().AddComponent <ColonistManager>().Initialize(this, workTaskManager); colonistManager.transform.parent = transform; AstarPath.active.Scan(); }
public Colonist Initialize(ColonistManager colMan) { this.colMan = colMan; return(this); }