Cleanup compile warnings, cleanup logs, spruce up level selection menu

This commit is contained in:
Michal Pikulski
2025-10-28 14:31:17 +01:00
parent a5b1a4f8a0
commit 43779c560e
67 changed files with 4814 additions and 1050 deletions

View File

@@ -53,6 +53,7 @@ namespace Input
public event ArrivedAtTargetHandler OnArrivedAtTarget;
public event System.Action OnMoveToCancelled;
private bool interruptMoveTo;
private LogVerbosity _logVerbosity = LogVerbosity.Warning;
void Awake()
{
@@ -75,6 +76,7 @@ namespace Input
void Start()
{
InputManager.Instance?.SetDefaultConsumer(this);
_logVerbosity = DeveloperSettingsProvider.Instance.GetSettings<DebugSettings>().inputLogVerbosity;
}
/// <summary>
@@ -84,7 +86,7 @@ namespace Input
public void OnTap(Vector2 worldPosition)
{
InterruptMoveTo();
Logging.Debug($"[PlayerTouchController] OnTap at {worldPosition}");
LogDebugMessage($"OnTap at {worldPosition}");
if (aiPath != null)
{
aiPath.enabled = true;
@@ -103,7 +105,7 @@ namespace Input
public void OnHoldStart(Vector2 worldPosition)
{
InterruptMoveTo();
Logging.Debug($"[PlayerTouchController] OnHoldStart at {worldPosition}");
LogDebugMessage($"OnHoldStart at {worldPosition}");
lastHoldPosition = worldPosition;
isHolding = true;
if (_settings.DefaultHoldMovementMode == HoldMovementMode.Pathfinding &&
@@ -140,7 +142,7 @@ namespace Input
/// </summary>
public void OnHoldEnd(Vector2 worldPosition)
{
Logging.Debug($"[PlayerTouchController] OnHoldEnd at {worldPosition}");
LogDebugMessage($"OnHoldEnd at {worldPosition}");
isHolding = false;
directMoveVelocity = Vector3.zero;
if (aiPath != null && _settings.DefaultHoldMovementMode ==
@@ -316,13 +318,13 @@ namespace Input
{
_isMoving = true;
OnMovementStarted?.Invoke();
Logging.Debug("[PlayerTouchController] Movement started");
LogDebugMessage("Movement started");
}
else if (!isCurrentlyMoving && _isMoving)
{
_isMoving = false;
OnMovementStopped?.Invoke();
Logging.Debug("[PlayerTouchController] Movement stopped");
LogDebugMessage("Movement stopped");
}
}
@@ -405,5 +407,13 @@ namespace Input
OnArrivedAtTarget?.Invoke();
}
}
private void LogDebugMessage(string message)
{
if (_logVerbosity <= LogVerbosity.Debug)
{
Logging.Debug($"[PlayerTouchController] {message}");
}
}
}
}