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 TypeMethodDescriptionvoid
addProcessor
(com.badlogic.gdx.InputProcessor ip) void
createEndGameMenu
(int score, int maxScore, boolean haveWin) Create an EndGameMenu as a HUD & add the input listener to this.void
Create a simple escape menu.void
dispose()
Dispose the screen.static com.badlogic.gdx.graphics.OrthographicCamera
float
com.badlogic.gdx.scenes.scene2d.Stage
getStage()
com.badlogic.gdx.graphics.Texture
getVisibleCircleTexture
(int radius) void
hide()
boolean
isPause()
boolean
isStop()
boolean
isTimeUp()
void
pause()
Temporary pause current game.void
Remove the escape menu.void
removeProcessor
(com.badlogic.gdx.InputProcessor ip) void
render
(float delta) Update & draw all thing that need to be draw during a game.void
resize
(int width, int height) Resize ViewPort when Screen is resize.void
resume()
Resume current Game.void
setGameTime
(int gameTime) void
setPlayerScore
(int score) void
show()
void
stop()
Definitivly stop current game.void
Definitivly 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:
render
in 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:
resize
in interfacecom.badlogic.gdx.Screen
- See Also:
-
Screen.resize(int, int)
-
pause
public void pause()Temporary pause current game.- Specified by:
pause
in interfacecom.badlogic.gdx.Screen
-
resume
public void resume()Resume current Game. Current game, may not be resumable if it have been stop.- Specified by:
resume
in 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:
dispose
in interfacecom.badlogic.gdx.Screen
-
hide
public void hide()- Specified by:
hide
in interfacecom.badlogic.gdx.Screen
-
show
public void show()- Specified by:
show
in interfacecom.badlogic.gdx.Screen
-