LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/DunGen/DoorwaySocket.cs
2023-12-22 18:30:10 -05:00

26 lines
654 B
C#

using System;
using UnityEngine;
namespace DunGen
{
[CreateAssetMenu(fileName = "New Doorway Socket", menuName = "DunGen/Doorway Socket", order = 700)]
public class DoorwaySocket : ScriptableObject
{
[SerializeField]
private Vector2 size = new Vector2(1f, 2f);
[Obsolete("Use DoorwayPairFinder.CustomConnectionRules instead")]
public static SocketConnectionDelegate CustomSocketConnectionDelegate;
public Vector2 Size => size;
public static bool CanSocketsConnect(DoorwaySocket a, DoorwaySocket b)
{
if (CustomSocketConnectionDelegate != null)
{
return CustomSocketConnectionDelegate(a, b);
}
return a == b;
}
}
}