untangle-puzzlegame/Assets/Scripts/Connection.cs
2025-04-17 17:33:08 -04:00

19 lines
406 B
C#

using UnityEngine;
[System.Serializable]
public class Connection
{
public Point a, b;
public LineRenderer line;
public void UpdateLine()
{
line.SetPosition(0, a.transform.position);
line.SetPosition(1, b.transform.position);
}
public bool SharesPointWith(Connection other)
{
return a == other.a || a == other.b || b == other.a || b == other.b;
}
}