-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfdsfds.cs
26 lines (18 loc) · 863 Bytes
/
fdsfds.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class fdsfds : MonoBehaviour {
void Update()
{
/* if (Input.GetAxis("RightVertical") > 0) { Debug.Log("+1"); }//dowm
if (Input.GetAxis("RightVertical") == 0) { Debug.Log("0"); }
if (Input.GetAxis("RightVertical") < 0) { Debug.Log("-1"); }//up
if (Input.GetAxis("RightHorizontal") < 0) { Debug.Log("-2"); }//left
if (Input.GetAxis("RightHorizontal") > 0) { Debug.Log("+2"); }//right
if (Input.GetAxis("PadVertical") < 0) { Debug.Log("-3"); }//down
if (Input.GetAxis("PadVertical") > 0) { Debug.Log("+3"); }//up */
//获取摇杆偏移量
float joyPositionX = Input.GetAxis("RightHorizontal");
float joyPositionY = Input.GetAxis("RightVertical");
}
}