Event.clickCount 鼠标点击数
var clickCount : int
Description描述
How many consecutive mouse clicks have we received.
我们收到的鼠标连续点击多少次。
Used in EventType.MouseDown event; use this to differentiate between a single and double clicks.
在EventType.MouseDown事件使用。使用这个不同于单击和双击。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnGUI() {
Event e = Event.current;
if (e.isMouse)
Debug.Log("Mouse clicks: " + e.clickCount);
}
}
function OnGUI() {
var e : Event = Event.current;
if (e.isMouse) {
Debug.Log("Mouse clicks: " + e.clickCount);
}
}
最后修改:2010年12月31日 Friday 23:13