19 lines
406 B
C#
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;
|
|
}
|
|
} |