Remove puzzle step indicators after puzzle step successfuly completed

This commit is contained in:
Michal Pikulski
2025-10-15 08:28:07 +02:00
parent 1237f41265
commit d80b29a7a7
2 changed files with 2 additions and 0 deletions

View File

@@ -298,6 +298,7 @@ namespace PuzzleS
if (success) if (success)
{ {
Logging.Debug($"[Puzzles] Step interacted: {stepData?.stepId} on {gameObject.name}"); Logging.Debug($"[Puzzles] Step interacted: {stepData?.stepId} on {gameObject.name}");
Destroy(puzzleIndicator);
PuzzleManager.Instance?.MarkPuzzleStepCompleted(stepData); PuzzleManager.Instance?.MarkPuzzleStepCompleted(stepData);
} }
} }

View File

@@ -138,6 +138,7 @@ namespace PuzzleS
foreach (var kvp in _stepBehaviours) foreach (var kvp in _stepBehaviours)
{ {
if (kvp.Value == null) continue; if (kvp.Value == null) continue;
if (IsPuzzleStepCompleted(kvp.Value.stepData.stepId)) continue;
float distance = Vector3.Distance(_playerTransform.position, kvp.Value.transform.position); float distance = Vector3.Distance(_playerTransform.position, kvp.Value.transform.position);