Package com.botwAdventureOnline
Klasse Inventory
java.lang.Object
com.botwAdventureOnline.Inventory
- Alle implementierten Schnittstellen:
Serializable
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungThe currently equipped sword of the player -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidvoidintintintintdoublegetUsage()intvoidremovePotion(Item item) voidremoveSword(Item item) voidsetEquippedSword(Item equippedSword) Sets the equipped sword of the playervoidsetKorokSeeds(int korokSeeds) voidsetMaxWeight(int maxWeight) voidsetRupees(int pRupees) voidsetWeight(int weight)
-
Felddetails
-
equippedSword
The currently equipped sword of the player
-
-
Konstruktordetails
-
Inventory
public Inventory(int pMaxWeight) - Parameter:
pMaxWeight- The maximum weight of the player at the start of the game
-
-
Methodendetails
-
getPotions
- Gibt zurück:
- Returns the Potions
-
getEquippedSword
- Gibt zurück:
- Returns the equipped sword
-
setEquippedSword
Sets the equipped sword of the player- Parameter:
equippedSword- The new equipped sword
-
addPotion
- Parameter:
potion- The Potion that gets added to the player's potions
-
getSwords
- Gibt zurück:
- returns the swords
-
addSword
- Parameter:
sword- The sword that gets added to the player's swords
-
getMaxWeight
public int getMaxWeight()- Gibt zurück:
- Returns the maximum weight of the inventory
-
getWeight
public int getWeight()- Gibt zurück:
- Returns the current weight of the inventory
-
getRupees
public int getRupees()- Gibt zurück:
- Returns the rupees of the player
-
setRupees
public void setRupees(int pRupees) - Parameter:
pRupees- The new amount of rupees
-
setKorokSeeds
public void setKorokSeeds(int korokSeeds) - Parameter:
korokSeeds- The new amount of korokseeds
-
getUsage
public double getUsage()- Gibt zurück:
- Returns the percentage of the weight's usage
-
getKorokSeeds
public int getKorokSeeds()- Gibt zurück:
- Returns the amount of korokseeds the player has
-
setMaxWeight
public void setMaxWeight(int maxWeight) - Parameter:
maxWeight- The new maximum weight of the inventory
-
setWeight
public void setWeight(int weight) - Parameter:
weight- The new current weight of the inventory
-
removePotion
- Parameter:
item- Potion that gets removed from the player's potions
-
removeSword
- Parameter:
item- Sword that gets removed from the player's swords
-
getItemCount
public int getItemCount()- Gibt zurück:
- Return the amount of potions and swords in total
-