37 lines
728 B
C#
37 lines
728 B
C#
using UnityEngine;
|
|
|
|
namespace AibisDream.FixSystem
|
|
{
|
|
public interface ISocket
|
|
{
|
|
public void PlugIn();
|
|
public void PlugOut();
|
|
public Vector3 GetSocketPos();
|
|
public bool IsAvailable(); // 新增方法
|
|
}
|
|
|
|
public class BaseSocket : MonoBehaviour, ISocket
|
|
{
|
|
private bool available = true;
|
|
|
|
public void PlugIn()
|
|
{
|
|
Debug.Log("Plug Back InitSocket");
|
|
}
|
|
|
|
public void PlugOut()
|
|
{
|
|
Debug.Log("Plug Out InitSocket");
|
|
}
|
|
|
|
public Vector3 GetSocketPos()
|
|
{
|
|
return transform.position;
|
|
}
|
|
|
|
public bool IsAvailable()
|
|
{
|
|
return available;
|
|
}
|
|
}
|
|
} |