C# 클래스 Axiom.Input.InputReader

Abstract class which allows input to be read from various controllers.
Temporary implementation only. This class is likely to be refactored into a better design when I get time to look at it properly. For now it's a quick-and-dirty way to get what I need.
상속: IDisposable
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
modifiers ModifierKeys
useKeyboardEvents bool
useMouseEvents bool

공개 메소드들

메소드 설명
Capture ( ) : void

Captures the state of all the input devices.

This method captures the state of all input devices and stores it internally for use when the enquiry methods are next called. This is done to ensure that all input is captured at once and therefore combinations of input are not subject to time differences when methods are called.

Dispose ( ) : void

Called to destroy this input reader.

GetKeyChar ( KeyCodes keyCode, ModifierKeys modifiers ) : char

Given a key code enum value, the corresponding character is returned.

Initialize ( Axiom.Graphics.RenderWindow parent, bool useKeyboard, bool useMouse, bool useGamepad, bool ownMouse ) : void

Subclasses should initialize the underlying input subsystem using this method.

IsKeyPressed ( Axiom key ) : bool

Used to check if a particular key was pressed during the last call to Capture.

IsMousePressed ( Axiom button ) : bool

Returns true if the specified mouse button is currently down.

보호된 메소드들

메소드 설명
KeyChanged ( KeyCodes key, bool down ) : void

Helper method for running logic on a key change.

OnKeyDown ( KeyEventArgs e ) : void

Triggers the KeyDown event.

OnKeyUp ( KeyEventArgs e ) : void

Triggers the KeyUp event.

메소드 상세

Capture() 공개 추상적인 메소드

Captures the state of all the input devices.
This method captures the state of all input devices and stores it internally for use when the enquiry methods are next called. This is done to ensure that all input is captured at once and therefore combinations of input are not subject to time differences when methods are called.
public abstract Capture ( ) : void
리턴 void

Dispose() 공개 추상적인 메소드

Called to destroy this input reader.
public abstract Dispose ( ) : void
리턴 void

GetKeyChar() 공개 정적인 메소드

Given a key code enum value, the corresponding character is returned.
public static GetKeyChar ( KeyCodes keyCode, ModifierKeys modifiers ) : char
keyCode KeyCodes
modifiers ModifierKeys
리턴 char

Initialize() 공개 추상적인 메소드

Subclasses should initialize the underlying input subsystem using this method.
public abstract Initialize ( Axiom.Graphics.RenderWindow parent, bool useKeyboard, bool useMouse, bool useGamepad, bool ownMouse ) : void
parent Axiom.Graphics.RenderWindow Parent window that the input belongs to.
useKeyboard bool
useMouse bool
useGamepad bool
ownMouse bool /// If true, input will be taken over from the OS and exclusive to the window. /// If false, input will still be shared with other apps. ///
리턴 void

IsKeyPressed() 공개 추상적인 메소드

Used to check if a particular key was pressed during the last call to Capture.
public abstract IsKeyPressed ( Axiom key ) : bool
key Axiom
리턴 bool

IsMousePressed() 공개 추상적인 메소드

Returns true if the specified mouse button is currently down.
public abstract IsMousePressed ( Axiom button ) : bool
button Axiom Mouse button to query.
리턴 bool

KeyChanged() 보호된 메소드

Helper method for running logic on a key change.
protected KeyChanged ( KeyCodes key, bool down ) : void
key KeyCodes Code of the key being changed
down bool True if the key is being pressed down, false if being released.
리턴 void

OnKeyDown() 보호된 메소드

Triggers the KeyDown event.
protected OnKeyDown ( KeyEventArgs e ) : void
e KeyEventArgs Event arguments.
리턴 void

OnKeyUp() 보호된 메소드

Triggers the KeyUp event.
protected OnKeyUp ( KeyEventArgs e ) : void
e KeyEventArgs Event arguments.
리턴 void

프로퍼티 상세

modifiers 보호되어 있는 프로퍼티

Active modifier keys.
protected ModifierKeys modifiers
리턴 ModifierKeys

useKeyboardEvents 보호되어 있는 프로퍼티

Flag for whether or not to fire keyboard events.
protected bool useKeyboardEvents
리턴 bool

useMouseEvents 보호되어 있는 프로퍼티

Flag for whether or not to fire mouse events.
protected bool useMouseEvents
리턴 bool