Package com.botwAdventureOnline
Klasse Player
java.lang.Object
com.botwAdventureOnline.Character
com.botwAdventureOnline.Player
- Alle implementierten Schnittstellen:
Serializable
- Siehe auch:
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoiddie()Runs if the player is dead because he has no more health pointsintgetDp()intgetEp()intgetLevel()intgetMaxHp()intintintvoidlevelUp()Levels up the player and increases the player's statsbooleanvoidrest()Sets the player's level health points to his maximum healthvoidsetEp(int ep) Updates the player's experience pointsvoidsetXCoordinate(int pxCoordinate) voidsetYCoordinate(int pyCoordinate)
-
Konstruktordetails
-
Player
- Parameter:
pName- The name of the playerpHp- The maximal health of the player at the start of the gamepAd- The player's attack damage at the start of the gamepDp- The player's defense points at the start of the game
-
-
Methodendetails
-
getXCoordinate
public int getXCoordinate() -
getYCoordinate
public int getYCoordinate() -
setXCoordinate
public void setXCoordinate(int pxCoordinate) -
setYCoordinate
public void setYCoordinate(int pyCoordinate) -
getLevel
public int getLevel()- Gibt zurück:
- Returns the player's level
-
getDp
public int getDp()- Gibt zurück:
- Returns the player's defense points
-
getMaxHp
public int getMaxHp()- Gibt zurück:
- Returns the maximal health of the player
-
getEp
public int getEp()- Gibt zurück:
- Returns the player's experience points
-
setEp
public void setEp(int ep) Updates the player's experience points- Parameter:
ep- The new player's experience points
-
die
public void die()Runs if the player is dead because he has no more health points -
rest
public void rest()Sets the player's level health points to his maximum health -
nextLevel
public boolean nextLevel()- Gibt zurück:
- Returns if the player has enough experience points to level up
-
levelUp
public void levelUp()Levels up the player and increases the player's stats -
getInventory
- Gibt zurück:
- Returns the player's inventory
-
getStartAd
public int getStartAd()- Gibt zurück:
- Returns the player's start attack damage
-