Exemplo n.º 1
0
    private void OnGUI()
    {
        GUILayout.BeginVertical();
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("dex :");
        tmpStats.dex = EditorGUILayout.IntField(tmpStats.dex);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("intel :");
        tmpStats.intel = EditorGUILayout.IntField(tmpStats.intel);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("str :");
        tmpStats.str = EditorGUILayout.IntField(tmpStats.str);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("name :");
        tmpStats.name = EditorGUILayout.TextField(tmpStats.name);
        EditorGUILayout.EndHorizontal();



        type = (PNJGenerator.Archetype)EditorGUILayout.EnumPopup("archetype", type);

        if (GUILayout.Button("Save into jason"))
        {
            Debug.Log(pnjToSave);
            SaveStatsInPNJ();
        }

        GUILayout.EndVertical();
    }
Exemplo n.º 2
0
    private void OnGUI()
    {
        GUILayout.BeginVertical();
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Dex :");
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Min : ");
        statsMin.dexMin = EditorGUILayout.IntField(statsMin.dexMin);
        GUILayout.Label("Max :");
        statsMin.dexMax = EditorGUILayout.IntField(statsMin.dexMax);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Intel :");
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Min :");
        statsMin.intelMin = EditorGUILayout.IntField(statsMin.intelMin);
        GUILayout.Label("Max : ");
        statsMin.intelMax = EditorGUILayout.IntField(statsMin.intelMax);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Str :");
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Min :");
        statsMin.strMin = EditorGUILayout.IntField(statsMin.strMin);
        GUILayout.Label("Max : ");
        statsMin.strMax = EditorGUILayout.IntField(statsMin.strMax);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("name :");
        statsMin.name = EditorGUILayout.TextField(statsMin.name);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        GUILayout.Label("Archetype : ");
        EditorGUILayout.EndHorizontal();

        type = (PNJGenerator.Archetype)EditorGUILayout.EnumPopup(type);

        if (GUILayout.Button("Save into Jason"))
        {
            SaveWindowedStats();
        }

        GUILayout.EndVertical();
    }
Exemplo n.º 3
0
 public PNJWindowEditor()
 {
     statsMin = default(PNJGenerator.StatsMinMax);//zeroing the struct
     type     = PNJGenerator.Archetype.paysant;
 }