C# Class PlatformTest.Character

Afficher le fichier Open project: zmthy/play-dead

Méthodes publiques

Méthode 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

Méthode Description
CheckCollision ( Rectangle bounds ) : bool
SlowDown ( int i ) : void

Gradually slows the character down if the character stops running

Method Details

Draw() public méthode

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...)
Résultat void

KeyInput() public méthode

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

Move() public méthode

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