首页 > 代码库 > Unity3D 响应摇杆

Unity3D 响应摇杆

    if (Input.GetKeyUp(KeyCode.Joystick1Button0))
			{
				Debug.Log("Joystick1Button0");
			}
			if (Input.GetKeyUp(KeyCode.Joystick1Button1) || Input.GetKeyUp(KeyCode.Escape))
			{
				PlatformUtil.ExitUnityActivity.Exit();
			}

			if (Input.GetKeyUp(KeyCode.Joystick1Button2))
			{
				Debug.Log("Joystick1Button2");
			}
			if (Input.GetKeyUp(KeyCode.Joystick1Button3))
			{
				Debug.Log("Joystick1Button3");
			}       

  

Unity3D 响应摇杆