Restructured for new direction.

This commit is contained in:
2026-05-12 12:01:09 +01:00
parent 0439b6c1d2
commit c203f836b1
1134 changed files with 125569 additions and 213519 deletions

View File

@@ -148,6 +148,7 @@ namespace BriarQueen.Game.Cinematics
if (_cinematicCanvasGroup == null || _imageA == null || _imageB == null)
{
Debug.LogWarning("[BaseCinematic] Missing CanvasGroup or Images.");
await EndCinematicFlow();
return;
}

View File

@@ -1,7 +1,7 @@
using System;
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Assets;
using BriarQueen.Framework.Coordinators.Events;
using BriarQueen.Framework.Managers.Assets;
using BriarQueen.Framework.Managers.Input;
using BriarQueen.Framework.Managers.IO;
using BriarQueen.Framework.Managers.Levels;
@@ -83,12 +83,12 @@ namespace BriarQueen.Game.Cinematics
_saveManager.CurrentSave.OpeningCinematicPlayed = true;
var levelLoaded = await _levelManager.LoadLevel(
AssetKeyIdentifiers.Get(LevelKey.ChapterOneVillageEdge));
AssetKeyIdentifiers.Get(LevelKey.ChapterOneArrivalRoad));
if (!levelLoaded)
{
Debug.LogError(
"[OpeningCinematic] Failed to load ChapterOneVillageEdge after cinematic. Returning to main menu.");
"[OpeningCinematic] Failed to load Chapter One Arrival Road after cinematic. Returning to main menu.");
await _gameService.LoadMainMenu();
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: be01b5741bc94861a9b41d8c8ce3b5ee
timeCreated: 1773590011

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: ae64d437e6594bf58b5512ee5ffca402
timeCreated: 1773590011

View File

@@ -1,45 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.UI;
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.Environment.ChapterOne.Pumphouse
{
public class PumpHouseWaterValve : BaseItem
{
public override string InteractableName => "Water Valve";
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Interact;
public override UniTask OnInteract(ItemDataSo item = null)
{
if (!CheckEmptyHands())
return UniTask.CompletedTask;
if (item != null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return UniTask.CompletedTask;
}
if (SaveManager.GetLevelFlag(LevelFlag.PumpWaterRestored))
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(LevelInteractKey.WaterValve)));
return UniTask.CompletedTask;
}
if (!SaveManager.GetLevelFlag(LevelFlag.FountainVinesCut))
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(LevelInteractKey.ClearVinesOutside)));
return UniTask.CompletedTask;
}
// TODO : Play Water SFX
SaveManager.SetLevelFlag(LevelFlag.PumpWaterRestored, true);
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 7ffe97b80fed45bbb7152752c4f10685
timeCreated: 1770991451

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 3825afbb1ee941b1af18781d8f1311fa
timeCreated: 1773590034

View File

