Interface FlockBehavior

All Known Implementing Classes:
AlignmentBehavior, CohesionBehavior, SeparationBehavior

public interface FlockBehavior
An interface to be used with an Flocker to represent a certain type of behavior such as cohesion, alignment or separation.
  • Method Details

    • getVector

      Vector getVector(NPC npc, Collection<NPC> nearby)
      Returns the displacement vector to be combined with other FlockBehavior vectors by a Flocker.
      nearby - the set of NPCs to consider for flocking purposes
      the displacement Vector