C# 클래스 PantheonPrototype.ControlManager

This is the class that handles the input. It will keep track of all possible input devices and will return whether or not the button for a particular action (whatever button that is) is pushed.
파일 보기 프로젝트 열기: Bacon41/PantheonPrototype 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
actions ControlActions
gamepadControls GamePadControls
keyboardAndMouse MouseAndKeyboardControls

공개 메소드들

메소드 설명
ControlManager ( ) : System
Update ( ) : void
changeGamepadBindings ( ButtonState oldButton, Microsoft.Xna.Framework.Input.GamePadButtons newButton, GamePadState gamepad ) : void

This function will change the Control binding of a single button to another button on the gamepad.

changeKeyControlBindings ( Keys oldKey, Keys newKey, KeyboardState keyboard ) : void
disableControls ( bool mouse ) : void

Allows you to disable the controlls including or exluding the mouse click. True will allow the mouse click, false will disable the mouse click.

disableMotion ( ) : void
enableControls ( ) : void
enableMotion ( ) : void
updateMouse ( Microsoft.Xna.Framework.Input.MouseState mouse ) : void

This method was written to test the input information being received from the mouse, rather than testing within the code.

비공개 메소드들

메소드 설명
reset ( ) : void

Resets all the thingies.

setDefaultGamepadControlScheme ( ) : void

Set the default button scheme for the XBOX360 gamepad controller

setDefaultMouseAndKeyboardControlScheme ( ) : void

메소드 상세

ControlManager() 공개 메소드

public ControlManager ( ) : System
리턴 System

Update() 공개 메소드

public Update ( ) : void
리턴 void

changeGamepadBindings() 공개 메소드

This function will change the Control binding of a single button to another button on the gamepad.
public changeGamepadBindings ( ButtonState oldButton, Microsoft.Xna.Framework.Input.GamePadButtons newButton, GamePadState gamepad ) : void
oldButton ButtonState
newButton Microsoft.Xna.Framework.Input.GamePadButtons The button on the gamepad that the action will now be set to
gamepad Microsoft.Xna.Framework.Input.GamePadState The gamepadState that is already in place
리턴 void

changeKeyControlBindings() 공개 메소드

public changeKeyControlBindings ( Keys oldKey, Keys newKey, KeyboardState keyboard ) : void
oldKey Keys
newKey Keys
keyboard Microsoft.Xna.Framework.Input.KeyboardState
리턴 void

disableControls() 공개 메소드

Allows you to disable the controlls including or exluding the mouse click. True will allow the mouse click, false will disable the mouse click.
public disableControls ( bool mouse ) : void
mouse bool Whether or not the mouse click will be allowed
리턴 void

disableMotion() 공개 메소드

public disableMotion ( ) : void
리턴 void

enableControls() 공개 메소드

public enableControls ( ) : void
리턴 void

enableMotion() 공개 메소드

public enableMotion ( ) : void
리턴 void

updateMouse() 공개 메소드

This method was written to test the input information being received from the mouse, rather than testing within the code.
public updateMouse ( Microsoft.Xna.Framework.Input.MouseState mouse ) : void
mouse Microsoft.Xna.Framework.Input.MouseState MouseState from user's mouse
리턴 void

프로퍼티 상세

actions 공개적으로 프로퍼티

The current active actions from the player input.
public ControlActions,PantheonPrototype actions
리턴 ControlActions

gamepadControls 공개적으로 프로퍼티

public GamePadControls,PantheonPrototype gamepadControls
리턴 GamePadControls

keyboardAndMouse 공개적으로 프로퍼티

public MouseAndKeyboardControls,PantheonPrototype keyboardAndMouse
리턴 MouseAndKeyboardControls