All settings migrated, stuff should work
This commit is contained in:
@@ -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", "Minigames" };
|
||||
private string[] tabNames = new string[] { "Player & Follower", "Interaction & Items", "Diving Minigame" };
|
||||
private int selectedTab = 0;
|
||||
private Dictionary<string, SerializedObject> serializedSettingsObjects = new Dictionary<string, SerializedObject>();
|
||||
private GUIStyle headerStyle;
|
||||
@@ -47,7 +47,7 @@ namespace AppleHills.Core.Settings.Editor
|
||||
// If any settings are missing, create them
|
||||
CreateSettingsIfMissing<PlayerFollowerSettings>("PlayerFollowerSettings");
|
||||
CreateSettingsIfMissing<InteractionSettings>("InteractionSettings");
|
||||
CreateSettingsIfMissing<DivingMinigameSettings>("MinigameSettings");
|
||||
CreateSettingsIfMissing<DivingMinigameSettings>("DivingMinigameSettings");
|
||||
}
|
||||
|
||||
private void CreateSettingsIfMissing<T>(string fileName) where T : BaseSettings
|
||||
|
||||
@@ -390,10 +390,12 @@ namespace Minigames.DivingForPictures
|
||||
GameObject playerObject = GameObject.FindGameObjectWithTag("Player");
|
||||
if (playerObject != null)
|
||||
{
|
||||
// Disable all components except Transform and Animator on the player object (not its children)
|
||||
// Disable all components except Transform, Animator, and PlayerBlinkBehavior on the player object
|
||||
foreach (Component component in playerObject.GetComponents<Component>())
|
||||
{
|
||||
if (!(component is Transform) && !(component is Animator))
|
||||
if (!(component is Transform) &&
|
||||
!(component is Animator) &&
|
||||
!(component is PlayerBlinkBehavior))
|
||||
{
|
||||
if (component is Behaviour behaviour)
|
||||
{
|
||||
@@ -405,7 +407,7 @@ namespace Minigames.DivingForPictures
|
||||
// Start coroutine to reset X position to 0 over 1 second
|
||||
StartCoroutine(ResetPlayerPosition(playerObject.transform));
|
||||
|
||||
Debug.Log("[DivingGameManager] Disabled player components (keeping Animator) and resetting position");
|
||||
Debug.Log("[DivingGameManager] Disabled player components (keeping Animator and PlayerBlinkBehavior) and resetting position");
|
||||
}
|
||||
|
||||
// 3. Find bubble spawner and slow down existing bubbles (no velocity management needed)
|
||||
|
||||
@@ -254,7 +254,17 @@ namespace Minigames.DivingForPictures
|
||||
/// </summary>
|
||||
protected virtual void UpdateControllerTarget()
|
||||
{
|
||||
// This would normally be implemented in derived classes if needed
|
||||
if (playerController != null && playerCharacter != null)
|
||||
{
|
||||
// Use reflection to update the private _targetFingerX field
|
||||
var targetField = typeof(PlayerController)
|
||||
.GetField("_targetFingerX", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
|
||||
|
||||
if (targetField != null)
|
||||
{
|
||||
targetField.SetValue(playerController, playerCharacter.transform.position.x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,15 +10,15 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0ce4dba7a1c54e73b1b3d7131a1c0570, type: 3}
|
||||
m_Name: MinigameSettings
|
||||
m_Name: DivingMinigameSettings
|
||||
m_EditorClassIdentifier:
|
||||
lerpSpeed: 2
|
||||
maxOffset: 10
|
||||
clampXMin: -3.5
|
||||
clampXMax: 3.5
|
||||
speedExponent: 0.97
|
||||
tapMaxDistance: 0.5
|
||||
tapDecelerationRate: 5
|
||||
tapMaxDistance: 0.2
|
||||
tapDecelerationRate: 15
|
||||
baseSpawnProbability: 0.2
|
||||
maxSpawnProbability: 0.5
|
||||
probabilityIncreaseRate: 0.01
|
||||
Reference in New Issue
Block a user