feat(): 美术配合上拉杆 按钮 控制台 压力板
This commit is contained in:
@@ -8,6 +8,7 @@ namespace Script.Gameplay.Facility
|
||||
public class LeverInteractController : BaseFacilityController
|
||||
{
|
||||
private bool isPulled = false;
|
||||
[SerializeField] private GameObject rotationPrefab;
|
||||
|
||||
public override string GetInteractPrompt()
|
||||
{
|
||||
@@ -28,12 +29,12 @@ namespace Script.Gameplay.Facility
|
||||
if (isPulled)
|
||||
{
|
||||
// 旋转拉杆到下拉位置
|
||||
transform.rotation = Quaternion.Euler(0f, 0f, 45f);
|
||||
rotationPrefab.transform.rotation = Quaternion.Euler(0f, 0f, 45f);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 旋转拉杆回到初始位置
|
||||
transform.rotation = Quaternion.Euler(0f, 0f, 0f);
|
||||
rotationPrefab.transform.rotation = Quaternion.Euler(0f, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user