Class Monster

Coming soon…

Functions:

  • Coming soon…

etc.

Constructor Summary

nil

Method Summary

- (void) idleDraw

 Check if there is any momnster event.

- (id) initMonsterStatus

 Initialize all attribute of Monster.

- (void) initMonsterImage

 Initialize the image of monster.

- (BOOL) hitTest

 Handle the Hero attack monster.

- (void) convertToImageNumber

 Convert the number display to image display.

- (void) reGenPosition

 Change the position of monster.

- (void) monsterAttack

 Handle cases when monster did attack.

Method Detail

idleDraw

- (id) idleDraw

Show animation if the monster attack hero. And counting when do the monster need to attack hero.

Parameters:

 nil 

Returns:

 nil

initMonsterStatus

- (void) initMonsterStatus

Initialize all attribute of the monster has. Including HP, MP, Level, money and monster image etc.

Parameters:

 initHero, x, y, initHP, initMP, initLv, initExp, income, rate, initAtt, initDef.

Returns:

 self object reference.

initMonsterImage

- (void) initMonsterImage

Getting the image of monster.

Parameters:

 frontImg, backImg, animationImg. 

Returns:

 nil

hitTest

- (void) hitTest

Test is the Hero attack the monster e.g. user touch the monster correctly. And calculate the demage of the Hero.

Parameters:

 point. 

Returns:

 boolean TRUE or FALSE

convertToImgageNumber

- (void) convertToImgageNumber

Convert the original number display to a better image display. Using the number images to display.

Parameters:

 num 

Returns:

 nil

reGenPosition

- (void) reGenPosition

Re-generate the position of the monster during the battle. That is, the monster may change its position during the battle.

Parameters:

 nil 

Returns:

 nil

monsterAttack

- (void) monsterAttack

Handle cases when the monster attack hero. Check and add the demage to the hero.

Parameters:

 nil 

Returns:

 nil

more method will be added later

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