C# Class CastleEscape.Player

Inheritance: IOverworldEntity, IBattleCharacter
Show file Open project: Daminvar/CastleEscape Class Usage Examples

Public Methods

Method Description
AddItem ( Item item ) : void
DrawForBattle ( SpriteBatch spriteBatch, int x, int y ) : void
DrawForOverworld ( SpriteBatch spriteBatch, DrawableMap map, int x, int y ) : void
HealthAfterCombat ( IBattleCharacter enemy ) : int
IsDead ( ) : bool

Checks if the Player is dead

LoadTexture ( Microsoft.Xna.Framework.Game game ) : void
Move ( int x, int y ) : void

Moves the character.

Player ( Microsoft.Xna.Framework.Game game, int xPos, int yPos ) : System

The Player constructor

getAccuracy ( string attackType ) : void

Method Details

AddItem() public method

public AddItem ( Item item ) : void
item Item
return void

DrawForBattle() public method

public DrawForBattle ( SpriteBatch spriteBatch, int x, int y ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
x int
y int
return void

DrawForOverworld() public method

public DrawForOverworld ( SpriteBatch spriteBatch, DrawableMap map, int x, int y ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
map DrawableMap
x int
y int
return void

HealthAfterCombat() public method

public HealthAfterCombat ( IBattleCharacter enemy ) : int
enemy IBattleCharacter
return int

IsDead() public method

Checks if the Player is dead
public IsDead ( ) : bool
return bool

LoadTexture() public method

public LoadTexture ( Microsoft.Xna.Framework.Game game ) : void
game Microsoft.Xna.Framework.Game
return void

Move() public method

Moves the character.
public Move ( int x, int y ) : void
x int
y int
return void

Player() public method

The Player constructor
public Player ( Microsoft.Xna.Framework.Game game, int xPos, int yPos ) : System
game Microsoft.Xna.Framework.Game
xPos int The starting x-position
yPos int The starting y-position
return System

getAccuracy() public method

public getAccuracy ( string attackType ) : void
attackType string
return void