Restructured for new direction.
This commit is contained in:
@@ -19,7 +19,7 @@ namespace BriarQueen.Game.Items.Environment.General.Book
|
||||
private AssetItemKey _bookAssetID;
|
||||
|
||||
[SerializeField]
|
||||
private BookEntryID _bookEntryID;
|
||||
private DocumentEntryID _documentEntryID;
|
||||
|
||||
[Header("Book Interface")]
|
||||
[SerializeField]
|
||||
@@ -58,7 +58,11 @@ namespace BriarQueen.Game.Items.Environment.General.Book
|
||||
if (bookObj == null) return;
|
||||
|
||||
_bookInterface = bookObj.GetComponent<BookInterface>();
|
||||
if (_bookInterface == null) return;
|
||||
if (_bookInterface == null)
|
||||
{
|
||||
await DestructionService.Destroy(bookObj);
|
||||
return;
|
||||
}
|
||||
|
||||
_bookInterface.CanvasGroup.alpha = 0f;
|
||||
_bookInterface.CanvasGroup.blocksRaycasts = false;
|
||||
@@ -99,7 +103,7 @@ namespace BriarQueen.Game.Items.Environment.General.Book
|
||||
|
||||
private void UnlockCodexEntry()
|
||||
{
|
||||
PlayerManager.UnlockCodexEntry(CodexEntryIDs.Get(_bookEntryID));
|
||||
PlayerManager.UnlockCodexEntry(CodexEntryIDs.Get(_documentEntryID));
|
||||
}
|
||||
|
||||
public async UniTask CloseBookInterface()
|
||||
@@ -144,4 +148,4 @@ namespace BriarQueen.Game.Items.Environment.General.Book
|
||||
_displayCts = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user