C# Class Nez.VirtualJoystick

A virtual input that is represented as a Vector2, with both X and Y as values between -1 and 1
Inheritance: VirtualInput
显示文件 Open project: prime31/Nez

Public Properties

Property Type Description
nodes List
normalized bool

Public Methods

Method Description
VirtualJoystick ( bool normalized ) : System.Collections.Generic
addGamePadDPad ( int gamepadIndex ) : VirtualJoystick

adds GamePad DPad input to this VirtualJoystick

addGamePadLeftStick ( int gamepadIndex, float deadzone = Input.DEFAULT_DEADZONE ) : VirtualJoystick

adds GamePad left stick input to this VirtualJoystick

addGamePadRightStick ( int gamepadIndex, float deadzone = Input.DEFAULT_DEADZONE ) : VirtualJoystick

adds GamePad right stick input to this VirtualJoystick

addKeyboardKeys ( OverlapBehavior overlapBehavior, Keys left, Keys right, Keys up, Keys down ) : VirtualJoystick

adds keyboard keys input to this VirtualJoystick. Four keyboard keys will emulate left/right/up/down. For example WASD or the arrow keys.

update ( ) : void

Method Details

VirtualJoystick() public method

public VirtualJoystick ( bool normalized ) : System.Collections.Generic
normalized bool
return System.Collections.Generic

addGamePadDPad() public method

adds GamePad DPad input to this VirtualJoystick
public addGamePadDPad ( int gamepadIndex ) : VirtualJoystick
gamepadIndex int Gamepad index.
return VirtualJoystick

addGamePadLeftStick() public method

adds GamePad left stick input to this VirtualJoystick
public addGamePadLeftStick ( int gamepadIndex, float deadzone = Input.DEFAULT_DEADZONE ) : VirtualJoystick
gamepadIndex int Gamepad index.
deadzone float Deadzone.
return VirtualJoystick

addGamePadRightStick() public method

adds GamePad right stick input to this VirtualJoystick
public addGamePadRightStick ( int gamepadIndex, float deadzone = Input.DEFAULT_DEADZONE ) : VirtualJoystick
gamepadIndex int Gamepad index.
deadzone float Deadzone.
return VirtualJoystick

addKeyboardKeys() public method

adds keyboard keys input to this VirtualJoystick. Four keyboard keys will emulate left/right/up/down. For example WASD or the arrow keys.
public addKeyboardKeys ( OverlapBehavior overlapBehavior, Keys left, Keys right, Keys up, Keys down ) : VirtualJoystick
overlapBehavior OverlapBehavior Overlap behavior.
left Keys Left.
right Keys Right.
up Keys Up.
down Keys Down.
return VirtualJoystick

update() public method

public update ( ) : void
return void

Property Details

nodes public_oe property

public List nodes
return List

normalized public_oe property

public bool normalized
return bool