com.TeamHEC.LocomotionCommotion.Goal
Class GoalMenu

java.lang.Object
  extended by com.TeamHEC.LocomotionCommotion.Goal.GoalMenu

public class GoalMenu
extends java.lang.Object

Author:
Robert Precious Goal Menu is where the player can select new goals. The create method: Instantiates all goalActors and the corresponding labels. All empty to start with.

Field Summary
static SpriteButton addGoalBtn
           
static SpriteButton backBtn
           
static Sprite backDrop
           
static int col1
           
static int col2
           
static int col3
           
static java.util.ArrayList<GoalActor> createdGoals
           
static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel1
           
static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel2
           
static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel3
           
static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel4
           
static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel5
           
static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel6
           
static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel7
           
static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel8
           
static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel9
           
static int goalActors
           
static java.util.HashMap<java.lang.String,com.badlogic.gdx.scenes.scene2d.ui.Label> goalLabels
           
static GoalActor newgoal1
           
static GoalActor newgoal2
           
static GoalActor newgoal3
           
static GoalActor newgoal4
           
static GoalActor newgoal5
           
static GoalActor newgoal6
           
static GoalActor newgoal7
           
static GoalActor newgoal8
           
static GoalActor newgoal9
           
static java.util.HashMap<java.lang.String,Goal> newgoals
           
static int numberofGoalsOnScreen
           
static boolean open
           
static SpriteButton refreshGoalsBtn
           
static int row1
           
static int row2
           
static int row3
           
static GoalActor selectedGoal
           
static int stagestart
           
static com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle style
           
 
Constructor Summary
GoalMenu()
           
 
Method Summary
static void AddGoalToScreen(java.util.ArrayList<Goal> goals)
          Runs through the goals given finding them empty slots (by calling findEmptyGoalSlot) and adding them to the GoalMenu.
static void addLabelstoStage()
          Adds all labels to stage
 void create(com.badlogic.gdx.scenes.scene2d.Stage stage)
           
static java.util.HashMap<java.lang.String,com.badlogic.gdx.scenes.scene2d.ui.Label> createLabels()
          Creates the blank labels
static void fillGoalScreen()
          FillGoalScreen() fills the goal screen by running through 9 createRandomGoal calls and sends the array to Add Goal to Screen.
static int findEmptyGoalSlot(java.util.HashMap<java.lang.String,com.badlogic.gdx.scenes.scene2d.ui.Label> newgoalLabels)
           
static java.lang.String ticketMaker(java.lang.String type, int reward, java.lang.String from, int startdate, java.lang.String dest, java.lang.String route)
          Creates the string that make up the ticket information
static java.lang.String ticketMaker(java.lang.String type, int reward, java.lang.String from, int startdate, java.lang.String dest, java.lang.String route, int turnLimit)
          TicketMaker for time limited and combo goals
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

createdGoals

public static java.util.ArrayList<GoalActor> createdGoals

newgoals

public static java.util.HashMap<java.lang.String,Goal> newgoals

goalLabels

public static java.util.HashMap<java.lang.String,com.badlogic.gdx.scenes.scene2d.ui.Label> goalLabels

newgoal1

public static GoalActor newgoal1

newgoal2

public static GoalActor newgoal2

newgoal3

public static GoalActor newgoal3

newgoal4

public static GoalActor newgoal4

newgoal5

public static GoalActor newgoal5

newgoal6

public static GoalActor newgoal6

newgoal7

public static GoalActor newgoal7

newgoal8

public static GoalActor newgoal8

newgoal9

public static GoalActor newgoal9

selectedGoal

public static GoalActor selectedGoal

stagestart

public static int stagestart

goalActors

public static int goalActors

row1

public static int row1

row2

public static int row2

row3

public static int row3

col1

public static int col1

col2

public static int col2

col3

public static int col3

gLabel1

public static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel1

gLabel2

public static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel2

gLabel3

public static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel3

gLabel4

public static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel4

gLabel5

public static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel5

gLabel6

public static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel6

gLabel7

public static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel7

gLabel8

public static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel8

gLabel9

public static com.badlogic.gdx.scenes.scene2d.ui.Label gLabel9

style

public static com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle style

open

public static boolean open

numberofGoalsOnScreen

public static int numberofGoalsOnScreen

backDrop

public static Sprite backDrop

backBtn

public static SpriteButton backBtn

addGoalBtn

public static SpriteButton addGoalBtn

refreshGoalsBtn

public static SpriteButton refreshGoalsBtn
Constructor Detail

GoalMenu

public GoalMenu()
Method Detail

create

public void create(com.badlogic.gdx.scenes.scene2d.Stage stage)

createLabels

public static java.util.HashMap<java.lang.String,com.badlogic.gdx.scenes.scene2d.ui.Label> createLabels()
Creates the blank labels

Returns:
HashMap goal labels

addLabelstoStage

public static void addLabelstoStage()
Adds all labels to stage


ticketMaker

public static java.lang.String ticketMaker(java.lang.String type,
                                           int reward,
                                           java.lang.String from,
                                           int startdate,
                                           java.lang.String dest,
                                           java.lang.String route)
Creates the string that make up the ticket information

Parameters:
type -
reward -
from -
startdate -
dest -
route -
Returns:
String ticket

ticketMaker

public static java.lang.String ticketMaker(java.lang.String type,
                                           int reward,
                                           java.lang.String from,
                                           int startdate,
                                           java.lang.String dest,
                                           java.lang.String route,
                                           int turnLimit)
TicketMaker for time limited and combo goals

Parameters:
type -
reward -
from -
startdate -
dest -
route -
turnLimit -
Returns:
String ticket

AddGoalToScreen

public static void AddGoalToScreen(java.util.ArrayList<Goal> goals)
Runs through the goals given finding them empty slots (by calling findEmptyGoalSlot) and adding them to the GoalMenu.

Parameters:
goals - -ArrayList of goals to be added to the GoalMenu.

findEmptyGoalSlot

public static int findEmptyGoalSlot(java.util.HashMap<java.lang.String,com.badlogic.gdx.scenes.scene2d.ui.Label> newgoalLabels)
Parameters:
newgoalLabels - - the current Goal labels.
Returns:
- An empty GoalMenu slot index

fillGoalScreen

public static void fillGoalScreen()
FillGoalScreen() fills the goal screen by running through 9 createRandomGoal calls and sends the array to Add Goal to Screen.