Class Hero

Coming soon…

Functions:

  • Coming soon…

etc.

Constructor Summary

nil

Method Summary

- (id) initHero

 Start to initialize the Hero ability. e.g. HP, MP, Att, Def. 

- (void) drawStatus

 Draw the view of the Hero.e.g. HP bar, MP bar, Current Level

- (void) convertToImageNumber

 Convert the number display to image display.

- (void) levelUp

 Increase the Exp get for the Hero, and check if enough to Level up.

- (void) gotMoney

 Increase the money when there is money get in the game.

Method Detail

initHero

- (id) initHero

This method will generate all the attribute of the Hero in the game. All initial ability of Hero will set when the game start.

Parameters:

 initHP,initMP,initAtt,initDef 

Returns:

 self object reference.

drawStatus

- (void) drawStatus

Perform the OpenGL drawing of the view of the current status of the Hero. Which include the HP bar, MP bar, Level.

Parameters:

 nil 

Returns:

 nil

convertToImageNumber

- (void) convertToImageNumber

Change the normal number display to image display. That is using the number images to display instead of using integer.

Parameters:

 num 

Returns:

 nil

levelUp

- (void) levelUp

If there is enough exp got by the Hero, he then level up.

Parameters:

 gotExp

Returns:

 nil

gotMoney

- (void) gotMoney

Increase the Hero money(saving) if he can get money in the game.

Parameters:

 income 

Returns:

 nil

more method will be added later

 
fyp/ik0801/hero.class.txt · Last modified: 2008/10/14 12:05 (external edit)     Back to top