Interface IWeaponStorage

  • All Known Implementing Classes:
    WeaponStorage

    public interface IWeaponStorage
    Define the stored amount of weapons
    Author:
    Andi Hotz, (c) Sahits GmbH, 2012 Created on Jul 25, 2012
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getWeapon​(IWeapon weapon)
      Retrieve the amount of weapons in storage
      javafx.beans.property.ReadOnlyIntegerProperty getWeaponProperty​(IWeapon weapon)
      Retrieve the property holding the mount of stored weapons of the indicated type.
      boolean hasWeapons()
      check if there are any weapons stored
      int update​(IWeapon weapon, int amount)
      Move weapons in or out of storage
    • Method Detail

      • getWeapon

        int getWeapon​(IWeapon weapon)
        Retrieve the amount of weapons in storage
        Parameters:
        weapon - for which to retrieve the amount
        Returns:
        amount of weapon stored.
      • getWeaponProperty

        javafx.beans.property.ReadOnlyIntegerProperty getWeaponProperty​(IWeapon weapon)
        Retrieve the property holding the mount of stored weapons of the indicated type.
        Parameters:
        weapon - for which to retrieve the amount
        Returns:
        read only property of the amount of stored weapon
      • update

        int update​(IWeapon weapon,
                   int amount)
        Move weapons in or out of storage
        Parameters:
        weapon - type of weapon
        amount - to be moved (positive means into the storage, negative out of the storage)
        Returns:
        amount that is moved
      • hasWeapons

        boolean hasWeapons()
        check if there are any weapons stored
        Returns:
        true if weapons are stored