Files
JuegoSim/Assets/_Project/Scripts/Code/Sockets/ISocket.cs
T
2026-07-21 08:56:10 +03:00

24 lines
820 B
C#

using UnityEngine;
public interface ISocket
{
Transform GetTransform();
SocketType GetSocketType();
float GetSocketRadius(); // Changed from size to radius for circular holes
bool IsOccupied();
GameObject GetOccupyingObject();
void SetOccupied(GameObject obj);
void Release();
bool CanAccept(ISocket otherSocket, bool isJoint = false);
Vector3 GetNormal(); // Direction the socket faces
}
public enum SocketType
{
Regular, // Standard connection point (hole in a link)
JointHost, // Can host a joint block (pivot/axle)
JointEnd, // End of a joint block that goes into holes
Universal, // Can act as any type
ConnectorEnd, // End of a connector block that goes into holes
ConnectorHost // Can host a connector block (like a link)
}