This commit is contained in:
yzx 2024-01-11 15:21:56 +08:00
parent 636973b26b
commit 6b6ecf593e
2 changed files with 27 additions and 1 deletions

View File

@ -397346,6 +397346,7 @@ MonoBehaviour:
cam2: {fileID: 1785647646}
menuUI: {fileID: 1648579876}
carInfoUI: {fileID: 1944520099}
ygq: {fileID: 1559914993}
--- !u!1 &1277129999
GameObject:
m_ObjectHideFlags: 0

View File

@ -16,6 +16,12 @@ namespace Script.Manaegr
public GameObject menuUI;
public GameObject carInfoUI;
public AnimationController ygq;
private bool isYgq = false;
public void Init()
{
vehicleController.maxSpeedForward = 11;
@ -41,7 +47,7 @@ namespace Script.Manaegr
}
//切换车内视角
if (Input.GetKeyDown(KeyCode.U))
{
if (cam1.activeInHierarchy)
@ -55,6 +61,22 @@ namespace Script.Manaegr
cam2.SetActive(false);
}
}
//雨刮器
if (Input.GetKeyDown(KeyCode.I))
{
if (!isYgq)
{
isYgq = true;
ygq.PlayAnimation("donghua");
}
else
{
isYgq = false;
ygq.StopAnimationLoop();
}
}
//菜单
if (Input.GetKeyDown(KeyCode.Escape))
{
if (menuUI.activeInHierarchy)
@ -66,6 +88,9 @@ namespace Script.Manaegr
menuUI.SetActive(true);
}
}
}
}
}