示例#1
0
 public ColonistManager Initialize(SimManager simMan, WorkTaskManager taskMan)
 {
     this.simMan    = simMan;
     this.taskMan   = taskMan;
     transform.name = "Colonist Manager";
     return(this);
 }
示例#2
0
        //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();
        }