Simple Pigman AI

This commit is contained in:
Michal Pikulski
2025-12-04 08:52:59 +01:00
committed by Michal Pikulski
parent e60d516e7e
commit edb83ef13d
27 changed files with 7452 additions and 428 deletions

View File

@@ -10,11 +10,16 @@ namespace AppleHills.Editor
[InitializeOnLoad]
public static class EditorSettingsProvider
{
// Gameplay Settings
private static PlayerFollowerSettings _playerFollowerSettings;
private static InteractionSettings _interactionSettings;
private static DivingMinigameSettings _divingMinigameSettings;
private static Minigames.FortFight.Core.FortFightSettings _fortFightSettings;
// Developer Settings
private static FortFightDeveloperSettings _fortFightDeveloperSettings;
private static DivingDeveloperSettings _divingDeveloperSettings;
// Static constructor will be called when Unity loads/reloads scripts
static EditorSettingsProvider()
{
@@ -54,11 +59,16 @@ namespace AppleHills.Editor
public static void LoadAllSettings()
{
// Load gameplay settings
_playerFollowerSettings = AssetDatabase.LoadAssetAtPath<PlayerFollowerSettings>("Assets/Settings/PlayerFollowerSettings.asset");
_interactionSettings = AssetDatabase.LoadAssetAtPath<InteractionSettings>("Assets/Settings/InteractionSettings.asset");
_divingMinigameSettings = AssetDatabase.LoadAssetAtPath<DivingMinigameSettings>("Assets/Settings/MinigameSettings.asset");
_fortFightSettings = AssetDatabase.LoadAssetAtPath<Minigames.FortFight.Core.FortFightSettings>("Assets/Settings/FortFightSettings.asset");
// Load developer settings
_fortFightDeveloperSettings = AssetDatabase.LoadAssetAtPath<FortFightDeveloperSettings>("Assets/Settings/Developer/FortFightDeveloperSettings.asset");
_divingDeveloperSettings = AssetDatabase.LoadAssetAtPath<DivingDeveloperSettings>("Assets/Settings/Developer/DivingDeveloperSettings.asset");
// Re-register the delegates in case they were lost
AppleHills.SettingsAccess.SetupEditorProviders(
GetPlayerStopDistance,
@@ -112,5 +122,18 @@ namespace AppleHills.Editor
return null;
}
/// <summary>
/// Get developer settings in editor mode (for OnDrawGizmos, etc.)
/// </summary>
public static T GetDeveloperSettings<T>() where T : BaseDeveloperSettings
{
if (typeof(T) == typeof(FortFightDeveloperSettings))
return _fortFightDeveloperSettings as T;
else if (typeof(T) == typeof(DivingDeveloperSettings))
return _divingDeveloperSettings as T;
return null;
}
}
}