@@ -1,44 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.UI;
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.Environment.ChapterOne.Village
{
public class ChainLock : BaseItem
{
public override string InteractableName => "Locked Chain";
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Inspect;
public override async UniTask OnInteract(ItemDataSo item = null)
{
if (!CheckEmptyHands())
return;
if (item == null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(LevelInteractKey.PumphouseChain)));
return;
}
if (item.UniqueID != ItemIDs.Pickups[ItemKey.PumphouseKey])
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(LevelInteractKey.UnlockedPumphouse)));
await Remove();
}
protected override UniTask OnRemoved()
{
SaveManager.SetLevelFlag(LevelFlag.PumpHouseOpened, true);
PlayerManager.RemoveItem(ItemIDs.Pickups[ItemKey.PumphouseKey]);
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: bf2e55b12a3040deb4e54465336fc989
timeCreated: 1770985414

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 45144a83888f401e8d282181328521fb
timeCreated: 1773953887

View File

@@ -1,76 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Framework.Managers.UI;
using BriarQueen.Game.Levels.ChapterOne.VillageStreet;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace BriarQueen.Game.Items.Environment.ChapterOne.VillageStreet
{
public class StreetVines : BaseItem
{
[SerializeField]
private Street _owner;
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Inspect;
public override async UniTask OnInteract(ItemDataSo item = null)
{
if (_owner == null)
{
Debug.LogWarning("StreetVines is missing its Street owner.", this);
return;
}
if (!CanUseKnife())
{
PublishFailureMessage();
return;
}
EventCoordinator.Publish(new DisplayInteractEvent(
InteractEventIDs.Get(EnvironmentInteractKey.UsingKnife)));
await _owner.CutVines();
}
private bool CanUseKnife()
{
if (SettingsService.Game.AutoUseTools)
return PlayerManager.HasAccessToTool(ToolID.Knife);
return PlayerManager.GetEquippedTool() == ToolID.Knife;
}
private void PublishFailureMessage()
{
var autoUseTools = SettingsService != null &&
SettingsService.Game != null &&
SettingsService.Game.AutoUseTools;
var equippedTool = PlayerManager.GetEquippedTool();
string message;
if (equippedTool == ToolID.None)
{
message = InteractEventIDs.Get(LevelInteractKey.CutVines);
}
else if (autoUseTools)
{
// In auto-use mode, reaching this point means the player does not have access
// to the required tool at all, so this should still read like a generic failure.
message = InteractEventIDs.Get(LevelInteractKey.CutVines);
}
else
{
// Auto-use is disabled, and the player has some tool equipped that is not valid.
message = InteractEventIDs.Get(ItemInteractKey.WrongTool);
}
EventCoordinator.Publish(new DisplayInteractEvent(message));
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 32a79fbd751c4216b83680bbc425cfa7
timeCreated: 1773954077

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: d5cf35e464ec407c81e5d29b6bf5c713
timeCreated: 1773590078

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 8c3efb5408364c23bc9f0256bb727fb5
timeCreated: 1773609093

View File

@@ -1,20 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Events.UI;
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.Environment.ChapterOne.Workshop.Downstairs
{
public class WorkshopBrokenLantern : BaseItem
{
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Inspect;
public override UniTask OnInteract(ItemDataSo item = null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.BrokenLantern)));
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 1004a82a9b7f487180b0fcf4978a4446
timeCreated: 1773609258

View File

@@ -1,45 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Framework.Managers.UI;
using BriarQueen.Game.Levels.ChapterOne.Workshop;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace BriarQueen.Game.Items.Environment.ChapterOne.Workshop.Downstairs
{
public class WorkshopDownstairsLight : BaseItem
{
[SerializeField]
private WorkshopDownstairs _workshopDownstairs;
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Interact;
public override string InteractableName
{
get
{
if (_workshopDownstairs.LightOn)
return "Turn off Light";
return "Turn on Light";
}
}
public override UniTask OnInteract(ItemDataSo item = null)
{
if(!CheckEmptyHands())
return UniTask.CompletedTask;
if (item != null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return UniTask.CompletedTask;
}
_workshopDownstairs.ToggleLightSwitch();
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 5c5889af77b0491bb18818491222520b
timeCreated: 1773609093

View File

@@ -1,20 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Events.UI;
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.Environment.ChapterOne.Workshop.Downstairs
{
public class WorkshopWriting : BaseItem
{
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Inspect;
public override UniTask OnInteract(ItemDataSo item = null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.WorkshopWriting)));
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: f8ae950ec2f6412f9a05f9eb22a81004
timeCreated: 1773681035

View File

@@ -1,74 +0,0 @@
using System;
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.Gameplay;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Framework.Managers.UI;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace BriarQueen.Game.Items.Environment.ChapterOne.Workshop
{
public class GrindingStone : BaseItem
{
[SerializeField]
private Levels.ChapterOne.Workshop.Workshop _workshop;
public override string InteractableName => "Grinding Stone";
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Interact;
public override async UniTask OnInteract(ItemDataSo item = null)
{
if (!CheckEmptyHands())
return;
if (!SaveManager.GetLevelFlag(LevelFlag.WorkshopGrindstoneRepaired))
{
if (item == null)
{
EventCoordinator.Publish(
new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.SomethingMissing)));
return;
}
if (item.UniqueID != ItemIDs.Get(ItemKey.GrindstoneAxlePin))
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
await _workshop.SetWoodenPin();
return;
}
if (item == null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.UseGrindstone)));
return;
}
if (item.UniqueID != ItemIDs.Get(ItemKey.RustedKnife))
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
// TODO - Animations, SFX, etc
EventCoordinator.Publish(new FadeEvent(false, 0.6f));
await UniTask.Delay(TimeSpan.FromSeconds(1.2f));
AudioManager.Play(AudioNameIdentifiers.Get(SFXKey.SharpenKnife));
EventCoordinator.Publish(new FadeEvent(true, 0.6f));
await UniTask.Delay(TimeSpan.FromSeconds(0.8f));
PlayerManager.UnlockTool(ToolID.Knife);
TutorialService.DisplayTutorial(TutorialPopupID.Tools);
PlayerManager.RemoveItem(ItemIDs.Get(ItemKey.RustedKnife));
EventCoordinator.Publish(new SelectedItemChangedEvent(null));
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 7af3243d1b3240a5bb86ba7cd0b2e9b8
timeCreated: 1771003747

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 09d6091451f64822a55575f3ab2b6b68
timeCreated: 1773590204

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: b57d4daa04964b28b6c24a1e41fb4d6a
timeCreated: 1773590204

View File

@@ -1,40 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Game.Levels.ChapterOne.Workshop.Upstairs;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace BriarQueen.Game.Items.Environment.ChapterOne.Workshop.Upstairs.Bag
{
public class WorkshopBagBook : BaseItem
{
[Header("Internal")]
[SerializeField]
private WorkshopBag _bag;
public override string InteractableName => "Damaged Book";
public override async UniTask OnInteract(ItemDataSo item = null)
{
if(!CheckEmptyHands())
return;
if (item != null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.WorkshopBookDisintegrating)));
await Remove();
}
protected override UniTask OnRemoved()
{
_bag.RemoveBook();
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: a482fd71d48d4edaaceec7a7038a72a2
timeCreated: 1773496524

View File

@@ -1,48 +0,0 @@
using System;
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Game.Levels.ChapterOne.Workshop.Upstairs;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace BriarQueen.Game.Items.Environment.ChapterOne.Workshop.Upstairs.Bag
{
public class WorkshopBagHole : BaseItem
{
[Header("Workshop Bag")]
[SerializeField]
private WorkshopBag _workshopBag;
public override string InteractableName => "Dig";
public override async UniTask OnInteract(ItemDataSo item = null)
{
if(!CheckEmptyHands())
return;
if (SaveManager.GetLevelFlag(LevelFlag.WorkshopBagHoleDug))
{
EventCoordinator.Publish(new DisplayInteractEvent(
InteractEventIDs.Get(EnvironmentInteractKey.WorkshopBagNoItems)));
return;
}
if (item != null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
EventCoordinator.Publish(new FadeEvent(false, 1f));
await UniTask.Delay(TimeSpan.FromSeconds(1));
await _workshopBag.DigHole();
await UniTask.Delay(TimeSpan.FromSeconds(1));
EventCoordinator.Publish(new FadeEvent(true, 1f));
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: d8e8a954a6d04904b15e4e1b50db8615
timeCreated: 1773494920

View File

@@ -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;
}
}
}
}

View File

@@ -18,6 +18,7 @@ namespace BriarQueen.Game.Items.Environment.General
private bool _removeTrigger;
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Inspect;
public override string InteractableName => InteractableTooltip;
public override async UniTask OnInteract(ItemDataSo item = null)
{
@@ -30,4 +31,4 @@ namespace BriarQueen.Game.Items.Environment.General
await Remove();
}
}
}
}

View File

@@ -1,75 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Framework.Managers.UI;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace BriarQueen.Game.Items.Environment.General
{
public class Fire : BaseItem
{
[Header("Flags")]
[SerializeField]
private LevelFlag _levelFlag;
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Interact;
public override async UniTask OnInteract(ItemDataSo item = null)
{
if (item != null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
if (!PlayerManager.CanUseTool(ToolID.EndlessGoblet))
{
PublishFailureMessage();
return;
}
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.ExtinguishFire)));
await Remove();
}
protected override UniTask OnRemoved()
{
SaveManager.SetLevelFlag(_levelFlag, true);
return UniTask.CompletedTask;
}
private void PublishFailureMessage()
{
var autoUseTools = SettingsService != null &&
SettingsService.Game != null &&
SettingsService.Game.AutoUseTools;
var equippedTool = PlayerManager.GetEquippedTool();
string message;
if (equippedTool == ToolID.None)
{
message = InteractEventIDs.Get(EnvironmentInteractKey.FireHot);
}
else if (autoUseTools)
{
// In auto-use mode, reaching this point means the player does not have access
// to the required tool at all, so this should still read like a generic failure.
message = InteractEventIDs.Get(EnvironmentInteractKey.FireHot);
}
else
{
// Auto-use is disabled, and the player has some tool equipped that is not valid.
message = InteractEventIDs.Get(ItemInteractKey.WrongTool);
}
EventCoordinator.Publish(new DisplayInteractEvent(message));
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 559782186ce043e8b38b0f4517dfbddc
timeCreated: 1774552750

View File

@@ -1,82 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Framework.Managers.UI;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace BriarQueen.Game.Items.Environment.General
{
public class TwistingVines : BaseItem
{
[Header("Flags")]
[SerializeField]
private LevelFlag _levelFlag;
public override string InteractableName => "Twisting Vines";
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Inspect;
public override async UniTask OnInteract(ItemDataSo item = null)
{
if (item != null)
{
EventCoordinator.Publish(
new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
if (!CanUseKnife())
{
PublishFailureMessage();
return;
}
EventCoordinator.Publish(
new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.UsingKnife)));
await Remove();
}
protected override UniTask OnRemoved()
{
SaveManager.SetLevelFlag(_levelFlag, true);
return UniTask.CompletedTask;
}
private bool CanUseKnife()
{
return PlayerManager.CanUseTool(ToolID.Knife);
}
private void PublishFailureMessage()
{
var autoUseTools = SettingsService != null &&
SettingsService.Game != null &&
SettingsService.Game.AutoUseTools;
var equippedTool = PlayerManager.GetEquippedTool();
string message;
if (equippedTool == ToolID.None)
{
message = InteractEventIDs.Get(LevelInteractKey.CutVines);
}
else if (autoUseTools)
{
// In auto-use mode, reaching this point means the player does not have access
// to the required tool at all, so this should still read like a generic failure.
message = InteractEventIDs.Get(LevelInteractKey.CutVines);
}
else
{
// Auto-use is disabled, and the player has some tool equipped that is not valid.
message = InteractEventIDs.Get(ItemInteractKey.WrongTool);
}
EventCoordinator.Publish(new DisplayInteractEvent(message));
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 716b29e16fd1452b87eaf8903c0275a0
timeCreated: 1770982267

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: bceb9c6179804ca6a6ab860091497bec
timeCreated: 1773590266

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: b96e740c17be4776b814df0cdf3e4ba9
timeCreated: 1773837562

View File

@@ -1,13 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
namespace BriarQueen.Game.Items.HoverZones.ChapterOne.Village
{
public class FountainInteractZone : InteractZone
{
protected override bool CheckUnlockStatus()
{
return SaveManager.GetLevelFlag(LevelFlag.PumpWaterRestored);
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 91690066830a4fc18ef4d37e59c35f77
timeCreated: 1773492836

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: bf66aebc6b634be6835a5cb959b676bc
timeCreated: 1773590266

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: a3eccc4b792f428e998c154badaf8df2
timeCreated: 1773859979

View File

@@ -1,7 +0,0 @@
namespace BriarQueen.Game.Items.HoverZones.ChapterOne.Workshop.Downstairs
{
public class WorkshopBookcaseInteractZone : InteractZone
{
public override string InteractableName => !CanvasGroup.interactable ? string.Empty : "Inspect Bookcase";
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 075b00fc69004603b54fe09287b25112
timeCreated: 1773859979

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: a842be13bc18495282b2baad5f07b164
timeCreated: 1773590266

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 5f5eb751f8264020972f1f38d92567ba
timeCreated: 1773591269

View File

@@ -1,19 +0,0 @@
using BriarQueen.Game.Puzzles.ChapterOne.Workshop.BoxPuzzle;
using UnityEngine;
namespace BriarQueen.Game.Items.HoverZones.ChapterOne.Workshop.Upstairs.PuzzleBox
{
public class PuzzleBoxInteractZone : InteractZone
{
[SerializeField]
private WorkshopBasePuzzleBox _basePuzzleBox;
private string _interactName = string.Empty;
public override string InteractableName => _interactName;
public void SetInteractableName()
{
_interactName = "Open Box";
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: b2700af83a384ed2a2003a64ecd72f1a
timeCreated: 1773515450

View File

@@ -1,40 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Player.Data;
using Cysharp.Threading.Tasks;
namespace BriarQueen.Game.Items.HoverZones.ChapterOne.Workshop.Upstairs
{
public class WorkshopSafeInteractZone : InteractZone
{
public override string InteractableName
{
get
{
if (!SaveManager.GetLevelFlag(LevelFlag.WorkshopSafeUnlocked))
return "Locked Safe";
return "Unlocked Safe";
}
}
public override async UniTask OnInteract(ItemDataSo item = null)
{
if (item != null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
if (!SaveManager.GetLevelFlag(LevelFlag.WorkshopSafeUnlocked))
{
EventCoordinator.Publish(new DisplayInteractEvent(
InteractEventIDs.Get(LevelInteractKey.WorkshopLockedSafe)));
return;
}
await base.OnInteract(item);
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: d9fb667aaff5490b9478cddc37e24c95
timeCreated: 1772812658

View File

@@ -1,12 +0,0 @@
using BriarQueen.Data.IO.Saves;
namespace BriarQueen.Game.Items.HoverZones.ChapterOne.Workshop
{
public class WorkshopDownstairsDoorInteractZone : InteractZone
{
protected override bool CheckUnlockStatus()
{
return SaveManager.GetLevelFlag(LevelFlag.WorkshopDownstairsDoorOpen);
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 36a0b0a0b0714c4ea5138830f1405a11
timeCreated: 1773572899

View File

@@ -1,3 +1,3 @@
fileFormatVersion: 2
guid: 4ab38d47b61c4887836156eb319d0c63
timeCreated: 1771172454
guid: 5e8b5c4acb104230b5fdabbad7845a7d
timeCreated: 1778185513

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 56c50db4337242e1933c6f42af2c98f7
timeCreated: 1778185513

View File

@@ -0,0 +1,26 @@
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.Items.Interactions.ChapterOne.Ashwick
{
public class MarketplaceSign : BaseItem
{
public override UniTask OnInteract(ItemDataSo item = null)
{
var items = PlayerManager.GetInventoryItems();
if (items.Any(x => x.UniqueID == ItemIDs.Get(ItemKey.DirtyTeddyBear)))
{
EventCoordinator.Publish(new DisplayInteractEvent("You and me, little bear. Keep your eyes open."));
return UniTask.CompletedTask;
}
EventCoordinator.Publish(new DisplayInteractEvent("A marketplace without voices… thats somehow worse."));
return UniTask.CompletedTask;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a165dd95a0d049bb8eb7a010f376e5e9
timeCreated: 1778185513

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 6b619d489d9440a0a3c1a9f46eda7fe6
timeCreated: 1773780379

View File

@@ -1,97 +0,0 @@
using System;
using System.Linq;
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Coordinators.Events;
using BriarQueen.Framework.Events.Gameplay;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Interaction.Data;
using BriarQueen.Framework.Managers.Player;
using BriarQueen.Framework.Managers.Player.Data;
using Cysharp.Threading.Tasks;
namespace BriarQueen.Game.Items.Interactions.ChapterOne.Village
{
[Serializable]
public class PliersInteraction : BaseInteraction
{
public override UniTask<bool> TryUseWith(
ItemDataSo self,
ItemDataSo other,
PlayerManager playerManager,
EventCoordinator eventCoordinator)
{
if (other == null)
{
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return UniTask.FromResult(false);
}
var pliersId = ItemIDs.Get(ItemKey.Pliers);
var emeraldAmuletId = ItemIDs.Get(ItemKey.EmeraldAmulet);
var rubyRingId = ItemIDs.Get(ItemKey.RubyRing);
var diamondTiaraId = ItemIDs.Get(ItemKey.DiamondTiara);
var emeraldId = ItemIDs.Get(ItemKey.Emerald);
var rubyId = ItemIDs.Get(ItemKey.Ruby);
var diamondId = ItemIDs.Get(ItemKey.Diamond);
var success = other.UniqueID switch
{
var id when id == emeraldAmuletId => ExtractGem(
emeraldId,
emeraldAmuletId,
"You carefully pull the emerald out of the amulet."),
var id when id == rubyRingId => ExtractGem(
rubyId,
rubyRingId,
"You carefully pull the ruby out of the ring."),
var id when id == diamondTiaraId => ExtractGem(
diamondId,
diamondTiaraId,
"You carefully pull the diamond out of the tiara."),
_ => FailInteraction()
};
return UniTask.FromResult(success);
bool ExtractGem(string gemId, string sourceItemId, string message)
{
eventCoordinator.Publish(new DisplayInteractEvent(message));
playerManager.CollectItem(gemId);
playerManager.RemoveItem(sourceItemId);
eventCoordinator.Publish(new SelectedItemChangedEvent(null));
CheckIfPliersBreak();
return true;
}
bool FailInteraction()
{
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return false;
}
void CheckIfPliersBreak()
{
var collectedItems = playerManager.GetAllCollectedItems();
var hasEmerald = collectedItems.Any(x => x.UniqueID == emeraldId);
var hasRuby = collectedItems.Any(x => x.UniqueID == rubyId);
var hasDiamond = collectedItems.Any(x => x.UniqueID == diamondId);
if (hasEmerald && hasRuby && hasDiamond)
{
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.PliersSnapped)));
playerManager.RemoveItem(pliersId);
eventCoordinator.Publish(new SelectedItemChangedEvent(null));
}
}
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: b067daed4e5f4296a1a77f92af07cbc1
timeCreated: 1773780295

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 0adff31d53cb4f0197b3bfd4b779d036
timeCreated: 1771172785

View File

@@ -1,36 +0,0 @@
using System;
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Coordinators.Events;
using BriarQueen.Framework.Events.Gameplay;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Interaction.Data;
using BriarQueen.Framework.Managers.Player;
using BriarQueen.Framework.Managers.Player.Data;
using Cysharp.Threading.Tasks;
namespace BriarQueen.Game.Items.Interactions.ChapterOne.Workshop
{
[Serializable]
public class SmallRagInteraction : BaseInteraction
{
public override async UniTask<bool> TryUseWith(ItemDataSo self, ItemDataSo other, PlayerManager playerManager,
EventCoordinator eventCoordinator)
{
if (other == null)
return false;
if (other.UniqueID != ItemIDs.Get(ItemKey.DustySapphire))
return false;
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.LooksImportant)));
playerManager.CollectItem(ItemIDs.Get(ItemKey.Sapphire));
playerManager.RemoveItem(ItemIDs.Get(ItemKey.DustySapphire));
playerManager.RemoveItem(ItemIDs.Get(ItemKey.SmallRag));
eventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.RagFallsApart)));
eventCoordinator.Publish(new SelectedItemChangedEvent(null));
return true;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: e41ece1b6efd4de3ae4a7c5fa0cf7a8a
timeCreated: 1771172802

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 4bae027cd6a24a68bb7b79f949ee04ff
timeCreated: 1774707009

View File

@@ -1,60 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.Gameplay;
using BriarQueen.Framework.Events.UI;
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.Pickups.ChapterOne.LaxleyHouse
{
public class MantleClock : BaseItem
{
public override UICursorService.CursorStyle ApplicableCursorStyle =>
HasRetrievedHourHand
? UICursorService.CursorStyle.Inspect
: UICursorService.CursorStyle.Pickup;
public override string InteractableName => "Broken Mantle Clock";
private bool HasRetrievedHourHand =>
SaveManager.GetLevelFlag(LevelFlag.LaxleyHourHandRetrieved);
public override async UniTask OnInteract(ItemDataSo item = null)
{
if (!CheckEmptyHands())
return;
if (item != null)
{
EventCoordinator.Publish(
new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.CantUseItem)));
return;
}
if (HasRetrievedHourHand)
{
EventCoordinator.Publish(
new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.LaxleyHouseBrokenClock)));
return;
}
PlayerManager.CollectItem(ItemIDs.Get(ItemKey.LaxleyClockHourHand));
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(ItemInteractKey.LooksImportant)));
EventCoordinator.Publish(new SelectedItemChangedEvent(null));
await OnInteracted();
}
protected override UniTask OnInteracted()
{
if (!HasRetrievedHourHand)
SaveManager.SetLevelFlag(LevelFlag.LaxleyHourHandRetrieved, true);
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 35ee6c3e1797463db69e16e825e2f2c7
timeCreated: 1774707009

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 497a6b1404a3420b8db86adb8ea0a814
timeCreated: 1770991451

View File

@@ -1,18 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Events.Save;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using Cysharp.Threading.Tasks;
namespace BriarQueen.Game.Items.Pickups.ChapterOne.Pumphouse
{
public class Pliers : BaseItem
{
protected override UniTask OnInteracted()
{
TutorialService.DisplayTutorial(TutorialPopupID.MultipleUseItems);
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 948e07af025b4fb7b0b3698c96d73f87
timeCreated: 1770992135

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: a11cd0830c544fa19956201c59d8d29d
timeCreated: 1771003426

View File

@@ -1,24 +0,0 @@
using BriarQueen.Framework.Managers.Levels.Data;
using UnityEngine;
namespace BriarQueen.Game.Items.Pickups.ChapterOne.Workshop
{
public class Candle : BaseItem
{
[SerializeField]
private CandleColour _colour;
public override string InteractableName => $"{_colour.ToString()} Candle";
internal enum CandleColour
{
Red,
Orange,
Yellow,
Green,
Blue,
Indigo,
Violet
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: bec4d666bbcf43338c71dfa3ee9315c5
timeCreated: 1771010785

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: e970ba2932634684a509d4de59098153
timeCreated: 1772828379

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 943af453313248b2a343c61ff9910099
timeCreated: 1772828379

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: f6c9ad510e55448180517715f549734b
timeCreated: 1772828379

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: d0bc65d47d744873bbd339fe2388bb69
timeCreated: 1772828379

View File

@@ -1,23 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Events.UI;
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.WorldBuilding.ChapterOne.Workshop.Upstairs
{
public class WorkshopUpstairsWindow : BaseItem
{
public override string InteractableName => "Window";
public override UICursorService.CursorStyle ApplicableCursorStyle => UICursorService.CursorStyle.Inspect;
public override UniTask OnInteract(ItemDataSo item = null)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.DirtyWindow)));
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 690471ce902644e2a9c9758786435dbf
timeCreated: 1772828385

View File

@@ -1,11 +1,13 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Coordinators.Events;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Audio;
using BriarQueen.Framework.Managers.Interaction.Data;
using BriarQueen.Framework.Managers.IO;
using BriarQueen.Framework.Managers.Levels;
using BriarQueen.Framework.Managers.Player.Data;
using BriarQueen.Framework.Managers.UI;
using BriarQueen.Framework.Services.Tutorials;
using Cysharp.Threading.Tasks;
using UnityEngine;
using VContainer;
@@ -33,9 +35,16 @@ namespace BriarQueen.Game.Items.HoverZones
[SerializeField]
private UICursorService.CursorStyle _cursorStyle = UICursorService.CursorStyle.Travel;
[Header("Optional")]
[SerializeField]
private SFXKey _soundEffectOnClick;
protected EventCoordinator EventCoordinator;
protected LevelManager LevelManager;
protected SaveManager SaveManager;
protected AudioManager AudioManager;
protected TutorialService TutorialService;
public CanvasGroup CanvasGroup;
@@ -78,12 +87,20 @@ namespace BriarQueen.Game.Items.HoverZones
}
var levelId = AssetKeyIdentifiers.Get(_levelToLoad);
if (_soundEffectOnClick != SFXKey.None)
{
AudioManager.Play(AudioNameIdentifiers.Get(_soundEffectOnClick));
}
var loaded = await LevelManager.LoadLevel(levelId);
if (!loaded)
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.CantGoThere)));
}
TutorialService.DisplayTutorial(TutorialPopupID.ReturnToPreviousLevel);
}
public virtual UniTask EnterHover()
@@ -107,11 +124,14 @@ namespace BriarQueen.Game.Items.HoverZones
}
[Inject]
public void Construct(LevelManager levelManager, EventCoordinator eventCoordinator, SaveManager saveManager)
public void Construct(LevelManager levelManager, EventCoordinator eventCoordinator,
SaveManager saveManager, AudioManager audioManager, TutorialService tutorialService)
{
LevelManager = levelManager;
EventCoordinator = eventCoordinator;
SaveManager = saveManager;
AudioManager = audioManager;
TutorialService = tutorialService;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 86cb35712ac2416ca02c0b16a1c8ed95
timeCreated: 1774552316

View File

@@ -1,40 +0,0 @@
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Game.Items.Environment.General;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
namespace BriarQueen.Game.Levels.ChapterOne.LaxleyHouse
{
public class LaxleyFireplace : BaseLevel
{
[Header("Fireplace")]
[SerializeField]
private Image _background;
[SerializeField]
private Sprite _firePlaceExtinguishedSprite;
[SerializeField]
private Fire _fireplaceFire;
protected override async UniTask PostLoadInternal()
{
bool fireExtinguished = SaveManager.GetLevelFlag(LevelFlag.LaxleyFireplaceExtinguished);
if (fireExtinguished)
{
await ExtinguishFire();
}
}
private async UniTask ExtinguishFire()
{
_background.sprite = _firePlaceExtinguishedSprite;
await DestructionService.Destroy(_fireplaceFire.gameObject);
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 1e459526eb0b492fba21bc82555d3f2f
timeCreated: 1774552316

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 0114dbf070ab429b8a99aed3853b3601
timeCreated: 1773606763

View File

@@ -1,23 +0,0 @@
using System.Linq;
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Managers.Levels.Data;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace BriarQueen.Game.Levels.ChapterOne.PumpingHouse
{
public class Pumphouse : BaseLevel
{
[SerializeField]
private GameObject _pliers;
public override string LevelName => "Pumphouse";
protected override async UniTask PostLoadInternal()
{
if (SaveManager.CurrentSave.CollectedItems.Any(x => x.UniqueIdentifier == ItemIDs.Get(ItemKey.Pliers)))
await DestructionService.Destroy(_pliers);
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 1efd43218bd3433ba49703e12a719efd
timeCreated: 1773606763

View File

@@ -1,20 +0,0 @@
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Events.Save;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using Cysharp.Threading.Tasks;
namespace BriarQueen.Game.Levels.ChapterOne.PumpingHouse
{
public class PumphouseTable : BaseLevel
{
public override string LevelName => "Pumphouse Table";
protected override UniTask PostActivateInternal()
{
TutorialService.DisplayTutorial(TutorialPopupID.HiddenItems);
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 3c2b71bfe7974dad82e7256cca1c93d2
timeCreated: 1773851681

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 9c46a25f88fe433d914b9615659244a5
timeCreated: 1772743315

View File

@@ -1,61 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Managers.Hints.Data;
using BriarQueen.Framework.Managers.Levels.Data;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
namespace BriarQueen.Game.Levels.ChapterOne.Village
{
public class Village : BaseLevel
{
[Header("Level Setup")]
[SerializeField]
private Image _background;
[SerializeField]
private Sprite _waterFlowingSprite;
[Header("Items")]
[SerializeField]
private BaseItem _chainAndLock;
[SerializeField]
private BaseItem _vines;
public override string LevelName => "Village";
public override bool IsPuzzleLevel => false;
public override int CurrentLevelHintStage { get; set; }
public override Dictionary<int, BaseHint> Hints { get; }
protected override async UniTask PostLoadInternal()
{
Debug.Log("[Village] Post Load Internal");
Debug.Log($"[Village] Post Load Internal - Pumphouse Open - {SaveManager.GetLevelFlag(LevelFlag.PumpHouseOpened)}");
if (SaveManager.GetLevelFlag(LevelFlag.PumpHouseOpened))
{
if (_chainAndLock != null)
await DestructionService.Destroy(_chainAndLock.gameObject);
}
if (SaveManager.GetLevelFlag(LevelFlag.FountainVinesCut))
{
if (_vines != null)
await DestructionService.Destroy(_vines.gameObject);
}
if (SaveManager.GetLevelFlag(LevelFlag.PumpWaterRestored))
_background.sprite = _waterFlowingSprite;
}
protected override UniTask PostActivateInternal()
{
TutorialService.DisplayTutorial(TutorialPopupID.ReturnToPreviousLevel);
return UniTask.CompletedTask;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 1dfea341be6947e8baa194eb4472e18f
timeCreated: 1770979966

View File

@@ -1,15 +0,0 @@
using System.Collections.Generic;
using BriarQueen.Data.Identifiers;
using BriarQueen.Framework.Managers.Hints.Data;
using BriarQueen.Framework.Managers.Levels.Data;
namespace BriarQueen.Game.Levels.ChapterOne.Village
{
public class VillageEdge : BaseLevel
{
public override string LevelName => "Edge of a Village";
public override bool IsPuzzleLevel => false;
public override int CurrentLevelHintStage { get; set; }
public override Dictionary<int, BaseHint> Hints { get; }
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 540e8f4ac4d941d2a80c6b1b92c5cac9
timeCreated: 1770833366

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: f4b44caa9d2541afa6e53cc5c2f5de82
timeCreated: 1773952163

View File

@@ -1,94 +0,0 @@
using System;
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Game.Items.Environment.ChapterOne.VillageStreet;
using BriarQueen.Game.Items.HoverZones;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
namespace BriarQueen.Game.Levels.ChapterOne.VillageStreet
{
public class Street : BaseLevel
{
[Header("Level Setup")]
[SerializeField]
private Image _background;
[SerializeField]
private Sprite _vinesCutSprite;
[SerializeField]
private Sprite _gateOpenSprite;
[Header("Zones")]
[SerializeField]
private StreetVines _vinesZone;
[SerializeField]
private InteractZone _plaqueZone;
[SerializeField]
private InteractZone _gateZone;
protected override UniTask PostLoadInternal()
{
bool gateOpen = SaveManager.GetLevelFlag(LevelFlag.VillageStreetGateOpen);
bool vinesCut = SaveManager.GetLevelFlag(LevelFlag.VillageStreetVinesCut) || gateOpen;
if (gateOpen)
{
_background.sprite = _gateOpenSprite;
}
else if (vinesCut)
{
_background.sprite = _vinesCutSprite;
}
ApplyZones(vinesCut, gateOpen);
return UniTask.CompletedTask;
}
public async UniTask CutVines()
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.UsingKnife)));
await UniTask.Delay(TimeSpan.FromSeconds(1));
EventCoordinator.Publish(new FadeEvent(false, 0.8f));
await UniTask.Delay(TimeSpan.FromSeconds(0.8f));
_background.sprite = _vinesCutSprite;
SetZoneState(_plaqueZone, true);
await DeactivateVines();
SaveManager.SetLevelFlag(LevelFlag.VillageStreetVinesCut, true);
EventCoordinator.Publish(new FadeEvent(true, 0.8f));
}
private void ApplyZones(bool vinesCut, bool gateOpen)
{
SetZoneState(_plaqueZone, vinesCut);
SetZoneState(_gateZone, gateOpen);
if (vinesCut)
DeactivateVines().Forget();
}
private void SetZoneState(InteractZone zone, bool active)
{
if (zone == null || zone.CanvasGroup == null)
return;
zone.CanvasGroup.alpha = active ? 1 : 0;
zone.CanvasGroup.blocksRaycasts = active;
zone.CanvasGroup.interactable = active;
}
private async UniTask DeactivateVines()
{
await DestructionService.Destroy(_vinesZone.gameObject);
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 48395629807046b69b42b1cf8f8ffb75
timeCreated: 1773952163

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 747b05f0c81d45fa939de8efa637bb8f
timeCreated: 1772743307

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: fab32c0344e04eda879304b661495e65
timeCreated: 1773421109

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 39fa1451796d4a398046bf1c12c31a3a
timeCreated: 1773421126

View File

@@ -1,26 +0,0 @@
using UnityEngine;
using UnityEngine.UI;
namespace BriarQueen.Game.Levels.ChapterOne.Workshop.Upstairs.Components
{
public class CandleImage : MonoBehaviour
{
public CanvasGroup CanvasGroup;
public Image Image;
public int Slot;
private void Awake()
{
CanvasGroup = GetComponent<CanvasGroup>();
}
public void EmptyImage()
{
if (Image != null)
Image.sprite = null;
if (CanvasGroup != null)
CanvasGroup.alpha = 0;
}
}
}

View File

@@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: fa3541e6d37e44729fa46753d10d1cf9
timeCreated: 1772818740

View File

@@ -1,90 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using BriarQueen.Data.Identifiers;
using BriarQueen.Data.IO.Saves;
using BriarQueen.Framework.Events.UI;
using BriarQueen.Framework.Managers.Levels.Data;
using BriarQueen.Game.Items.Environment.ChapterOne.Workshop.Upstairs.Bag;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
namespace BriarQueen.Game.Levels.ChapterOne.Workshop.Upstairs
{
public class WorkshopBag : BaseLevel
{
[Header("Backgrounds")]
[SerializeField]
private Image _startBackground;
[SerializeField]
private Image _holeBackground;
[Header("Items")]
[SerializeField]
private List<BaseItem> _holeItems;
[SerializeField]
private WorkshopBagBook _book;
[SerializeField]
private WorkshopBagHole _hole;
public override string LevelName => "Open Bag";
protected override UniTask PostLoadInternal()
{
CheckBackgrounds();
return UniTask.CompletedTask;
}
public void RemoveBook()
{
_hole.CanvasGroup.interactable = true;
_hole.CanvasGroup.blocksRaycasts = true;
}
public UniTask DigHole()
{
SaveManager.SetLevelFlag(LevelFlag.WorkshopBagHoleDug, true);
_startBackground.enabled = false;
_holeBackground.enabled = true;
_hole.CanvasGroup.interactable = false;
_hole.CanvasGroup.blocksRaycasts = false;
_hole.CanvasGroup.alpha = 0;
DisplayMessage();
return UniTask.CompletedTask;
}
private void DisplayMessage()
{
EventCoordinator.Publish(new DisplayInteractEvent(InteractEventIDs.Get(EnvironmentInteractKey.WorkshopBagNoItems)));
}
private void CheckBackgrounds()
{
if (SaveManager.GetLevelFlag(LevelFlag.WorkshopBagHoleDug))
{
_startBackground.enabled = false;
_holeBackground.enabled = true;
DisplayMessage();
}
else
{
_startBackground.enabled = true;
_holeBackground.enabled = false;
if (SaveManager.CurrentSave.RemovedItems.Any(x => x.UniqueIdentifier == _book.ItemData.UniqueID))
{
_hole.CanvasGroup.interactable = true;
_hole.CanvasGroup.blocksRaycasts = true;
_hole.CanvasGroup.alpha = 1;
}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More