Klasse Character

java.lang.Object
com.botwAdventureOnline.Character
Alle implementierten Schnittstellen:
Serializable
Bekannte direkte Unterklassen:
Hestu, Korok, Merchant, Monster, Player

public class Character extends Object implements Serializable
Siehe auch:
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Character(int pHp, int pAd, String pName)
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    die()
    Prints a message to the Player that the Character died
    int
     
    int
     
     
    void
    hit(int pAd)
    The Character is dealt damage based on the attack damage passed as a parameter
    boolean
     
    void
    setAd(int pAd)
    Sets the Character's Attack Damage
    void
    setHp(int hp)
    Sets the health points of the Character

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • Character

      public Character(int pHp, int pAd, String pName)
      Parameter:
      pHp - Set the health points of the Character
      pAd - Set the Characters attack damage
      pName - 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

      public String 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