Skip to main content

跑酷2-new

GM ![[iShot_2022-09-15_23.56.49.png]] [iShot_2022-09-15_23.56.49.png]

触发 gameOver ![[iShot_2022-09-15_23.51.42.png]] [iShot_2022-09-15_23.51.42.png]

摄像机跟随 ![[iShot_2022-09-15_23.39.45.png]] [iShot_2022-09-15_23.39.45.png]

移动 ![[iShot_2022-09-15_23.25.09.png]] [iShot_2022-09-15_23.25.09.png]

public void Move ()
{
if (Input. GetKeyDown (KeyCode.W) && transform.position.z!= 1)
transform. Translate (Vector3. forward);
}
if (Input. GetKeyDown (KeyCode.S) && transform.position.z != -1)
{
transform. Translate (Vector3.back);
}
if (Input.GetKeyDown (KeyCode.A) && transform.position.x != -1)
{
transform. Trans late (Vector3. left);
}
if (Input.GetKeyDown (KeyCode.D) && transform.position.x != 1)
transform.Translate(Vector3. right);
}
}