using UnityEngine; using System.Collections.Generic; using Core; namespace Script.Gameplay.Connect { public class ConnectionLineManager : MonoSingleton { [SerializeField] private GameObject linePrefab; public List connectionLines = new List(); public ConnectionLine GenerateConnectionLine(IConnectable source, IConnectable target) { GameObject lineObject = Instantiate(linePrefab, this.transform); ConnectionLine connectionLine = lineObject.GetComponent(); if (connectionLine != null) { connectionLine.SetConnectable(source, target); connectionLines.Add(connectionLine); return connectionLine; } return null; } } }