Implemented torch ability

This commit is contained in:
Max 2025-01-30 11:05:39 +01:00
parent 0bf8adc76d
commit 9a8077021a
15 changed files with 881 additions and 49 deletions

View file

@ -1,12 +1,23 @@
using System;
using Unity.VisualScripting;
using UnityEngine;
using System.Collections.Generic;
public abstract class Lock : MonoBehaviour
{
// Room that must be explored before lock can be unlocked.
[SerializeField] protected Room blockingRoom;
public event Action Unlocked;
public abstract bool CheckIfKeyFits(DicePair dicePair);
public virtual bool CheckIfKeyFits(DicePair dicePair)
{
if (blockingRoom == null || blockingRoom.GetRoomExplored())
{
return true;
}
return false;
}
public virtual void Unlock(DicePair dicePair)
{