Class SmallWeaponSlot

  • All Implemented Interfaces:
    IWeaponSlot

    public class SmallWeaponSlot
    extends java.lang.Object
    implements IWeaponSlot
    Weapon slot for a small weapon.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2017 Created on Aug 15, 2017
    • Field Detail

      • side

        private final ESide side
      • id

        private final int id
      • weapon

        private java.util.Optional<IWeapon> weapon
      • offset

        private javafx.geometry.Point2D offset
    • Constructor Detail

      • SmallWeaponSlot

        public SmallWeaponSlot()
    • Method Detail

      • setWeapon

        public void setWeapon​(IWeapon weapon)
        Place a small weapon in the slot. If null is passed the slot is emptied.
        Specified by:
        setWeapon in interface IWeaponSlot
        Parameters:
        weapon - to be placed
      • assertWeaponType

        private void assertWeaponType​(IWeapon weapon)