void OnGUI() { // Do autoresizing of GUI layer GUIResizer.AutoResize(); if (isSelectingStart) { GUI.Label(new Rect(10, 10, 160, 30), "Select the starting cell", labelStyle); } else { GUI.Label(new Rect(10, 10, 160, 30), "Select the ending cell", labelStyle); } if (automate) { GUI.Label(new Rect(10, 30, 160, 30), "Press A again to stop", labelStyle); } else { GUI.Label(new Rect(10, 30, 160, 30), "Or press A to automate", labelStyle); GUI.Label(new Rect(10, 50, 160, 30), "Press R for range (6) sample", labelStyle); GUI.Label(new Rect(10, 70, 160, 30), "Press L for range with line of sight", labelStyle); } }
void OnGUI() { // Do autoresizing of GUI layer GUIResizer.AutoResize(); GUI.backgroundColor = new Color(0.8f, 0.8f, 1f, 0.5f); GUI.Label(new Rect(10, 5, 160, 30), "Move the ball with WASD and press G to reposition grid around it.", labelStyle); GUI.Label(new Rect(10, 25, 160, 30), "Press N to show neighbour cells around the character position.", labelStyle); GUI.Label(new Rect(10, 45, 160, 30), "Press C to snap to center of cell.", labelStyle); GUI.Label(new Rect(10, 65, 160, 30), "Open the Demo10b.cs script to learn how to assign gridCenter property using code.", labelStyle); }
void OnGUI() { // Do autoresizing of GUI layer GUIResizer.AutoResize(); if (isSelectingStart) { GUI.Label(new Rect(10, 10, 160, 30), "Select the starting cell", labelStyle); } else { GUI.Label(new Rect(10, 10, 160, 30), "Select the ending cell", labelStyle); } }
void OnGUI() { // Do autoresizing of GUI layer GUIResizer.AutoResize(); GUI.backgroundColor = new Color(0.8f, 0.8f, 1f, 0.5f); GUI.Label(new Rect(10, 10, 160, 30), "Steepness", labelStyle); terrainSteepness = GUI.HorizontalSlider(new Rect(80, 25, 100, 30), terrainSteepness, 0, 10, sliderStyle, sliderThumbStyle); if (GUI.Button(new Rect(10, 70, 160, 30), "Randomize Terrain", buttonStyle)) { RandomizeTerrain(0.75f); } }
void OnGUI() { // Do autoresizing of GUI layer GUIResizer.AutoResize(); GUI.backgroundColor = new Color(0.8f, 0.8f, 1f, 0.5f); GUI.Label(new Rect(10, 5, 160, 30), "Example of a 10x10 grid with a grid scale of 0.1 which means the terrain can hold 100x100 cells.", labelStyle); GUI.Label(new Rect(10, 25, 160, 30), "Open the Demo10.cs script to learn how to assign gridCenter property using code.", labelStyle); GUI.Label(new Rect(10, 50, 160, 30), "Steepness", labelStyle); terrainSteepness = GUI.HorizontalSlider(new Rect(80, 65, 100, 30), terrainSteepness, 0, 10, sliderStyle, sliderThumbStyle); if (GUI.Button(new Rect(10, 90, 160, 30), "Randomize Terrain", buttonStyle)) { RandomizeTerrain(0.75f); } }
void OnGUI() { // Do autoresizing of GUI layer GUIResizer.AutoResize(); GUI.Label(new Rect(10, 10, 300, 30), "Click 3 or more matching cells to remove them!", labelStyle); }