Files
A-Fairytale-Gone-Bad-Briar-…/Assets/Scripts/Game/Levels/ChapterOne/PumpingHouse/Pumphouse.cs

23 lines
641 B
C#

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