Esempio n. 1
0
  // Function who return weapon infos
  public String getWeaponInfos() {
    String res = "";

    res = res + activeWeapon.getName() + "(" + activeWeapon.getDamage() + ")";

    return res;
  }
Esempio n. 2
0
  // Function called on weapon equiping
  public void equipWeapon(Weapon w) {
    displayBlue("Armure équipée!" + w.getItemInfos());

    if (activeWeapon == null) {
      activeWeapon = w;
    } else {
      Weapon currentWeapon = activeWeapon;
      addInventary(currentWeapon, 1);

      activeWeapon = w;

      deleteItem(w);
    }
  }