Method | Description | |
---|---|---|
Cast1 ( |
checks if hero has enough mana to cast a fireball and if so then plays the sound and adds a fireball projectile.
|
|
RegenerateMana ( float amount = -1 ) : void |
Regenerates mana.
|
|
Update ( |
Allows the game component to update itself.
|
|
Wizard ( |
||
checkDeath ( ) : void |
Checks if hero has been slain and removes it from the game components.
|
|
increaseStats ( ) : void |
When a level is gained hitpoints and and mana is increased. If hero dies at the same time when he gains a level, hero does not get max hitpoints back. The dead should stay dead.
|
|
killGain ( int exp, int money ) : void |
this method is called whenever a monster dies. The hero gains exp and gold from the monster that died and calls for levelup method.
|
|
levelup ( ) : void |
Checks if the hero has gained enough experience to gain a lvl and if so multiplies to next level by 2 so that the next level won't be reached as fast as the previous and also calls for increaseStats() method.
|
|
takeDmg ( int amount ) : void |
Reduces hitpoints as given in the parametres. Calls checkDeath() after this.
|
Method | Description | |
---|---|---|
LoadContent ( ) : void |
Allows the game comopnent to load content from disk.
|
|
ProcessKeyboardInput ( |
Reads and processes the input from the keyboard.
|
|
ProcessMouseInput ( |
Reads and processes the input from the mouse.
|
Method | Description | |
---|---|---|
addProjectile ( ) : void |
the direction of the fireball is taken from the mouse position in other words the projectile is launched towards the current mouse position
|
public Cast1 ( |
||
gameTime | ||
return | bool |
protected ProcessKeyboardInput ( |
||
gameTime | ||
return | void |
protected ProcessMouseInput ( |
||
gameTime | ||
return | void |
public RegenerateMana ( float amount = -1 ) : void | ||
amount | float | |
return | void |
public Update ( |
||
gameTime | Provides a snapshot of timing values. | |
return | void |
public Wizard ( |
||
game | ||
gameState | ||
position | Vector3 | |
return | System |
public killGain ( int exp, int money ) : void | ||
exp | int | |
money | int | |
return | void |