Closed stefaniamak closed 4 years ago
The change of colors to the gameOverResult UILabel. When text is "Victory" its color is Blue, when "Defeat" its color is "Red"
gameOverResult
I decided to set the variable to a different Family, and edit both families at the skin file.
Family
skin
My initial tried were to set the color via code, using as reference the below two methods that his happens:
mappings.put("player.name", clientInfo.getComponent(DisplayNameComponent.class).name); mappings.put("player.color", "0x" + clientInfo.getComponent(ColorComponent.class).color.toHex());
migLayout.addWidget(new UILabel(PlayerUtil.getColoredPlayerName(clientComponent.clientInfo)), new MigLayout.CCHint());
give
redflag
blackflag
Note: You can go to LAUtils.java and change GOAL_SCORE variable from 5 to 1, so you need to score 1 point to end the game.
LAUtils.java
GOAL_SCORE
5
1
Purpose
The change of colors to the
gameOverResult
UILabel. When text is "Victory" its color is Blue, when "Defeat" its color is "Red"Changes made
I decided to set the variable to a different
Family
, and edit both families at theskin
file.My initial tried were to set the color via code, using as reference the below two methods that his happens:
How to test
give
andredflag
orblackflag
Note: You can go to
LAUtils.java
and changeGOAL_SCORE
variable from5
to1
, so you need to score 1 point to end the game.Screenshot