Exemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();
            GroundController groundController = (GroundController)target;

            if (GUILayout.Button("Randomize Terrain"))
            {
                groundController.Randomize();
                groundController.GenerateMap();
            }

            if (GUILayout.Button("Erode Terrain"))
            {
                foreach (int i in Enumerable.Range(0, 3))
                {
                    groundController.ErodeMap();
                }
            }


            if (GUILayout.Button("Generate Resources"))
            {
                groundController.GenerateResourcesAndDoodads();
            }
        }
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();
            GroundController groundController = (GroundController)target;

            if (GUILayout.Button("Randomize Terrain"))
            {
                groundController.GenerateMap();
            }

            if (GUILayout.Button("Generate Resources"))
            {
                groundController.GenerateResourcesAndDoodads();
            }

            if (GUILayout.Button("Clear Resources"))
            {
                groundController.ClearResources();
            }
        }