| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class provides methods for the main frame to get the components of the
game. When a MainFrame is created, it is passed one of these. Basically,
by using different GameSetup instances, the game can take on many different
forms with the same "standard" mechanism around it.
Students will be given this class and the various interfaces in code format.
My implmentations of all the other classes will only be distributed in compiled,
.jar format. Over the course of the semester, the students will modify the
methods of this class and write their own implementations of the basic
interfaces to provide the behavior of the game.
DO NOT modify the signatures of the methods provided here. You can add
other methods to this class, but don't change the ones that are present
or your code is likely to stop working inside the framework.
Method Summary | |
static void | constructVariables() This method should be called in your main before you create your MainFrame. |
static Player | getLocalPlayer() Returns the instance of your Player subclass that should be used in this game. |
static JMenuBar | getMenuBar() This function returns a JMenuBar object that will be added to the main display window. |
static PriorityQueue | getPriorityQueue() Return the priority queue that you are using for the game. |
static boolean | getScaling() This method tells the display class if the images in the game should be scaled. |
static int | getScrolling() Tells the display class is this game has a scrolling background. |
static void | setMainFrame(MainFrame mf) This method is called in the constructor of a main frame so that the GameSetup class will be able to communicate with the frame that the game is being played in. |
static void | stopGame() This function will automatically be called when the player begins to return something other than GAME_RUNNING. |
static boolean | useDrawOptimization() If this returns true, the drawing routine will use an optimization of drawing the images for all the blocks once to a large image and just putting up that image as long as the player hasn't changed screens. |
Method Detail |
public static void constructVariables()
public static Player getLocalPlayer()
public static JMenuBar getMenuBar()
public static PriorityQueue getPriorityQueue()
public static boolean getScaling()
public static int getScrolling()
public static void setMainFrame(MainFrame mf)
public static void stopGame()
public static boolean useDrawOptimization()
Association Links |
to Class PriorityQueue
to Class Screen
to Class MainFrame
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |