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.ResetInputAxes 重置输入轴
static function ResetInputAxes () : void
Description描述
Resets all input. After ResetInputAxes all axes return to 0 and all buttons return to 0 for one frame.
在一帧中重置所有的输入,重置输入指令之后所有的方向轴都被设置为0并且所有的按键都被设置为0。
This can be useful when respawning the player and you don't want any input from keys that might still be held down.
它可以用在当你在复活角色时,不想接受任何可能仍被按下的按键输入时。(当玩家复活的瞬间并不应该接受用户控制时)
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
Input.ResetInputAxes();
}
}
Input.ResetInputAxes();
最后修改:2011年3月12日 Saturday 21:26