C# 클래스 Project290.Inputs.Controller

Used to interact with the gamepad controller. This method reports a list of Actions that the player performed based on what buttons were pressed. These actions may or may not have anything to do with the game world; they only have to do with the controller and the timing and sequence of the presses.
파일 보기 프로젝트 열기: scastle/Solitude 1 사용 예제들

공개 메소드들

메소드 설명
ContainsBool ( ActionType actionType ) : bool

Determines whether [contains] [the specified action type]. If so, returns true. If not, returns false.

ContainsFloat ( ActionType actionType ) : float

Determines whether [contains] [the specified action type]. If so, returns the ActionQuantity associated with it. If not, returns 0.

Controller ( PlayerIndex playerIndex ) : System

Initializes a new instance of the Controller class.

Rumble ( float leftMotorAmount, float rightMotorAmount, long durationInTicks ) : void

Rumbles the controller.

SetPlayerIndex ( PlayerIndex index ) : void

Sets the index of the controller for the player on the xbox.

Update ( ) : void

Updates the Contoller method, saving the conroller state and incrementing time. It is important that this is only called once per game Update, and this should be called first.

비공개 메소드들

메소드 설명
CheckAndSetActive ( ) : void

Checks all controller that are plugged in and and if that controller is pressing a button, it sets it as the active controller.

GetActions ( ) : void

Returns a list of actions that the player has performed based on the controller input at the instance that this method is called.

메소드 상세

ContainsBool() 공개 메소드

Determines whether [contains] [the specified action type]. If so, returns true. If not, returns false.
public ContainsBool ( ActionType actionType ) : bool
actionType ActionType Type of the action.
리턴 bool

ContainsFloat() 공개 메소드

Determines whether [contains] [the specified action type]. If so, returns the ActionQuantity associated with it. If not, returns 0.
public ContainsFloat ( ActionType actionType ) : float
actionType ActionType Type of the action.
리턴 float

Controller() 공개 메소드

Initializes a new instance of the Controller class.
public Controller ( PlayerIndex playerIndex ) : System
playerIndex PlayerIndex Index of the player.
리턴 System

Rumble() 공개 메소드

Rumbles the controller.
public Rumble ( float leftMotorAmount, float rightMotorAmount, long durationInTicks ) : void
leftMotorAmount float The left motor amount, in [0, 1].
rightMotorAmount float The right motor amount, in [0, 1].
durationInTicks long The duration in ticks (10,000,000 ticks/second).
리턴 void

SetPlayerIndex() 공개 메소드

Sets the index of the controller for the player on the xbox.
public SetPlayerIndex ( PlayerIndex index ) : void
index PlayerIndex The index of the controller.
리턴 void

Update() 공개 메소드

Updates the Contoller method, saving the conroller state and incrementing time. It is important that this is only called once per game Update, and this should be called first.
public Update ( ) : void
리턴 void