feat(Console MovePlateform): 实现控制台和移动平台
This commit is contained in:
@@ -6,7 +6,8 @@ using Script.Gameplay.Connect;
|
||||
|
||||
namespace Script.Gameplay.Edit
|
||||
{
|
||||
public class ButtonInteractController : MonoBehaviour, IInteractable, IEditableComponent, IConnectable, ISignalSender
|
||||
public class ButtonInteractController : MonoBehaviour, IInteractable, IEditableComponent, IConnectable,
|
||||
ISignalSender
|
||||
{
|
||||
#region Interactable
|
||||
|
||||
@@ -40,7 +41,7 @@ namespace Script.Gameplay.Edit
|
||||
SendSignal(true);
|
||||
Interactable = false;
|
||||
// 按钮压下的动画或效果可以在这里添加
|
||||
|
||||
|
||||
yield return new WaitForSeconds(signalDuration);
|
||||
SendSignal(false);
|
||||
Interactable = true;
|
||||
@@ -53,7 +54,7 @@ namespace Script.Gameplay.Edit
|
||||
|
||||
[SerializeField] private bool isActive = true;
|
||||
|
||||
public bool IsEditableActive
|
||||
public bool IsComponentActive
|
||||
{
|
||||
get => isActive;
|
||||
set
|
||||
@@ -70,6 +71,8 @@ namespace Script.Gameplay.Edit
|
||||
|
||||
#region Connectable
|
||||
|
||||
public bool IsEnablePlayerConnect { get; set; } = true;
|
||||
|
||||
public void OnGazeEnter()
|
||||
{
|
||||
}
|
||||
@@ -94,11 +97,12 @@ namespace Script.Gameplay.Edit
|
||||
}
|
||||
|
||||
public List<ConnectionLine> ConnectionLines { get; set; } = new List<ConnectionLine>();
|
||||
public void SignalActive(bool active, GameObject sender)
|
||||
|
||||
public void OnSignalReceived(bool active, GameObject sender)
|
||||
{
|
||||
// 按钮通常不接收信号,因此这里可以留空
|
||||
}
|
||||
|
||||
|
||||
public void SendSignal(bool active)
|
||||
{
|
||||
if (ConnectionLines != null)
|
||||
@@ -112,5 +116,4 @@ namespace Script.Gameplay.Edit
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user