Make cards use settings

This commit is contained in:
Michal Pikulski
2025-11-12 09:24:27 +01:00
committed by Michal Pikulski
parent 4fdbbb0aa8
commit a6471ede45
15 changed files with 232 additions and 69 deletions

View File

@@ -10,7 +10,7 @@ namespace AppleHills.Core.Settings.Editor
{
private Vector2 scrollPosition;
private List<BaseSettings> allSettings = new List<BaseSettings>();
private string[] tabNames = new string[] { "Player & Follower", "Interaction & Items", "Diving Minigame" };
private string[] tabNames = new string[] { "Player & Follower", "Interaction & Items", "Diving Minigame", "Card System" };
private int selectedTab = 0;
private Dictionary<string, SerializedObject> serializedSettingsObjects = new Dictionary<string, SerializedObject>();
private GUIStyle headerStyle;
@@ -48,6 +48,7 @@ namespace AppleHills.Core.Settings.Editor
CreateSettingsIfMissing<PlayerFollowerSettings>("PlayerFollowerSettings");
CreateSettingsIfMissing<InteractionSettings>("InteractionSettings");
CreateSettingsIfMissing<DivingMinigameSettings>("DivingMinigameSettings");
CreateSettingsIfMissing<CardSystemSettings>("CardSystemSettings");
}
private void CreateSettingsIfMissing<T>(string fileName) where T : BaseSettings
@@ -114,6 +115,9 @@ namespace AppleHills.Core.Settings.Editor
case 2: // Minigames
DrawSettingsEditor<DivingMinigameSettings>();
break;
case 3: // Card System
DrawSettingsEditor<CardSystemSettings>();
break;
}
EditorGUILayout.EndScrollView();