37 lines
726 B
C#
37 lines
726 B
C#
using UnityEngine;
|
|
|
|
namespace AibisDream.FixSystem
|
|
{
|
|
public interface ISocket
|
|
{
|
|
public void PlugIn();
|
|
public void PlugOut();
|
|
public Transform 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 Transform GetSocketPos()
|
|
{
|
|
return transform;
|
|
}
|
|
|
|
public bool IsAvailable()
|
|
{
|
|
return available;
|
|
}
|
|
}
|
|
} |