Пример #1
0
 private void Stats(ref Creature Creature_Editor)
 {
     Layout.Text("Name",ref Creature_Editor.Name);
     Layout.Text("Description",ref Creature_Editor.Description);
     Level_Foldout = EditorGUILayout.Foldout(Level_Foldout, "Levels");
     if (Level_Foldout)
     {
         EditorGUILayout.BeginHorizontal();
         Layout.Float("Change All Levels", ref Creature_Editor.Change_All_Levels);
         if(GUILayout.Button("Confirm",GUILayout.Height(15f),GUILayout.Width(58f)))
         {
             Creature_Editor.Level_Up(Stat.Hitpoints_Level,Creature_Editor.Change_All_Levels,true);
             Creature_Editor.Level_Up(Stat.Melee_Level,Creature_Editor.Change_All_Levels,true);
             Creature_Editor.Level_Up(Stat.Magic_Level,Creature_Editor.Change_All_Levels,true);
             Creature_Editor.Level_Up(Stat.Archery_Level,Creature_Editor.Change_All_Levels,true);
             Level_Up_Equipment (ref Creature_Editor.Slot[(int)Assign_Slot.Primary_Hand], Creature_Editor.Change_All_Levels);
             Level_Up_Equipment (ref Creature_Editor.Slot[(int)Assign_Slot.Secondary_Hand], Creature_Editor.Change_All_Levels);
             Level_Up_Equipment (ref Creature_Editor.Slot[(int)Assign_Slot.Armor], Creature_Editor.Change_All_Levels);
         }
         EditorGUILayout.EndHorizontal();
         EditorGUILayout.LabelField("Combat",EditorStyles.boldLabel);
         EditorGUI.indentLevel++;
         EditorGUILayout.FloatField("Combat Level",Creature_Editor.Combat_Level());
         Layout.Float("Hitpoints Level",ref Creature_Editor.Stat_Dictionary,Stat.Hitpoints_Level);
         Layout.Float("Melee Level",ref Creature_Editor.Stat_Dictionary,Stat.Melee_Level);
         Layout.Float("Magic Level",ref Creature_Editor.Stat_Dictionary,Stat.Magic_Level);
         Layout.Float("Archery Level",ref Creature_Editor.Stat_Dictionary,Stat.Archery_Level);
         Layout.Float("Movement",ref Creature_Editor.Stat_Dictionary,Stat.Movement);
         EditorGUI.indentLevel--;
         EditorGUILayout.LabelField("Equipment",EditorStyles.boldLabel);
         EditorGUI.indentLevel++;
         Layout.Float("Primary Hand Level",ref Creature_Editor.Slot[(int)Assign_Slot.Primary_Hand].Level);
         Layout.Float("Secondary Hand Level",ref Creature_Editor.Slot[(int)Assign_Slot.Secondary_Hand].Level);
         Layout.Float("Armor Level",ref Creature_Editor.Slot[(int)Assign_Slot.Armor].Level);
         EditorGUI.indentLevel--;
     }
     EditorGUILayout.PropertyField(Passives,true);
     EditorGUILayout.PropertyField(Actives,true);
     EditorGUILayout.PropertyField(Defects,true);
 }