Implemented torch ability
This commit is contained in:
parent
0bf8adc76d
commit
9a8077021a
15 changed files with 881 additions and 49 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue