예제 #1
0
        /// <summary>
        /// Sets up values for world generation.
        /// </summary>
        void Awake()
        {
            showGrid             = ShowGrid;
            resourceManager      = GetComponent <ResourceManager>();
            improvementManager   = GetComponent <ImprovementManager>();
            tileManager          = GetComponent <TileManager>();
            civGridCamera        = GameObject.FindObjectOfType <CivGridCamera>();
            axialToHexDictionary = new Dictionary <Vector2, Hex>();

            if (generateNodeLocations)
            {
                nodeLocations = new Vector3[(int)mapSize.x, (int)mapSize.y];
            }

            if (generateOnStart == true)
            {
                //LoadAndGenerateMap("terrainTest");
                GenerateNewMap(true);
                //FileUtility.SaveTerrain("terrainTest");
            }
            else
            {
                civGridCamera.enabled = false;
            }
        }
예제 #2
0
        /// <summary>
        /// Sets up values for world generation.
        /// </summary>
        void Awake()
        {
			showGrid = ShowGrid;
            resourceManager = GetComponent<ResourceManager>();
            improvementManager = GetComponent<ImprovementManager>();
            tileManager = GetComponent<TileManager>();
            civGridCamera = GameObject.FindObjectOfType<CivGridCamera>();
            axialToHexDictionary = new Dictionary<Vector2, Hex>();

            if (generateNodeLocations)
            {
                nodeLocations = new Vector3[(int)mapSize.x, (int)mapSize.y];
            }

            if (generateOnStart == true)
            {
                //LoadAndGenerateMap("terrainTest");
                GenerateNewMap(true);
                //FileUtility.SaveTerrain("terrainTest");
            }
            else { civGridCamera.enabled = false; }
        }