Class EndScreenModule
java.lang.Object
com.codingame.gameengine.module.endscreen.EndScreenModule
- All Implemented Interfaces:
Module
The EndScreen takes care of displaying and animating an end screen with the scores of the players at the end of the game.
-
Method Summary
Modifier and TypeMethodDescriptionfinal voidCalled by the game manager after calling theReferee's gameTurn method.final voidCalled by the game manager after calling theReferee's onEnd method.final voidCalled by the game manager after calling theReferee's init method.voidsetScores(int[] scores) Send scores to the modulevoidSend scores to the modulevoidsetTitleRankingsSprite(String spriteName) Allows you to set the sprite used as the title of the ranking board
-
Method Details
-
setScores
public void setScores(int[] scores) Send scores to the module- Parameters:
scores- the scores of the different players, the index matches the player.getIndex()
-
setScores
Send scores to the module- Parameters:
scores- the scores of the different players, the index matches the player.getIndex()displayedText- the text displayed instead of the score of a player, if null or empty string for a player the score will still be displayed
-
setTitleRankingsSprite
Allows you to set the sprite used as the title of the ranking board- Parameters:
spriteName- the name of the sprite you want to use default is "logo.png"
-
getTitleRankingsSprite
- Returns:
- the name of the sprite that will be used as the title of the ranking board
-
onGameInit
public final void onGameInit()Description copied from interface:ModuleCalled by the game manager after calling theReferee's init method. The module must be registered to the game manager.- Specified by:
onGameInitin interfaceModule
-
onAfterGameTurn
public final void onAfterGameTurn()Description copied from interface:ModuleCalled by the game manager after calling theReferee's gameTurn method. The module must be registered to the game manager.- Specified by:
onAfterGameTurnin interfaceModule
-
onAfterOnEnd
public final void onAfterOnEnd()Description copied from interface:ModuleCalled by the game manager after calling theReferee's onEnd method. The module must be registered to the game manager.- Specified by:
onAfterOnEndin interfaceModule
-