Files
A-Fairytale-Gone-Bad-Briar-…/Assets/Scripts/Game/Puzzles/ChapterOne/AshwickHallow/GatePuzzle/AshwickGate.cs

26 lines
939 B
C#

using System.Linq;
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using Cysharp.Threading.Tasks;
namespace BriarQueen.Game.Puzzles.ChapterOne.AshwickHallow.GatePuzzle
{
public class AshwickGate : BaseItem
{
public override UniTask OnInteract(ItemDataSo item = null)
{
var codex = PlayerManager.GetDiscoveredCodexEntriesByType(CodexType.PuzzleClue);
if (codex.Any(x => x.UniqueID == CodexEntryIDs.Get(ClueEntryID.AshwickMarketGate)))
{
EventCoordinator.Publish(new DisplayInteractEvent($"The note said to use the lights."));
return UniTask.CompletedTask;
}
EventCoordinator.Publish(new DisplayInteractEvent($"It's locked."));
return UniTask.CompletedTask;
}
}
}