Interface DropTarget

All Known Implementing Classes:
FeatureEnabledItemPanel, GameScreen

public interface DropTarget
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canAccept​(IEntity entity)
    Check if the DropTarget can accept a certain entity.
    void
    dropEntity​(IEntity entity, int amount, Point point)
    Drop an entity at a given location.
  • Method Details

    • dropEntity

      void dropEntity(IEntity entity, int amount, Point point)
      Drop an entity at a given location. Called when dragging ends.
      Parameters:
      entity - dropped entity
      amount - number of dropped entities. -1 in case everything in the stack should be dropped
      point - location within the DropTarget
    • canAccept

      boolean canAccept(IEntity entity)
      Check if the DropTarget can accept a certain entity.
      Parameters:
      entity - entity to be checked
      Returns:
      true, if the DropTarget can process the entity in question, false otherwise