First steps

This commit is contained in:
Michal Pikulski
2025-10-01 14:35:17 +02:00
parent a6c63af911
commit dac119fd7b
30 changed files with 806 additions and 9 deletions

View File

@@ -13,17 +13,20 @@ namespace AppleHills
// Static delegates that will be set by editor code
private static GetSettingsValueDelegate getPlayerStopDistanceProvider;
private static GetSettingsValueDelegate getPlayerStopDistanceDirectInteractionProvider;
private static GetSettingsValueDelegate getPuzzlePromptRangeProvider;
// Editor-only method to set up providers - will be called from editor code
public static void SetupEditorProviders(
GetSettingsValueDelegate playerStopDistanceProvider,
GetSettingsValueDelegate playerStopDistanceDirectInteractionProvider)
GetSettingsValueDelegate playerStopDistanceDirectInteractionProvider,
GetSettingsValueDelegate puzzlePromptRangeProvider)
{
#if UNITY_EDITOR
if (!Application.isPlaying)
{
getPlayerStopDistanceProvider = playerStopDistanceProvider;
getPlayerStopDistanceDirectInteractionProvider = playerStopDistanceDirectInteractionProvider;
getPuzzlePromptRangeProvider = puzzlePromptRangeProvider;
}
#endif
}
@@ -52,6 +55,18 @@ namespace AppleHills
return GameManager.Instance.PlayerStopDistanceDirectInteraction;
}
public static float GetPuzzlePromptRange()
{
#if UNITY_EDITOR
if (!Application.isPlaying && getPuzzlePromptRangeProvider != null)
{
return getPuzzlePromptRangeProvider();
}
#endif
return GameManager.Instance.DefaultPuzzlePromptRange;
}
// Add more methods as needed for other settings
}
}