Strip debug logging from the game, fix screen weirdness
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using AppleHills.Core.Settings;
|
||||
using Core;
|
||||
|
||||
namespace Minigames.DivingForPictures.PictureCamera
|
||||
{
|
||||
@@ -206,7 +207,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
float canvasWidth = canvasRect.rect.width;
|
||||
targetViewfinderSize = canvasWidth * 0.25f;
|
||||
|
||||
Debug.LogWarning("[CameraViewfinderManager] No SpriteRenderer found on target, using default size");
|
||||
Logging.Warning("[CameraViewfinderManager] No SpriteRenderer found on target, using default size");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -290,7 +291,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRect, targetScreenPosition, uiCamera,
|
||||
out targetAnchoredPosition);
|
||||
|
||||
Debug.Log(
|
||||
Logging.Debug(
|
||||
$"[CameraViewfinderManager] Target size (canvas): {targetViewfinderSize}, target anchored: {targetAnchoredPosition}");
|
||||
}
|
||||
|
||||
@@ -331,7 +332,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
bool[] thresholdTriggered = new bool[settings.ViewfinderProgressThresholds.Length];
|
||||
|
||||
// Debug the actual values
|
||||
Debug.Log($"[CameraViewfinderManager] Animation starting: startSize={startSize}, endSize={endSize}, " +
|
||||
Logging.Debug($"[CameraViewfinderManager] Animation starting: startSize={startSize}, endSize={endSize}, " +
|
||||
$"current sizeDelta={viewfinderRectTransform.sizeDelta}");
|
||||
|
||||
// Verify the initial size is set correctly
|
||||
@@ -358,7 +359,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
// Additional check to ensure size is actually shrinking
|
||||
if (startSize > endSize && currentSize > startSize)
|
||||
{
|
||||
Debug.LogWarning($"[CameraViewfinderManager] Animation curve producing wrong direction! " +
|
||||
Logging.Warning($"[CameraViewfinderManager] Animation curve producing wrong direction! " +
|
||||
$"progress={animationProgress:F2}, curveValue={curveValue:F2}");
|
||||
// Force correct behavior
|
||||
curveValue = animationProgress; // Override with linear interpolation
|
||||
@@ -376,7 +377,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
// Log the animation state occasionally for debugging
|
||||
if (animationProgress % 0.25f <= 0.01f || animationProgress >= 0.99f)
|
||||
{
|
||||
Debug.Log($"[CameraViewfinderManager] Animation progress: {animationProgress:F2}, " +
|
||||
Logging.Debug($"[CameraViewfinderManager] Animation progress: {animationProgress:F2}, " +
|
||||
$"curveValue={curveValue:F2}, currentSize={currentSize:F2}, currentPos={newPos}");
|
||||
}
|
||||
|
||||
@@ -401,7 +402,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
OnAnimationCompleted?.Invoke();
|
||||
|
||||
// Log final state to confirm we reached the target size
|
||||
Debug.Log(
|
||||
Logging.Debug(
|
||||
$"[CameraViewfinderManager] Animation completed: final size={viewfinderRectTransform.sizeDelta}");
|
||||
|
||||
yield return new WaitForSecondsRealtime(0.5f);
|
||||
@@ -471,7 +472,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
viewfinderInstance = null;
|
||||
viewfinderComponent = null;
|
||||
viewfinderRectTransform = null;
|
||||
Debug.Log("[CameraViewfinderManager] Hid viewfinder");
|
||||
Logging.Debug("[CameraViewfinderManager] Hid viewfinder");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,7 +533,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
viewfinderRectTransform.sizeDelta = new Vector2(canvasWidth, canvasWidth);
|
||||
viewfinderRectTransform.anchoredPosition = Vector2.zero;
|
||||
|
||||
Debug.Log($"[CameraViewfinderManager] Showed full-screen viewfinder with size {canvasWidth}");
|
||||
Logging.Debug($"[CameraViewfinderManager] Showed full-screen viewfinder with size {canvasWidth}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -651,7 +652,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
bool[] thresholdTriggered = new bool[settings.ViewfinderProgressThresholds.Length];
|
||||
|
||||
// Debug the actual values
|
||||
Debug.Log($"[CameraViewfinderManager] Animation sequence starting: startSize={startSize}, endSize={endSize}");
|
||||
Logging.Debug($"[CameraViewfinderManager] Animation sequence starting: startSize={startSize}, endSize={endSize}");
|
||||
|
||||
// Verify the initial size is set correctly
|
||||
viewfinderRectTransform.sizeDelta = new Vector2(startSize, startSize);
|
||||
@@ -687,7 +688,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
// Log the animation state occasionally for debugging
|
||||
if (animationProgress % 0.25f <= 0.01f || animationProgress >= 0.99f)
|
||||
{
|
||||
Debug.Log($"[CameraViewfinderManager] Animation progress: {animationProgress:F2}, " +
|
||||
Logging.Debug($"[CameraViewfinderManager] Animation progress: {animationProgress:F2}, " +
|
||||
$"curveValue={curveValue:F2}, currentSize={currentSize:F2}, currentPos={newPos}, proximity={currentProximity:F2}");
|
||||
}
|
||||
|
||||
@@ -752,7 +753,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
// Log the animation state occasionally for debugging
|
||||
if (animationProgress % 0.25f <= 0.01f || animationProgress >= 0.99f)
|
||||
{
|
||||
Debug.Log($"[CameraViewfinderManager] Reverse animation progress: {animationProgress:F2}, " +
|
||||
Logging.Debug($"[CameraViewfinderManager] Reverse animation progress: {animationProgress:F2}, " +
|
||||
$"curveValue={curveValue:F2}, currentSize={currentSize:F2}, currentPos={newPos}, proximity={currentProximity:F2}");
|
||||
}
|
||||
|
||||
@@ -835,7 +836,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
{
|
||||
// Start the photo sequence when hold begins (same behavior as first tap in tap mode)
|
||||
OnViewfinderTapped?.Invoke();
|
||||
Debug.Log("[CameraViewfinderManager] Hold started - initiating photo sequence");
|
||||
Logging.Debug("[CameraViewfinderManager] Hold started - initiating photo sequence");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -848,7 +849,7 @@ namespace Minigames.DivingForPictures.PictureCamera
|
||||
{
|
||||
// Complete the sequence when hold ends (same behavior as second tap in tap mode)
|
||||
OnViewfinderTappedDuringAnimation?.Invoke(currentProximity);
|
||||
Debug.Log("[CameraViewfinderManager] Hold ended - completing photo sequence with proximity: " + currentProximity);
|
||||
Logging.Debug("[CameraViewfinderManager] Hold ended - completing photo sequence with proximity: " + currentProximity);
|
||||
|
||||
// Complete the animation immediately
|
||||
if (animationCoroutine != null)
|
||||
|
||||
Reference in New Issue
Block a user