C# 클래스 MrGravity.Game_Objects.Physics_Objects.Player

Represents the player in the game
상속: PhysicsObject
파일 보기 프로젝트 열기: DizWARE/Mr-Gravity 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
MCurrentTexture Microsoft.Xna.Framework.Graphics.Texture2D
MIsAlive bool
MNumLives int

공개 메소드들

메소드 설명
CheckForIdle ( ) : Microsoft.Xna.Framework.Graphics.Texture2D

Checks to see if the player is idle if it is, change his face

Draw ( SpriteBatch canvas, GameTime gametime ) : void

Draw the player, with rotation due to gravity taken into affect

IsFaceStraight ( ) : bool

Checks to see if the face is straight

Kill ( ) : int

Handle players death

Player ( Microsoft.Xna.Framework.Content.ContentManager content, PhysicsEnvironment &environment, IControlScheme controlScheme, float friction, EntityInfo entity ) : System

Construcs a player object, that can live in a physical realm

ResetIdle ( int mTimer, GravityDirections mDirection ) : void
Respawn ( ) : void
Rumble ( double time, GameTime gameTime ) : void

Sets the controller to rumble for the amount of time passed

SetFaceStraight ( ) : void

Sets the player face to straight

StartRumble ( ) : void

Starts controller rumble

StopRumble ( ) : void

Stop controller rumble

ToString ( ) : string

Gets the Unique identifier for this object. Will be used for logging

Update ( GameTime gametime ) : void

Updates the player location and the player controls

메소드 상세

CheckForIdle() 공개 메소드

Checks to see if the player is idle if it is, change his face
public CheckForIdle ( ) : Microsoft.Xna.Framework.Graphics.Texture2D
리턴 Microsoft.Xna.Framework.Graphics.Texture2D

Draw() 공개 메소드

Draw the player, with rotation due to gravity taken into affect
public Draw ( SpriteBatch canvas, GameTime gametime ) : void
canvas Microsoft.Xna.Framework.Graphics.SpriteBatch Canvas SpriteBatch
gametime Microsoft.Xna.Framework.GameTime Current gametime
리턴 void

IsFaceStraight() 공개 메소드

Checks to see if the face is straight
public IsFaceStraight ( ) : bool
리턴 bool

Kill() 공개 메소드

Handle players death
public Kill ( ) : int
리턴 int

Player() 공개 메소드

Construcs a player object, that can live in a physical realm
public Player ( Microsoft.Xna.Framework.Content.ContentManager content, PhysicsEnvironment &environment, IControlScheme controlScheme, float friction, EntityInfo entity ) : System
content Microsoft.Xna.Framework.Content.ContentManager Content manager for the game
environment PhysicsEnvironment
controlScheme IControlScheme Controller scheme for the player(Controller or keyboard)
friction float
entity MrGravity.Import_Code.EntityInfo
리턴 System

ResetIdle() 공개 메소드

public ResetIdle ( int mTimer, GravityDirections mDirection ) : void
mTimer int
mDirection GravityDirections
리턴 void

Respawn() 공개 메소드

public Respawn ( ) : void
리턴 void

Rumble() 공개 메소드

Sets the controller to rumble for the amount of time passed
public Rumble ( double time, GameTime gameTime ) : void
time double The amount of time to rumble
gameTime Microsoft.Xna.Framework.GameTime The current gameTime
리턴 void

SetFaceStraight() 공개 메소드

Sets the player face to straight
public SetFaceStraight ( ) : void
리턴 void

StartRumble() 공개 메소드

Starts controller rumble
public StartRumble ( ) : void
리턴 void

StopRumble() 공개 메소드

Stop controller rumble
public StopRumble ( ) : void
리턴 void

ToString() 공개 메소드

Gets the Unique identifier for this object. Will be used for logging
public ToString ( ) : string
리턴 string

Update() 공개 메소드

Updates the player location and the player controls
public Update ( GameTime gametime ) : void
gametime Microsoft.Xna.Framework.GameTime The current Gametime
리턴 void

프로퍼티 상세

MCurrentTexture 공개적으로 프로퍼티

public Texture2D,Microsoft.Xna.Framework.Graphics MCurrentTexture
리턴 Microsoft.Xna.Framework.Graphics.Texture2D

MIsAlive 공개적으로 프로퍼티

public bool MIsAlive
리턴 bool

MNumLives 공개적으로 프로퍼티

public int MNumLives
리턴 int