Mini demo with all features
This commit is contained in:
@@ -25,7 +25,6 @@ namespace Unheimlich.Managers
|
||||
public ClueData Data;
|
||||
public bool IsUnlocked;
|
||||
public bool IsEliminated;
|
||||
public Vector2 BoardPosition;
|
||||
}
|
||||
|
||||
public class Connection
|
||||
@@ -37,12 +36,10 @@ namespace Unheimlich.Managers
|
||||
}
|
||||
|
||||
[Header("References")]
|
||||
[SerializeField] private DetectiveBoardSettings _settings;
|
||||
|
||||
private Dictionary<string, ClueState> _clueStates = new Dictionary<string, ClueState>();
|
||||
private List<Connection> _connections = new List<Connection>();
|
||||
|
||||
public DetectiveBoardSettings Settings => _settings;
|
||||
public IReadOnlyDictionary<string, ClueState> ClueStates => _clueStates;
|
||||
public IReadOnlyList<Connection> Connections => _connections;
|
||||
|
||||
@@ -63,8 +60,7 @@ namespace Unheimlich.Managers
|
||||
{
|
||||
Data = clueData,
|
||||
IsUnlocked = true,
|
||||
IsEliminated = false,
|
||||
BoardPosition = clueData.InitialPosition
|
||||
IsEliminated = false
|
||||
};
|
||||
|
||||
OnClueUnlocked?.Invoke(clueData);
|
||||
@@ -124,8 +120,7 @@ namespace Unheimlich.Managers
|
||||
{
|
||||
Data = clueData,
|
||||
IsUnlocked = false,
|
||||
IsEliminated = false,
|
||||
BoardPosition = clueData.InitialPosition
|
||||
IsEliminated = false
|
||||
};
|
||||
}
|
||||
|
||||
@@ -189,17 +184,6 @@ namespace Unheimlich.Managers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates a clue's position on the board.
|
||||
/// </summary>
|
||||
public void UpdateCluePosition(string clueID, Vector2 newPosition)
|
||||
{
|
||||
if (_clueStates.TryGetValue(clueID, out ClueState state))
|
||||
{
|
||||
state.BoardPosition = newPosition;
|
||||
}
|
||||
}
|
||||
|
||||
public event System.Action<ClueData> OnClueUnlocked;
|
||||
public event System.Action<string, string> OnConnectionCreated;
|
||||
public event System.Action<string> OnClueEliminated;
|
||||
|
||||
@@ -2,6 +2,7 @@ using UnityEngine;
|
||||
using System;
|
||||
using Unheimlich.Core;
|
||||
using Unheimlich.Data.Dialogues;
|
||||
using Unheimlich.Data.DetectiveBoard;
|
||||
using Unheimlich.Gameplay.Player;
|
||||
using Unheimlich.UI;
|
||||
using Unheimlich.Interactions.Dialogues;
|
||||
@@ -150,6 +151,18 @@ namespace Unheimlich.Managers
|
||||
|
||||
UnlockFocus();
|
||||
IsInDialogue = true;
|
||||
|
||||
if (_currentNode.ClueToUnlock != null)
|
||||
{
|
||||
if (DetectiveBoardManager.Instance != null)
|
||||
{
|
||||
DetectiveBoardManager.Instance.UnlockClue(_currentNode.ClueToUnlock);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"[DialogueManager] Cannot unlock clue '{_currentNode.ClueToUnlock.ClueID}': DetectiveBoardManager not found");
|
||||
}
|
||||
}
|
||||
|
||||
if(_currentChoiceAnchor == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user