Input
- accelerationEventCount
- accelerationEvents
- acceleration
- anyKeyDown
- anyKey
- compositionCursorPos
- compositionString
- deviceOrientation
- eatKeyPressOnTextFieldFocus
- GetAccelerationEvent
- GetAxisRaw
- GetAxis
- GetButtonDown
- GetButtonUp
- GetButton
- GetJoystickNames
- GetKeyDown
- GetKeyUp
- GetKey
- GetMouseButtonDown
- GetMouseButtonUp
- GetMouseButton
- GetPosition
- GetRotation
- GetTouch
- gyro
- imeCompositionMode
- inputString
- isGyroAvailable
- mousePosition
- multiTouchEnabled
- ResetInputAxes
- touchCount
- touches
Input.accelerationEventCount 加速度事件数量
static var accelerationEventCount : int
Description描述
Number of acceleration measurements which occurred during last frame.
上一帧所进行的加速度测量次数。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Update() {
if (Input.accelerationEventCount > 0)
print("We got new acceleration measurements");
}
}
// Check if we got any acceleration measurements during last frame
//检查我们上一帧是否进行了加速度测量
function Update () {
if (Input.accelerationEventCount > 0)
print ("We got new acceleration measurements");
}
最后修改:2011年3月11日 Friday 19:07