C# Class SunsetHigh.Hero

Hero extends from Character, and is used for the main character
Inheritance: Character
Afficher le fichier Open project: ErraticUnicorn/MOSH Class Usage Examples

Méthodes publiques

Méthode Description
converse ( Character c ) : void
dialogueCancel ( ) : void
dialogueChoiceMove ( Direction dir ) : void
dialogueConfirm ( ) : void
draw ( SpriteBatch sb ) : void
getFollowerID ( ) : PersonID
getHealth ( ) : int
getReputation ( Clique clique ) : int
getSaveStructure ( ) : HeroSave

Used for saving purposes

hasFollower ( ) : bool
isPickpocketing ( ) : bool
isTalking ( ) : bool
loadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
loadSaveStructure ( HeroSave data ) : void

Used for loading purposes

move ( Direction dir, float elapsed, bool collide = true ) : bool
reset ( ) : void
setFollower ( PersonID follower ) : void
setHealth ( int health ) : void
setHealthBarVisible ( bool visible ) : void
setReputation ( Clique clique, int repPoints ) : void
shiftHealth ( int dhp ) : void
shiftReputation ( Clique clique, int repPoints ) : void
shoot ( ) : void

Causes the Hero to create a projectile and fire it in the direction he is facing; Hero is then responsible for updating and drawing this projectile

startPickpocket ( Character character ) : void

Begins the pickpocketing minigame with the given character as the target

stopFollower ( ) : void
stopPickpocket ( ) : System.Item

Stops the pickpocketing minigame and checks for success. If successful, an Item is returned; if not, Item.Nothing is returned

talkToSelf ( ) : void
update ( float elapsed ) : void

Private Methods

Méthode Description
Hero ( ) : System

Initializes a Hero at the origin which will match the dimensions of its texture (when loaded)

Hero ( int x, int y ) : System

Initalizes a Hero at the given positon which will match the dimensions of its texture (when loaded)

Hero ( int x, int y, int w, int h ) : System

Initializes a Hero at the given position with the given dimensions

heroBulletCollideEvent ( IInteractable collider ) : void

Method Details

converse() public méthode

public converse ( Character c ) : void
c Character
Résultat void

dialogueCancel() public méthode

public dialogueCancel ( ) : void
Résultat void

dialogueChoiceMove() public méthode

public dialogueChoiceMove ( Direction dir ) : void
dir Direction
Résultat void

dialogueConfirm() public méthode

public dialogueConfirm ( ) : void
Résultat void

draw() public méthode

public draw ( SpriteBatch sb ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

getFollowerID() public méthode

public getFollowerID ( ) : PersonID
Résultat PersonID

getHealth() public méthode

public getHealth ( ) : int
Résultat int

getReputation() public méthode

public getReputation ( Clique clique ) : int
clique Clique
Résultat int

getSaveStructure() public méthode

Used for saving purposes
public getSaveStructure ( ) : HeroSave
Résultat HeroSave

hasFollower() public méthode

public hasFollower ( ) : bool
Résultat bool

isPickpocketing() public méthode

public isPickpocketing ( ) : bool
Résultat bool

isTalking() public méthode

public isTalking ( ) : bool
Résultat bool

loadContent() public méthode

public loadContent ( Microsoft.Xna.Framework.Content.ContentManager content ) : void
content Microsoft.Xna.Framework.Content.ContentManager
Résultat void

loadSaveStructure() public méthode

Used for loading purposes
public loadSaveStructure ( HeroSave data ) : void
data HeroSave The save data for the Hero
Résultat void

move() public méthode

public move ( Direction dir, float elapsed, bool collide = true ) : bool
dir Direction
elapsed float
collide bool
Résultat bool

reset() public méthode

public reset ( ) : void
Résultat void

setFollower() public méthode

public setFollower ( PersonID follower ) : void
follower PersonID
Résultat void

setHealth() public méthode

public setHealth ( int health ) : void
health int
Résultat void

setHealthBarVisible() public méthode

public setHealthBarVisible ( bool visible ) : void
visible bool
Résultat void

setReputation() public méthode

public setReputation ( Clique clique, int repPoints ) : void
clique Clique
repPoints int
Résultat void

shiftHealth() public méthode

public shiftHealth ( int dhp ) : void
dhp int
Résultat void

shiftReputation() public méthode

public shiftReputation ( Clique clique, int repPoints ) : void
clique Clique
repPoints int
Résultat void

shoot() public méthode

Causes the Hero to create a projectile and fire it in the direction he is facing; Hero is then responsible for updating and drawing this projectile
public shoot ( ) : void
Résultat void

startPickpocket() public méthode

Begins the pickpocketing minigame with the given character as the target
public startPickpocket ( Character character ) : void
character Character The targeted Character
Résultat void

stopFollower() public méthode

public stopFollower ( ) : void
Résultat void

stopPickpocket() public méthode

Stops the pickpocketing minigame and checks for success. If successful, an Item is returned; if not, Item.Nothing is returned
public stopPickpocket ( ) : System.Item
Résultat System.Item

talkToSelf() public méthode

public talkToSelf ( ) : void
Résultat void

update() public méthode

public update ( float elapsed ) : void
elapsed float
Résultat void