T - Type of vector, either 2D or 3D, implementing the Vector interfacepublic interface FormationPattern<T extends com.badlogic.gdx.math.Vector<T>>
FormationPattern interface represents the shape of a formation and generates the slot offsets, relative to its
anchor point. Since formations can be scalable the pattern must be able to determine if a given number of slots is supported.
Each particular pattern (such as a V, wedge, circle) needs its own instance of a class that implements this
FormationPattern interface.
| Modifier and Type | Method and Description |
|---|---|
Location<T> |
calculateSlotLocation(Location<T> outLocation,
int slotNumber)
Returns the location of the given slot index.
|
void |
setNumberOfSlots(int numberOfSlots)
Sets the number of slots.
|
boolean |
supportsSlots(int slotCount)
Returns true if the pattern can support the given number of slots
|
void setNumberOfSlots(int numberOfSlots)
numberOfSlots - the number of slots to setLocation<T> calculateSlotLocation(Location<T> outLocation, int slotNumber)
boolean supportsSlots(int slotCount)
slotCount - the number of slotstrue if this pattern can support the given number of slots; false othervwise.