feat(Cycle):实现循环提前检测,修复交互提示消失,按键绑定的事件在重启的时候没能正确,触发循环的提前检测有错误

This commit is contained in:
2025-10-27 10:31:01 +08:00
parent e8b9f47067
commit 9646483fa6
36 changed files with 6743 additions and 5221 deletions

View File

@@ -17,6 +17,17 @@ namespace Script.Gameplay.Facility
public override void Interact(GameObject interactor)
{
if (!IsEnableInteract) return;
PullLever();
}
public override void OnSignalReceived(bool active, GameObject sender)
{
base.OnSignalReceived(active, sender);
PullLever();
}
private void PullLever()
{
isPulled = !isPulled;
SendSignal(isPulled, this.gameObject);
// 可选:拉杆动画
@@ -30,17 +41,7 @@ namespace Script.Gameplay.Facility
// 旋转拉杆回到初始位置
transform.rotation = Quaternion.Euler(0f, 0f, 0f);
}
//Debug.Log(isPulled ? "Lever pulled down" : "Lever reset");
}
public override void OnGazeEnter(GameObject go)
{
// 可选:高亮拉杆
}
public override void OnGazeExit(GameObject go)
{
// 可选:取消高亮
}
}
}