C# Class PlayDead.Character

Afficher le fichier Open project: zmthy/play-dead Class Usage Examples

Méthodes publiques

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

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

Gradually slows the character down if the character stops running

Method Details

Character() public méthode

public Character ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : System
texture Microsoft.Xna.Framework.Graphics.Texture2D
Résultat System

Draw() public méthode

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
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