C# Class PlayDead.Character

Mostrar archivo Open project: zmthy/play-dead Class Usage Examples

Public Methods

Method Description
Character ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System
Draw ( SpriteBatch spriteBatch ) : void

Draws the character onto the screen

KeyInput ( ) : void

The KeyInput method handles all keyboard input for the character.

Move ( ) : void

Handles the actual movement of the character, and animation thereof

Private Methods

Method Description
CheckCollision ( Rectangle bounds ) : bool
SlowDown ( int i ) : void

Gradually slows the character down if the character stops running

Method Details

Character() public method

public Character ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System
texture Microsoft.Xna.Framework.Graphics.Texture2D
return System

Draw() public method

Draws the character onto the screen
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The SpriteBatch to use to render this sprite
return void

KeyInput() public method

The KeyInput method handles all keyboard input for the character.
public KeyInput ( ) : void
return void

Move() public method

Handles the actual movement of the character, and animation thereof
public Move ( ) : void
return void