All working but codex.
This commit is contained in:
@@ -22,15 +22,9 @@ namespace BriarQueen.Game.Items.Environment.General.Book
|
||||
|
||||
internal CanvasGroup CanvasGroup => _canvasGroup;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_interactManager.SetExclusiveRaycaster(_graphicRaycaster);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_eventCoordinator.Unsubscribe<OnRightClickEvent>(OnRightClickPressed);
|
||||
_interactManager.ClearExclusiveRaycaster();
|
||||
}
|
||||
|
||||
[Inject]
|
||||
|
||||
3
Assets/Scripts/Game/Items/KeyItems.meta
Normal file
3
Assets/Scripts/Game/Items/KeyItems.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fa07dbddba49468ba81f3751a90773b5
|
||||
timeCreated: 1778599317
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Game/Items/KeyItems/CodexBook.cs.meta
Normal file
3
Assets/Scripts/Game/Items/KeyItems/CodexBook.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9207909e92b24dd0a8b2ed9836ce1134
|
||||
timeCreated: 1778599317
|
||||
Reference in New Issue
Block a user