mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Arrows work. mark arrow thinner. refactored marker class.
#fix
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package seng302.visualiser.fxObjects;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javafx.scene.Group;
|
||||
import seng302.visualiser.fxObjects.MarkArrowFactory.RoundingSide;
|
||||
|
||||
/**
|
||||
* Created by cir27 on 28/09/17.
|
||||
*/
|
||||
public abstract class Marker extends Group{
|
||||
|
||||
protected List<Group> enterArrows = new ArrayList<>();
|
||||
protected List<Group> exitArrows = new ArrayList<>();
|
||||
protected int enterArrowIndex = 0;
|
||||
protected int exitArrowIndex = 0;
|
||||
|
||||
public abstract void addArrows(RoundingSide roundingSide, double entryAngle, double exitAngle);
|
||||
/**
|
||||
* Shows the next EnterArrow. Does nothing if there are no more enter arrows. Other arrows become hidden.
|
||||
*/
|
||||
public void showNextEnterArrow() {
|
||||
showArrow(enterArrows, enterArrowIndex);
|
||||
enterArrowIndex++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the next ExitArrow. Does nothing if there are no more enter arrows. Other arrows become hidden.
|
||||
*/
|
||||
public void showNextExitArrow() {
|
||||
showArrow(exitArrows, exitArrowIndex);
|
||||
exitArrowIndex++;
|
||||
}
|
||||
|
||||
protected abstract void showArrow(List<Group> arrowList, int arrowListIndex);
|
||||
|
||||
public abstract void hideAllArrows();
|
||||
}
|
||||
Reference in New Issue
Block a user