Interface LootScatterer


  • public interface LootScatterer
    Scatters loot in the close area of an entity, e.g. after the entity has been destroyed You can access the corresponding bean implementation via ServerFacade::getBusinessObject
    • Method Detail

      • scatter

        LootContainer scatter​(int entityDefIdx,
                              CoordI2 worldPos,
                              int radius,
                              double healthPerc,
                              CoordD2 baseVelocityVector,
                              Edge2 orientation,
                              UUID droppedBy,
                              GameSession gameSession)
        Use this method to drop loot (e.g. after destroying an entity or ejecting stuff from storage)
        Parameters:
        entityDefIdx - Entity def id of the drop
        worldPos - Position where to drop
        radius - Radius around position to drop
        healthPerc - Health of drop, between 0.0 and 1.0
        baseVelocityVector - Velocity vector of the drop (e.g. same as the ship that dropped it), will be slightly randomized
        orientation - Spatial orientation of the drop
        UUID - of the composite entity that dropped the loot