C# Класс MrGravity.Game_Objects.Physics_Objects.Player

Represents the player in the game
Наследование: PhysicsObject
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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