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 voidfinal voidfinal voidvoidsetScores(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()- Specified by:
onGameInitin interfaceModule
-
onAfterGameTurn
public final void onAfterGameTurn()- Specified by:
onAfterGameTurnin interfaceModule
-
onAfterOnEnd
public final void onAfterOnEnd()- Specified by:
onAfterOnEndin interfaceModule
-