feat(): 美术配合上拉杆 按钮 控制台 压力板
This commit is contained in:
@@ -10,6 +10,7 @@ namespace Script.Gameplay.Facility
|
||||
[SerializeField] private Vector3 plateSize = new Vector3(1, 0.2f, 1);
|
||||
[SerializeField] private Vector3 plateOffset = Vector3.up * 0.1f;
|
||||
|
||||
[SerializeField] private GameObject pressTopPrefab;
|
||||
private bool lastState = false;
|
||||
private bool hasObject = false;
|
||||
|
||||
@@ -24,10 +25,13 @@ namespace Script.Gameplay.Facility
|
||||
if (hasObject)
|
||||
{
|
||||
// 被压下动画
|
||||
pressTopPrefab.transform.localPosition = new Vector3(0,0,0.1f);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 弹起动画
|
||||
pressTopPrefab.transform.localPosition = new Vector3(0,0,1);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user