Package com.deco2800.game.screens
Class MainGameScreen
java.lang.Object
com.badlogic.gdx.ScreenAdapter
com.deco2800.game.screens.MainGameScreen
- All Implemented Interfaces:
 Screen
public class MainGameScreen extends ScreenAdapter
The game screen containing the main game.
 
Details on libGDX screens: https://happycoding.io/tutorials/libgdx/game-screens
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMainGameScreen.NewMapall status of new map - 
Field Summary
Fields Modifier and Type Field Description static MainGameScreen.NewMapnewMapStatusstatic Entityplayers - 
Constructor Summary
Constructors Constructor Description MainGameScreen(GdxGame game) - 
Method Summary
Modifier and Type Method Description voiddispose()static MainGameScreen.NewMapgetNewMapStatus()getter method of newMapStatusstatic floatgetSlowPlayerTime()getter method of slowPlayerTimestatic booleanisSlowPlayer()getter method of slowPlayervoidpause()voidrender(float delta)voidresize(int width, int height)voidresume()static voidsetNewMapStatus(MainGameScreen.NewMap status)setter method of newMapStatusstatic voidsetSlowPlayer(boolean slowPlayer)setter method of slowPlayerstatic voidsetSlowPlayer(float slowPlayerTime)Set the player deceleration time, the value set in the function is used by slowPlayer(), and the function is implemented in render().static voidsetSlowPlayerTime(float slowPlayerTime)setter method of slowPlayerTime 
- 
Field Details
 - 
Constructor Details
 - 
Method Details
- 
isSlowPlayer
public static boolean isSlowPlayer()getter method of slowPlayer- Returns:
 - if the player is slow status
 
 - 
setSlowPlayer
public static void setSlowPlayer(boolean slowPlayer)setter method of slowPlayer- Parameters:
 slowPlayer- if the player is on a slow status
 - 
setSlowPlayer
public static void setSlowPlayer(float slowPlayerTime)Set the player deceleration time, the value set in the function is used by slowPlayer(), and the function is implemented in render(). This function called by thornsDisappear() in ObstacleDisappear.java- Parameters:
 slowPlayerTime- How many seconds the player slows down.
 - 
getSlowPlayerTime
public static float getSlowPlayerTime()getter method of slowPlayerTime- Returns:
 - time remain of player slow time
 
 - 
setSlowPlayerTime
public static void setSlowPlayerTime(float slowPlayerTime)setter method of slowPlayerTime- Parameters:
 slowPlayerTime- how may time the player will on slow status
 - 
getNewMapStatus
getter method of newMapStatus- Returns:
 - the status of mew map
 
 - 
setNewMapStatus
setter method of newMapStatus- Parameters:
 status- the status of mew map
 - 
render
public void render(float delta)- Specified by:
 renderin interfaceScreen- Overrides:
 renderin classScreenAdapter
 - 
resize
public void resize(int width, int height)- Specified by:
 resizein interfaceScreen- Overrides:
 resizein classScreenAdapter
 - 
pause
public void pause()- Specified by:
 pausein interfaceScreen- Overrides:
 pausein classScreenAdapter
 - 
resume
public void resume()- Specified by:
 resumein interfaceScreen- Overrides:
 resumein classScreenAdapter
 - 
dispose
public void dispose()- Specified by:
 disposein interfaceScreen- Overrides:
 disposein classScreenAdapter
 
 -