Class SecondaryLargeWeaponSlot
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.ship.SecondaryLargeWeaponSlot
-
- All Implemented Interfaces:
IWeaponSlot
public class SecondaryLargeWeaponSlot extends java.lang.Object implements IWeaponSlot
Secondary large weapon slot. When a large weapon is placed in the primary slot, this slot will be occupied as well. If a small weapon is placed only one slot will be occupied.- Author:
- Andi Hotz, (c) Sahits GmbH, 2017 Created on Aug 16, 2017
-
-
Constructor Summary
Constructors Constructor Description SecondaryLargeWeaponSlot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
assertWeaponType(IWeapon weapon)
void
combineWithBigSlot(PrimaryLargeWeaponSlot primarySlot)
Assign the secondary slot to a primary slot.void
setWeapon(IWeapon weapon)
Place a small weapon in the slot.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.ship.IWeaponSlot
getId, getOffset, getSide, getWeapon
-
-
-
-
Method Detail
-
combineWithBigSlot
public void combineWithBigSlot(PrimaryLargeWeaponSlot primarySlot)
Assign the secondary slot to a primary slot.- Parameters:
primarySlot
- which which this slot is combined for large weapons.
-
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 interfaceIWeaponSlot
- Parameters:
weapon
- to be placed.
-
assertWeaponType
private void assertWeaponType(IWeapon weapon)
-
-