Interface IWeaponSlot
-
- All Known Implementing Classes:
PrimaryLargeWeaponSlot
,SecondaryLargeWeaponSlot
,SmallWeaponSlot
public interface IWeaponSlot
One slot for a weapon- Author:
- Andi Hotz, (c) Sahits GmbH, 2017 Created on Aug 15, 2017
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getId()
Retrieve the identifier for this slot.javafx.geometry.Point2D
getOffset()
Retrieve the offset of the empty weapon slot.ESide
getSide()
Retrieve the side the slot is located on.java.util.Optional<IWeapon>
getWeapon()
Retrieve the weapon stored in this slot.void
setWeapon(IWeapon weapon)
Set or unset a weapon in the slot.
-
-
-
Method Detail
-
getSide
ESide getSide()
Retrieve the side the slot is located on.- Returns:
- side of the slot.
-
getWeapon
java.util.Optional<IWeapon> getWeapon()
Retrieve the weapon stored in this slot.- Returns:
- Optional weapon. Empty when the slot is free
-
setWeapon
void setWeapon(IWeapon weapon)
Set or unset a weapon in the slot.null
will unset the weapon.- Parameters:
weapon
- to place in the the slot
-
getOffset
javafx.geometry.Point2D getOffset()
Retrieve the offset of the empty weapon slot.- Returns:
- offset of the slot
-
getId
int getId()
Retrieve the identifier for this slot.- Returns:
- ID of the slot.
-
-