Files
2024-11-09 12:49:46 +08:00

30 lines
855 B
C#

using System.Collections;
using System.Collections.Generic;
using MeadowGames.UINodeConnect4;
using UnityEngine;
namespace MeadowGames.UINodeConnect4.Extension
{
// v4.1 - PortMatchRule extension added to facilitate the implementation of custom rules for connect ports by dragging
public abstract class PortMatchRule : MonoBehaviour
{
[SerializeField] static PortMatchRule _instance;
public static PortMatchRule Instance
{
get
{
if (_instance == null)
{
_instance = FindObjectOfType<PortMatchRule>();
}
return _instance;
}
set => _instance = value;
}
public virtual bool ExecuteRule(Port draggedPort, Port foundPort)
{
return true;
}
}
}