This commit is contained in:
2026-05-31 20:55:36 +02:00
parent 4655e57aaf
commit c78bdc2b2a
42 changed files with 135 additions and 7399 deletions

View File

@@ -28,7 +28,7 @@ public class DraggableKey : MonoBehaviour,
public string TaskID { get; set; }
public TaskType TaskType { get; set; }
public string TaskName { get; set; }
public Position TaskLocation { get; set; }
public (double, double) TaskLocation { get; set; }
public bool IsCompleted { get; private set; }
private Action<ITask> _onCompleted;

View File

@@ -8,12 +8,11 @@ public class KeyminigameManager : MonoBehaviour
private int correctCount = 0;
public int totalKeys = 3;
<<<<<<< HEAD
=======
/// <summary>Set by DraggableKey.Initialize() so CheckWin can fire Complete().</summary>
[HideInInspector] public ITask taskRef;
>>>>>>> origin/main
private void Awake()
{
Instance = this;
@@ -22,32 +21,22 @@ public class KeyminigameManager : MonoBehaviour
public void CheckWin()
{
correctCount++;
<<<<<<< HEAD
if (correctCount >= totalKeys)
{
Debug.Log("WIN");
=======
Debug.Log($"Keys inserted: {correctCount}/{totalKeys}");
if (correctCount >= totalKeys)
{
Debug.Log("All keys inserted — task complete!");
taskRef?.Complete();
>>>>>>> origin/main
}
}
public void Fail()
{
<<<<<<< HEAD
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex - 1);
}
}
=======
Debug.Log("Wrong slot — exiting task.");
taskRef?.ExitTask(null);
// TaskManager handles unloading; no SceneManager.LoadScene here
}
}
>>>>>>> origin/main