public class WeaponStorage extends Object implements IWeaponStorage
| Modifier and Type | Field and Description |
|---|---|
private Hashtable<IWeapon,BaseAmountable<IWeapon>> |
storage |
| Constructor and Description |
|---|
WeaponStorage() |
| Modifier and Type | Method and Description |
|---|---|
int |
getWeapon(IWeapon weapon)
Retrieve the amount of weapons in storage
|
boolean |
hasWeapons()
check if there are any weapons stored
|
int |
update(IWeapon weapon,
int amount)
Move weapons in or out of storage
|
private Hashtable<IWeapon,BaseAmountable<IWeapon>> storage
public int getWeapon(IWeapon weapon)
IWeaponStoragegetWeapon in interface IWeaponStoragepublic int update(IWeapon weapon, int amount)
IWeaponStorageupdate in interface IWeaponStorageweapon - type of weaponamount - to be moved (positive means into the storage, negative out of the storage)public boolean hasWeapons()
IWeaponStoragehasWeapons in interface IWeaponStorageCopyright © 2011-2015 Sahits GmbH. All Rights Reserved.