Exemple #1
0
 public MapSettings(eMapDepthDimession depthDimession, string textureSavePathRelativeToProject,
                    string mapDataSavePathRelativeToProject)
 {
     this.mapDepthDimession = depthDimession;
     this.textureSavePathRelativeToProject = textureSavePathRelativeToProject;
     this.mapDataSavePathRelativeToProject = mapDataSavePathRelativeToProject;
 }
Exemple #2
0
 public void InitWithExistProfiler()
 {
     if (ms != null)
     {
         textureSavePathRelativeToProject = ms.textureSavePathRelativeToProject;
         mapDataSavePathRelativeToProject = ms.mapDataSavePathRelativeToProject;
         eDepthDimess = ms.mapDepthDimession;
     }
 }
Exemple #3
0
 public static float GetDepth(this Vector3 v, eMapDepthDimession dimess)
 {
     if (dimess == eMapDepthDimession.DepthY)
     {
         return(v.y);
     }
     else
     {
         return(v.z);
     }
 }
Exemple #4
0
 public static Vector3 SetHeight(this Vector3 v, eMapDepthDimession dimess, float val)
 {
     if (dimess == eMapDepthDimession.DepthY)
     {
         v.Set(v.x, v.y, val);
     }
     else
     {
         v.Set(v.x, val, v.z);
     }
     return(v);
 }
Exemple #5
0
    void OnGUI()
    {
        eDepthDimess = (eMapDepthDimession)EditorGUILayout.EnumPopup("Depth dimession", eDepthDimess);

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("map texture save path:");
        textureSavePathRelativeToProject = EditorGUILayout.TextField(textureSavePathRelativeToProject);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("map data save path:");
        mapDataSavePathRelativeToProject = EditorGUILayout.TextField(mapDataSavePathRelativeToProject);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        if (GUILayout.Button("Apply"))
        {
            try
            {
                if (Validate())
                {
                    Generate();
                }
                this.Close();
            }
            catch (System.Exception e)
            {
                error = e.Message;
            }
        }
        if (GUILayout.Button("Cancel"))
        {
            this.Close();
        }
        EditorGUILayout.EndHorizontal();


        GUILayout.Label(error, errorStyle);
    }