示例#1
0
        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();
        }
示例#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();
        }
示例#3
0
 public Colonist Initialize(ColonistManager colMan)
 {
     this.colMan = colMan;
     return(this);
 }