C# Class PlatformTest.Character

Datei anzeigen Open project: zmthy/play-dead

Public Methods

Method Description
Draw ( SpriteBatch spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : 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

Draw() public method

Draws the character onto the screen
public Draw ( SpriteBatch spriteBatch, Microsoft.Xna.Framework.Graphics.Texture2D texture ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The SpriteBatch to use to render this sprite
texture Microsoft.Xna.Framework.Graphics.Texture2D The character's texture sheet (this should really be local to the class...)
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