C# 클래스 Project2.InputManager

This class handles all user input for the game, implemented as a system.
상속: SharpDX.Toolkit.GameSystem
파일 보기 프로젝트 열기: nuclearpidgeon/graphicsproj2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
gestureRecognizer Windows.UI.Input.GestureRecognizer
mouseClick System.Boolean
window Windows.UI.Core.CoreWindow

Private Properties

프로퍼티 타입 설명
OnPointerMoved void
OnPointerPressed void
OnPointerReleased void

공개 메소드들

메소드 설명
Acceleration ( ) : System.Vector3

Get the acceleration data from sensor input as of last update.

AccelerometerEnabled ( System.Boolean t ) : void

Used to set the enable state of the accelerometer. When the accelerometer is disabled, the acceleration data returned is a zero vector.

InputManager ( Project2Game game ) : System

Initialise the input system. Note that accelerometer input defaults to off.

IsKeyDown ( Keys key ) : System.Boolean

Check if Key is pressed.

Jump ( ) : System.Boolean

Helper method to determine if there is an input that should be interpreted as a "jump" command.

MouseDelta ( ) : System.Vector2

Get a non-normalised vector representing the direction of mouse movement since the last frame;

MouseDeltaEnabled ( System.Boolean t ) : void

Enable capturing of mouse cursor and mouse delta data.

MousePosition ( ) : System.Vector2

Get the raw mouse position

MouseState ( ) : SharpDX.Toolkit.Input.MouseState

Get the raw mouse state;

PauseRequest ( ) : bool

Helper method to determine the player has requested a new pause or unpause event

PointerState ( ) : SharpDX.Toolkit.Input.PointerState

Get the raw pointer state;

PrimaryDirection ( ) : System.Vector3

Helper method to return primary directional input vector

SecondaryDirection ( ) : System.Vector3

Helper method to return secondary directional input vector

SingleClick ( ) : System.Boolean
Sprint ( ) : System.Boolean

Helper method to determine if there is an input that should be interpreted as a "sprint" command.

Update ( SharpDX.Toolkit.GameTime gameTime ) : void

Update the state of all desired input devices.

비공개 메소드들

메소드 설명
OnPointerMoved ( CoreWindow sender, PointerEventArgs args ) : void
OnPointerPressed ( CoreWindow sender, PointerEventArgs args ) : void
OnPointerReleased ( CoreWindow sender, PointerEventArgs args ) : void

메소드 상세

Acceleration() 공개 메소드

Get the acceleration data from sensor input as of last update.
public Acceleration ( ) : System.Vector3
리턴 System.Vector3

AccelerometerEnabled() 공개 메소드

Used to set the enable state of the accelerometer. When the accelerometer is disabled, the acceleration data returned is a zero vector.
public AccelerometerEnabled ( System.Boolean t ) : void
t System.Boolean
리턴 void

InputManager() 공개 메소드

Initialise the input system. Note that accelerometer input defaults to off.
public InputManager ( Project2Game game ) : System
game Project2Game
리턴 System

IsKeyDown() 공개 메소드

Check if Key is pressed.
public IsKeyDown ( Keys key ) : System.Boolean
key Keys
리턴 System.Boolean

Jump() 공개 메소드

Helper method to determine if there is an input that should be interpreted as a "jump" command.
public Jump ( ) : System.Boolean
리턴 System.Boolean

MouseDelta() 공개 메소드

Get a non-normalised vector representing the direction of mouse movement since the last frame;
public MouseDelta ( ) : System.Vector2
리턴 System.Vector2

MouseDeltaEnabled() 공개 메소드

Enable capturing of mouse cursor and mouse delta data.
public MouseDeltaEnabled ( System.Boolean t ) : void
t System.Boolean
리턴 void

MousePosition() 공개 메소드

Get the raw mouse position
public MousePosition ( ) : System.Vector2
리턴 System.Vector2

MouseState() 공개 메소드

Get the raw mouse state;
public MouseState ( ) : SharpDX.Toolkit.Input.MouseState
리턴 SharpDX.Toolkit.Input.MouseState

PauseRequest() 공개 메소드

Helper method to determine the player has requested a new pause or unpause event
public PauseRequest ( ) : bool
리턴 bool

PointerState() 공개 메소드

Get the raw pointer state;
public PointerState ( ) : SharpDX.Toolkit.Input.PointerState
리턴 SharpDX.Toolkit.Input.PointerState

PrimaryDirection() 공개 메소드

Helper method to return primary directional input vector
public PrimaryDirection ( ) : System.Vector3
리턴 System.Vector3

SecondaryDirection() 공개 메소드

Helper method to return secondary directional input vector
public SecondaryDirection ( ) : System.Vector3
리턴 System.Vector3

SingleClick() 공개 메소드

public SingleClick ( ) : System.Boolean
리턴 System.Boolean

Sprint() 공개 메소드

Helper method to determine if there is an input that should be interpreted as a "sprint" command.
public Sprint ( ) : System.Boolean
리턴 System.Boolean

Update() 공개 메소드

Update the state of all desired input devices.
public Update ( SharpDX.Toolkit.GameTime gameTime ) : void
gameTime SharpDX.Toolkit.GameTime
리턴 void

프로퍼티 상세

gestureRecognizer 공개적으로 프로퍼티

public GestureRecognizer,Windows.UI.Input gestureRecognizer
리턴 Windows.UI.Input.GestureRecognizer

mouseClick 공개적으로 프로퍼티

public Boolean,System mouseClick
리턴 System.Boolean

window 공개적으로 프로퍼티

public CoreWindow,Windows.UI.Core window
리턴 Windows.UI.Core.CoreWindow