public void SetWallMole(int value)
 {
     m_wallMode = (OptionalToggle)value;
 }
Example #2
0
 public void SetRiverMode(int mode)
 {
     riverMode = (OptionalToggle)mode;
 }
 public void SetRiverMode(int value)
 {
     m_riverMode = (OptionalToggle)value;
 }
 public void SetRoadMode(int value)
 {
     m_roadMode = (OptionalToggle)value;
 }
Example #5
0
 public void SetWalledMode(int mode)
 {
     walledMode = (OptionalToggle)mode;
 }
Example #6
0
 public void SetRoadMode(int mode)
 {
     roadMode = (OptionalToggle)mode;
 }
Example #7
0
 public void SetRoadMode(int i)
 {
     _roadMode = (OptionalToggle)i;
 }
Example #8
0
 public void SetRiverMode(int i)
 {
     _riverMode = (OptionalToggle)i;
 }
    void OnGUI(int id)
    {
        GUI.Box(new Rect(5, 20f, 190f, 110f), "设置地图属性");
        if (GUI.Toggle(new Rect(5, 30f, 100f, 32f), colorType == ColorType.red, "red",
                       new GUIStyle(guiSkin.GetStyle("Toggle"))))
        {
            colorType = ColorType.red;
        }

        if (GUI.Toggle(new Rect(5, 60f, 100f, 20f), colorType == ColorType.blue, "blue",
                       new GUIStyle(guiSkin.GetStyle("Toggle"))))
        {
            colorType = ColorType.blue;
        }

        if (GUI.Toggle(new Rect(5, 90f, 100f, 20f), colorType == ColorType.green, "green",
                       new GUIStyle(guiSkin.GetStyle("Toggle"))))
        {
            colorType = ColorType.green;
        }

        GUI.Box(new Rect(5, 133f, 190f, 70f), "设置地图高度");
        Elevation = (int)GUI.HorizontalSlider(new Rect(10, 150f, 80f, 30f), Elevation, 0, 5, guiSkin.horizontalSlider,
                                              guiSkin.horizontalSliderThumb);

        GUI.Label(new Rect(95f, 150f, 100f, 20f), "高度:" + Elevation);

        brushSize = (int)GUI.HorizontalSlider(new Rect(10, 175f, 80f, 30f), brushSize, 0, 3, guiSkin.horizontalSlider,
                                              guiSkin.horizontalSliderThumb);

        GUI.Label(new Rect(95f, 175f, 100f, 20f), "刷子大小:" + brushSize);

        GUI.Box(new Rect(5, 206f, 190f, 110f), "设置河流");
        if (GUI.Toggle(new Rect(5, 216f, 100f, 32f), riverMode == OptionalToggle.Ignore, "不设置",
                       new GUIStyle(guiSkin.GetStyle("Toggle"))))
        {
            riverMode = OptionalToggle.Ignore;
        }

        if (GUI.Toggle(new Rect(5, 246, 100f, 20f), riverMode == OptionalToggle.Yes, "添加河流",
                       new GUIStyle(guiSkin.GetStyle("Toggle"))))
        {
            riverMode = OptionalToggle.Yes;
            roadMode  = OptionalToggle.Ignore;
        }

        if (GUI.Toggle(new Rect(5, 276f, 100f, 20f), riverMode == OptionalToggle.No, "删除河流",
                       new GUIStyle(guiSkin.GetStyle("Toggle"))))
        {
            riverMode = OptionalToggle.No;
            roadMode  = OptionalToggle.Ignore;
        }

        GUI.Box(new Rect(5, 320f, 190f, 110f), "设置道路");
        if (GUI.Toggle(new Rect(5, 330f, 100f, 32f), roadMode == OptionalToggle.Ignore, "不设置",
                       new GUIStyle(guiSkin.GetStyle("Toggle"))))
        {
            roadMode = OptionalToggle.Ignore;
        }

        if (GUI.Toggle(new Rect(5, 360, 100f, 20f), roadMode == OptionalToggle.Yes, "添加道路",
                       new GUIStyle(guiSkin.GetStyle("Toggle"))))
        {
            roadMode  = OptionalToggle.Yes;
            riverMode = OptionalToggle.Ignore;
        }

        if (GUI.Toggle(new Rect(5, 390f, 100f, 20f), roadMode == OptionalToggle.No, "删除道路",
                       new GUIStyle(guiSkin.GetStyle("Toggle"))))
        {
            roadMode  = OptionalToggle.No;
            riverMode = OptionalToggle.Ignore;
        }
        GUI.Box(new Rect(5, 410f, 190f, 110f), "设置水面");
        waterElevation = (int)GUI.HorizontalSlider(new Rect(10, 430f, 80f, 30f), waterElevation, 0, 3, guiSkin.horizontalSlider,
                                                   guiSkin.horizontalSliderThumb);

        GUI.Label(new Rect(95f, 430f, 100f, 20f), "水面高度:" + waterElevation);
    }