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.touchCount 触摸数量
static var touchCount : int
Description描述
Number of touches (Read Only).
触摸的数量。每一帧之内都一定不会改变(只读)
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Update() {
if (Input.touchCount > 0)
print(Input.touchCount);
}
}
function Update () {
if (Input.touchCount > 0) {
print(Input.touchCount);
}
}
最后修改:2011年3月11日 Friday 19:10