26 lines
440 B
C#
26 lines
440 B
C#
using UnityEngine;
|
|
|
|
public class NumberLock : Lock
|
|
{
|
|
[SerializeField] private int number;
|
|
|
|
public override bool CheckIfKeyFits(DicePair dicePair)
|
|
{
|
|
if (base.CheckIfKeyFits(dicePair) && dicePair.Sum() == number)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public void SetNumber(int num)
|
|
{
|
|
number = num;
|
|
}
|
|
|
|
public int GetNumber()
|
|
{
|
|
return number;
|
|
}
|
|
}
|