C# 클래스 ScriptRuntime.Input

输入类,包括键盘,鼠标,触控的输入
상속: ScriptRuntime.Base
파일 보기 프로젝트 열기: Genesis-3D/Genesis-3D

공개 메소드들

메소드 설명
GetCurrentKeyEvents ( ) : ScriptRuntime.KeyEvent[]

得到当前按键的事件

GetCurrentMouseEvents ( ) : ScriptRuntime.MouseEvent[]

得到当前鼠标事件

GetCurrentTouchEvents ( ) : ScriptRuntime.TouchEvent[]

得到当前触点事件

GetScreenPosition ( System.Vector2 &outFloat2 ) : void

得到鼠标光标在屏幕上的位置

GetScreenTouchCount ( ) : int

得到屏幕上的触点个数,windows平台没实现

GetScreenTouchID ( int index ) : int

得到屏幕上触点ID

GetScreenTouchMovement ( int id ) : System.Vector2

得到手指在屏幕上的移动距离

GetScreenTouchPixelPosition ( int id ) : System.Vector2

得到在触点在屏幕上的像素位置

GetScreenTouchScreenPosition ( int id ) : System.Vector2

得到触点在屏幕的位置,为相对位置,范围:0-1

IsFingerDown ( int id ) : bool

手指是否按下

IsFingerPressing ( int id ) : bool

手指是否是按下状态

IsFingerUp ( int id ) : bool

手指是否弹起

KeyDown ( Code _keyCode ) : bool

按键是否被按下

KeyPressed ( Code _keyCode ) : bool

按键是否是持续按下状态

KeyUp ( Code _keyCode ) : bool

按键是否弹起

MouseButtonDown ( MouseCode _mouseCode ) : bool

鼠标按钮是否被按下

MouseButtonPressed ( MouseCode _mouseCode ) : bool

鼠标按钮是否是被按下状态

MouseButtonUp ( MouseCode _mouseCode ) : bool

鼠标按钮是否弹起

MouseGetMovement ( System.Vector2 &outFloat2 ) : void

得到鼠标光标在屏幕上的移动距离

MouseWheelBack ( ) : bool

鼠标滚轮是否向后滚动

MouseWheelForward ( ) : bool

鼠标滚轮是否向前滚动

비공개 메소드들

메소드 설명
ICall_Input_GetCurrentKeyEvent ( int index, Code &code, InputEventType &_event ) : void
ICall_Input_GetCurrentKeyEventCount ( ) : int
ICall_Input_GetCurrentMouseButtonEvent ( int index, MouseCode &code, InputEventType &_event ) : void
ICall_Input_GetCurrentMouseButtonEventCount ( ) : int
ICall_Input_GetCurrentTouchEvent ( int index, int &id, InputEventType &_event ) : void
ICall_Input_GetCurrentTouchEventCount ( ) : int
ICall_Input_GetScreenPosition ( System.Vector2 &outFloat2 ) : void
ICall_Input_GetScreenTouchCount ( ) : int
ICall_Input_GetScreenTouchID ( int index ) : int
ICall_Input_GetScreenTouchMovement ( int index, System.Vector2 &moveMent ) : void
ICall_Input_GetScreenTouchPixelPos ( int index, System.Vector2 &pixelPos ) : void
ICall_Input_GetScreenTouchScreenPos ( int index, System.Vector2 &screenPos ) : void
ICall_Input_IsFingerDown ( int index ) : bool
ICall_Input_IsFingerPressing ( int index ) : bool
ICall_Input_IsFingerUp ( int index ) : bool
ICall_Input_KeyDown ( int _keyCode ) : bool
ICall_Input_KeyPressed ( int _keyCode ) : bool
ICall_Input_KeyUp ( int _keyCode ) : bool
ICall_Input_MouseButtonDown ( int _mouseCode ) : bool
ICall_Input_MouseButtonPressed ( int _mouseCode ) : bool
ICall_Input_MouseButtonUp ( int _mouseCode ) : bool
ICall_Input_MouseGetMovement ( System.Vector2 &outFloat2 ) : void
ICall_Input_MouseWheelBack ( ) : bool
ICall_Input_MouseWheelForward ( ) : bool

메소드 상세

GetCurrentKeyEvents() 공개 정적인 메소드

