Package fr.formiko.kokcinelo.view
Class GameScreen
java.lang.Object
fr.formiko.kokcinelo.tools.KScreen
fr.formiko.kokcinelo.view.GameScreen
- All Implemented Interfaces:
com.badlogic.gdx.Screen
The action game screen.
- Since:
- 0.1
- Version:
- 1.3
- See Also:
-
Screen
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionGameScreen(App game) {*@summary The action game screen constructor that load images ' set Creatures locations.} -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProcessor(com.badlogic.gdx.InputProcessor ip) voidcreateEndGameMenu(int score, int maxScore, boolean haveWin) Create an EndGameMenu as a HUD & add the input listener to this.voidCreate a simple escape menu.voiddispose()Dispose the screen.static com.badlogic.gdx.graphics.OrthographicCamerafloatcom.badlogic.gdx.scenes.scene2d.StagegetStage()com.badlogic.gdx.graphics.TexturegetVisibleCircleTexture(int radius) voidhide()booleanisPause()booleanisStop()booleanisTimeUp()voidpause()Temporary pause current game.voidRemove the escape menu.voidremoveProcessor(com.badlogic.gdx.InputProcessor ip) voidrender(float delta) Update & draw all thing that need to be draw during a game.voidresize(int width, int height) Resize ViewPort when Screen is resize.voidresume()Resume current Game.voidsetGameTime(int gameTime) voidsetPlayerScore(int score) voidshow()voidstop()Definitivly stop current game.voidDefinitivly stop current game after next draw.Methods inherited from class fr.formiko.kokcinelo.tools.KScreen
displayPerf, getCloseButton, getDefautSkin, getDefautSkin, getFPSRacio, getRacio, getRacioHeight, getRacioWidth, needResize
-
Constructor Details
-
GameScreen
{*@summary The action game screen constructor that load images ' set Creatures locations.}- Parameters:
game- the App where the Screen is display
-
-
Method Details
-
getController
-
isPause
public boolean isPause() -
isStop
public boolean isStop() -
getCamera
public static com.badlogic.gdx.graphics.OrthographicCamera getCamera() -
getStage
public com.badlogic.gdx.scenes.scene2d.Stage getStage() -
addProcessor
public void addProcessor(com.badlogic.gdx.InputProcessor ip) -
removeProcessor
public void removeProcessor(com.badlogic.gdx.InputProcessor ip) -
getGameTime
public float getGameTime() -
render
public void render(float delta) Update & draw all thing that need to be draw during a game.- Specified by:
renderin interfacecom.badlogic.gdx.Screen- See Also:
-
Screen.render(float)
-
getVisibleCircleTexture
public com.badlogic.gdx.graphics.Texture getVisibleCircleTexture(int radius) -
resize
public void resize(int width, int height) Resize ViewPort when Screen is resize.- Specified by:
resizein interfacecom.badlogic.gdx.Screen- See Also:
-
Screen.resize(int, int)
-
pause
public void pause()Temporary pause current game.- Specified by:
pausein interfacecom.badlogic.gdx.Screen
-
resume
public void resume()Resume current Game. Current game, may not be resumable if it have been stop.- Specified by:
resumein interfacecom.badlogic.gdx.Screen
-
stop
public void stop()Definitivly stop current game. -
stopAfterNextDraw
public void stopAfterNextDraw()Definitivly stop current game after next draw. It can be use to update game screen a last time before stop. -
createEndGameMenu
public void createEndGameMenu(int score, int maxScore, boolean haveWin) Create an EndGameMenu as a HUD & add the input listener to this. -
createEscapeMenu
public void createEscapeMenu()Create a simple escape menu. -
removeEscapeMenu
public void removeEscapeMenu()Remove the escape menu. -
setPlayerScore
public void setPlayerScore(int score) -
isTimeUp
public boolean isTimeUp() -
setGameTime
public void setGameTime(int gameTime) -
dispose
public void dispose()Dispose the screen. It stop music and free memory.- Specified by:
disposein interfacecom.badlogic.gdx.Screen
-
hide
public void hide()- Specified by:
hidein interfacecom.badlogic.gdx.Screen
-
show
public void show()- Specified by:
showin interfacecom.badlogic.gdx.Screen
-