📅  最后修改于: 2022-03-11 14:48:51.146000             🧑  作者: Mango
public GameObject shieldObject;
if (Input.GetKeyDown(KeyCode.LeftShift))
{
shieldObject.SetActive(true);
}
else if (Input.GetKeyUp(KeyCode.LeftShift))
{
shieldObject.SetActive(false);
}