using UnityEngine; public class Socket : MonoBehaviour, ISocket { public bool IsAvailable { get; private set; } = true; public Vector2 InsertionPoint => transform.position; public void InsertPlug(Plug plug) { if (IsAvailable) { // Here you can add the functionality that will be executed when a plug is inserted IsAvailable = false; } } public void RemovePlug(Plug plug) { // Here you can add the functionality that will be executed when a plug is removed IsAvailable = true; } public Vector2 GetPosition() { return transform.position; } }