private void DrawDataSettings() { EditorGUILayout.LabelField("Data", _headerStyle); EditorGUILayout.BeginVertical(GUI.skin.box); { GameData.Data.Level = EditorGUILayout.IntField("Level", GameData.Data.Level); GameData.Data.Score = EditorGUILayout.IntField("Score", GameData.Data.Score); EditorGUILayout.BeginHorizontal(); { if (GUILayout.Button("Apply")) { GameData.Save(); } if (GUILayout.Button("Reset")) { FileUtil.DeleteFileOrDirectory(Application.persistentDataPath + "/" + GameData.FileName); GameData.Load(); } } EditorGUILayout.EndHorizontal(); if (GUILayout.Button("Play")) { GameEditor.PlayGame(); } } EditorGUILayout.EndVertical(); }
private void DrawGameSettings() { EditorGUILayout.LabelField("Game", _headerStyle); EditorGUILayout.BeginVertical(GUI.skin.box); { EditorGUILayout.PropertyField(_serializedObject.FindProperty("Lives")); EditorGUILayout.PropertyField(_serializedObject.FindProperty("LinesCount")); EditorGUILayout.PropertyField(_serializedObject.FindProperty("LinesVisibleRange")); EditorGUILayout.PropertyField(_serializedObject.FindProperty("ColorChangeTime")); if (GUILayout.Button("Play")) { GameEditor.PlayGame(); } } EditorGUILayout.EndVertical(); }