Package com.botwAdventureOnline
Klasse Character
java.lang.Object
com.botwAdventureOnline.Character
- Alle implementierten Schnittstellen:
Serializable
- Siehe auch:
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoiddie()Prints a message to the Player that the Character diedintgetAd()intgetHp()getName()voidhit(int pAd) The Character is dealt damage based on the attack damage passed as a parameterbooleanisDead()voidsetAd(int pAd) Sets the Character's Attack DamagevoidsetHp(int hp) Sets the health points of the Character
-
Konstruktordetails
-
Character
- Parameter:
pHp- Set the health points of the CharacterpAd- Set the Characters attack damagepName- Set the name of the sCharacter
-
-
Methodendetails
-
setHp
public void setHp(int hp) Sets the health points of the Character- Parameter:
hp- The new health points of the Character
-
getHp
public int getHp()- Gibt zurück:
- Returns the current health points of the Character
-
getAd
public int getAd()- Gibt zurück:
- Returns the Character's attack damage
-
setAd
public void setAd(int pAd) Sets the Character's Attack Damage- Parameter:
pAd- The Value of the new attack damage
-
getName
- Gibt zurück:
- Returns the name of the Character
-
hit
public void hit(int pAd) The Character is dealt damage based on the attack damage passed as a parameter- Parameter:
pAd- Pass the Characters attack damage to deal damage
-
die
public void die()Prints a message to the Player that the Character died -
isDead
public boolean isDead()- Gibt zurück:
- Returns true if the Character is dead, means the Character has no health points
-