LevelGraphEdge.java 512 B

12345678910111213141516171819202122
  1. package me.hammerle.supersnuvi.gamelogic.pathfinding;
  2. /**
  3. * edge of the graph, which represents the level layout
  4. * used for pathfinding
  5. */
  6. public class LevelGraphEdge extends SimpleEdge implements IDirectedEdge {
  7. protected int direction;
  8. public LevelGraphEdge(LevelGraphNode node1, LevelGraphNode node2, double weight, int direction) {
  9. super(node1, node2, weight);
  10. this.direction = direction;
  11. }
  12. @Override
  13. public int getDirection() {
  14. return direction;
  15. }
  16. }