All working but codex.
This commit is contained in:
28
Assets/Scripts/Game/Items/KeyItems/CodexBook.cs
Normal file
28
Assets/Scripts/Game/Items/KeyItems/CodexBook.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using BriarQueen.Data.Identifiers;
|
||||
using BriarQueen.Framework.Managers.Levels.Data;
|
||||
using BriarQueen.Framework.Managers.Player.Data;
|
||||
using BriarQueen.Framework.Managers.UI;
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
namespace BriarQueen.Game.Items.KeyItems
|
||||
{
|
||||
public class CodexBook : BaseItem
|
||||
{
|
||||
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Pickup;
|
||||
|
||||
|
||||
public async override UniTask OnInteract(ItemDataSo item = null)
|
||||
{
|
||||
if (PlayerManager.CodexUnlocked())
|
||||
{
|
||||
await Remove();
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerManager.UnlockCodex();
|
||||
TutorialService.DisplayTutorial(TutorialPopupID.Codex);
|
||||
|
||||
await Remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user