Finalize normalized movement settings

This commit is contained in:
Michal Pikulski
2025-10-07 09:42:59 +02:00
parent 348e982930
commit 328e8dea0a
5 changed files with 75 additions and 122 deletions

View File

@@ -5,6 +5,7 @@ using UnityEngine.Events;
using UnityEngine.Serialization;
using Pooling;
using AppleHills.Core.Settings;
using Utils;
namespace Minigames.DivingForPictures
{
@@ -400,7 +401,7 @@ namespace Minigames.DivingForPictures
/// </summary>
private IEnumerator MovementCoroutine()
{
Debug.Log($"[TrenchTileSpawner] Started movement coroutine with normalized speed: {_currentVelocity:F3}");
Debug.Log($"[TrenchTileSpawner] Started movement coroutine with normalized speed: {_baseMoveSpeed:F3}");
while (enabled && gameObject.activeInHierarchy)
{
@@ -414,8 +415,8 @@ namespace Minigames.DivingForPictures
// Use velocity factor sign to determine direction
Vector3 direction = Vector3.up * Mathf.Sign(_velocityFactor);
// Apply normalized movement with deltaTime for frame rate independence
float speed = _currentVelocity * _screenNormalizationFactor;
// Apply normalized movement using the shared utility method
float speed = AppleHillsUtils.CalculateNormalizedMovementSpeed(_baseMoveSpeed);
// Move all active tiles
foreach (var tile in _activeTiles)