public class PlayerGoals
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
chooseTrain |
static GoalActor |
newgoal1 |
static GoalActor |
newgoal2 |
static GoalActor |
newgoal3 |
static int |
numberofOwnedGoals |
static boolean |
open |
static SpriteButton |
planRouteBtn |
static java.util.HashMap<java.lang.String,GoalActor> |
playerGoalActors |
static java.util.HashMap<java.lang.String,Goal> |
playerGoals |
static PlayerGoalRemoveBtn |
removebtn1 |
static PlayerGoalRemoveBtn |
removebtn2 |
static PlayerGoalRemoveBtn |
removebtn3 |
static Goal |
selectedGoal |
static GoalActor |
selectedGoalActor |
static int |
stagestart |
com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle |
style |
com.badlogic.gdx.scenes.scene2d.ui.Label |
ticket1 |
com.badlogic.gdx.scenes.scene2d.ui.Label |
ticket2 |
com.badlogic.gdx.scenes.scene2d.ui.Label |
ticket3 |
static int |
ticketActors |
Constructor and Description |
---|
PlayerGoals() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addGoal(GoalActor newgoal)
AddGoal takes a new Goal Actor and adds it to player goals by taking its goal attributes and adding it to the bottom of the
current player goals.
|
static void |
changePlayer(Player player)
Change Player is used when we end turn to get the goals of the player whose turn it is.
|
void |
create(com.badlogic.gdx.scenes.scene2d.Stage stage) |
static java.lang.String |
getSpacing(int len)
Finds the spacing needed for formatting the ticket.
|
static void |
goalMenuClose()
Moves the playerGoals in to place when the goal menu is closed.
|
static void |
goalMenuOpen()
Moves the playerGoals in to place when the goal menu is opened.
|
static void |
removeGoal(int goalIndex)
RemoveGoal takes a goal index, removes that goal and shuffles the others up (if needed)
|
static java.lang.String |
ticketMaker(java.lang.String type,
int reward,
java.lang.String from,
java.lang.String startdate,
java.lang.String dest,
java.lang.String route)
TicketMaker creates the Label using the Goal attributes.
|
static void |
undoGoalSelection(int index)
undoGoalSelection puts back the goal you just picked from the goal menu.
|
public static java.util.HashMap<java.lang.String,Goal> playerGoals
public static java.util.HashMap<java.lang.String,GoalActor> playerGoalActors
public static GoalActor newgoal1
public static GoalActor newgoal2
public static GoalActor newgoal3
public com.badlogic.gdx.scenes.scene2d.ui.Label ticket1
public com.badlogic.gdx.scenes.scene2d.ui.Label ticket2
public com.badlogic.gdx.scenes.scene2d.ui.Label ticket3
public com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle style
public static PlayerGoalRemoveBtn removebtn1
public static PlayerGoalRemoveBtn removebtn2
public static PlayerGoalRemoveBtn removebtn3
public static boolean open
public static int stagestart
public static int ticketActors
public static int numberofOwnedGoals
public static SpriteButton planRouteBtn
public static Goal selectedGoal
public static GoalActor selectedGoalActor
public static boolean chooseTrain
public void create(com.badlogic.gdx.scenes.scene2d.Stage stage)
public static java.lang.String ticketMaker(java.lang.String type, int reward, java.lang.String from, java.lang.String startdate, java.lang.String dest, java.lang.String route)
public static java.lang.String getSpacing(int len)
public static void goalMenuOpen()
public static void goalMenuClose()
public static void removeGoal(int goalIndex)
goalIndex
- - the index of the goal you want to remove from PlayerGoals.public static boolean addGoal(GoalActor newgoal)
newgoal
- the GoalMenu GoalActor which you want to add to the playerGoalspublic static void undoGoalSelection(int index)
index
- -The index of the player goal the player wants to put back.public static void changePlayer(Player player)
player
- -current Player.