37 lines
889 B
C#
37 lines
889 B
C#
using TMPro;
|
|
using Unity.VisualScripting;
|
|
using UnityEngine;
|
|
|
|
public class MatchingDiceLock : Lock
|
|
{
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj is MatchingDiceLock otherLock)
|
|
{
|
|
// Add meaningful comparison logic if there are properties that define equality.
|
|
return true; // Placeholder, update as needed.
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return GetType().GetHashCode(); // Update if there are meaningful properties to hash.
|
|
}
|
|
|
|
public override bool CheckIfKeyFits(DicePair dicePair)
|
|
{
|
|
if (base.CheckIfKeyFits(dicePair) && dicePair.CheckIfResultsMatch())
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override void AssignGUI(TextMeshProUGUI text)
|
|
{
|
|
base.AssignGUI(text);
|
|
text.SetText("=");
|
|
}
|
|
}
|