Class YComparator

java.lang.Object
com.devcharles.piazzapanic.utility.YComparator
All Implemented Interfaces:
Comparator<com.badlogic.ashley.core.Entity>

public class YComparator extends Object implements Comparator<com.badlogic.ashley.core.Entity>
Compares entities by their Y coordinate, so entities that are lower on the screen appear in front for a consistent perspective.
  • Constructor Details

    • YComparator

      public YComparator()
  • Method Details

    • compare

      public int compare(com.badlogic.ashley.core.Entity entityA, com.badlogic.ashley.core.Entity entityB)
      Specified by:
      compare in interface Comparator<com.badlogic.ashley.core.Entity>