得到当前按键的事件
public static GetCurrentKeyEvents ( ) : ScriptRuntime.KeyEvent[]
리턴 ScriptRuntime.KeyEvent[]

GetCurrentMouseEvents() 공개 정적인 메소드

得到当前鼠标事件
public static GetCurrentMouseEvents ( ) : ScriptRuntime.MouseEvent[]
리턴 ScriptRuntime.MouseEvent[]

GetCurrentTouchEvents() 공개 정적인 메소드

得到当前触点事件
public static GetCurrentTouchEvents ( ) : ScriptRuntime.TouchEvent[]
리턴 ScriptRuntime.TouchEvent[]

GetScreenPosition() 공개 정적인 메소드

得到鼠标光标在屏幕上的位置
public static GetScreenPosition ( System.Vector2 &outFloat2 ) : void
outFloat2 System.Vector2 鼠标光标在屏幕上的位置
리턴 void

GetScreenTouchCount() 공개 정적인 메소드

得到屏幕上的触点个数,windows平台没实现
public static GetScreenTouchCount ( ) : int
리턴 int

GetScreenTouchID() 공개 정적인 메소드

得到屏幕上触点ID
public static GetScreenTouchID ( int index ) : int
index int 触点索引
리턴 int

GetScreenTouchMovement() 공개 정적인 메소드

得到手指在屏幕上的移动距离
public static GetScreenTouchMovement ( int id ) : System.Vector2
id int 触点索引
리턴 System.Vector2

GetScreenTouchPixelPosition() 공개 정적인 메소드

得到在触点在屏幕上的像素位置
public static GetScreenTouchPixelPosition ( int id ) : System.Vector2
id int 触点索引
리턴 System.Vector2

GetScreenTouchScreenPosition() 공개 정적인 메소드

得到触点在屏幕的位置,为相对位置,范围:0-1
public static GetScreenTouchScreenPosition ( int id ) : System.Vector2
id int 触点索引
리턴 System.Vector2

IsFingerDown() 공개 정적인 메소드

手指是否按下
public static IsFingerDown ( int id ) : bool
id int 触点索引
리턴 bool

IsFingerPressing() 공개 정적인 메소드

手指是否是按下状态
public static IsFingerPressing ( int id ) : bool
id int 触点索引
리턴 bool

IsFingerUp() 공개 정적인 메소드

手指是否弹起
public static IsFingerUp ( int id ) : bool
id int 触点索引
리턴 bool

KeyDown() 공개 정적인 메소드

按键是否被按下
public static KeyDown ( Code _keyCode ) : bool
_keyCode Code 键的枚举值
리턴 bool

KeyPressed() 공개 정적인 메소드

按键是否是持续按下状态
public static KeyPressed ( Code _keyCode ) : bool
_keyCode Code 键的枚举值
리턴 bool

KeyUp() 공개 정적인 메소드

按键是否弹起
public static KeyUp ( Code _keyCode ) : bool
_keyCode Code 键的枚举值
리턴 bool

MouseButtonDown() 공개 정적인 메소드

鼠标按钮是否被按下
public static MouseButtonDown ( MouseCode _mouseCode ) : bool
_mouseCode MouseCode 鼠标按钮枚举值
리턴 bool

MouseButtonPressed() 공개 정적인 메소드

鼠标按钮是否是被按下状态
public static MouseButtonPressed ( MouseCode _mouseCode ) : bool
_mouseCode MouseCode 鼠标按钮枚举值
리턴 bool

MouseButtonUp() 공개 정적인 메소드

鼠标按钮是否弹起
public static MouseButtonUp ( MouseCode _mouseCode ) : bool
_mouseCode MouseCode 鼠标按钮枚举值
리턴 bool

MouseGetMovement() 공개 정적인 메소드

得到鼠标光标在屏幕上的移动距离
public static MouseGetMovement ( System.Vector2 &outFloat2 ) : void
outFloat2 System.Vector2 鼠标光标在屏幕上的移动距离
리턴 void

MouseWheelBack() 공개 정적인 메소드

鼠标滚轮是否向后滚动
public static MouseWheelBack ( ) : bool
리턴 bool

MouseWheelForward() 공개 정적인 메소드

鼠标滚轮是否向前滚动
public static MouseWheelForward ( ) : bool
리턴 bool