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 void
Called by the game manager after calling theReferee
's gameTurn method.final void
Called by the game manager after calling theReferee
's onEnd method.final void
Called by the game manager after calling theReferee
's init method.void
setScores
(int[] scores) Send scores to the modulevoid
Send scores to the modulevoid
setTitleRankingsSprite
(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:Module
Called by the game manager after calling theReferee
's init method. The module must be registered to the game manager.- Specified by:
onGameInit
in interfaceModule
-
onAfterGameTurn
public final void onAfterGameTurn()Description copied from interface:Module
Called by the game manager after calling theReferee
's gameTurn method. The module must be registered to the game manager.- Specified by:
onAfterGameTurn
in interfaceModule
-
onAfterOnEnd
public final void onAfterOnEnd()Description copied from interface:Module
Called by the game manager after calling theReferee
's onEnd method. The module must be registered to the game manager.- Specified by:
onAfterOnEnd
in interfaceModule
-