Skip to content
This repository was archived by the owner on Feb 11, 2026. It is now read-only.

Commit 15b836e

Browse files
committed
Use a different font and color for the bonus
1 parent eb5591b commit 15b836e

11 files changed

Lines changed: 44 additions & 11 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
info face="TheNextFont" size=64 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2
2+
common lineHeight=65 base=48 scaleW=128 scaleH=256 pages=1 packed=0
3+
page id=0 file="the-next-font.png"
4+
chars count=13
5+
char id=0 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=47 xadvance=12 page=0 chnl=0
6+
char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=47 xadvance=12 page=0 chnl=0
7+
char id=43 x=35 y=148 width=29 height=29 xoffset=2 yoffset=10 xadvance=33 page=0 chnl=0
8+
char id=48 x=35 y=0 width=49 height=49 xoffset=2 yoffset=0 xadvance=53 page=0 chnl=0
9+
char id=49 x=84 y=0 width=20 height=49 xoffset=2 yoffset=0 xadvance=23 page=0 chnl=0
10+
char id=50 x=0 y=50 width=34 height=49 xoffset=2 yoffset=0 xadvance=37 page=0 chnl=0
11+
char id=51 x=34 y=50 width=34 height=49 xoffset=2 yoffset=0 xadvance=38 page=0 chnl=0
12+
char id=52 x=68 y=50 width=34 height=49 xoffset=1 yoffset=0 xadvance=36 page=0 chnl=0
13+
char id=53 x=0 y=99 width=35 height=49 xoffset=2 yoffset=0 xadvance=39 page=0 chnl=0
14+
char id=54 x=35 y=99 width=35 height=49 xoffset=2 yoffset=0 xadvance=39 page=0 chnl=0
15+
char id=55 x=70 y=99 width=33 height=49 xoffset=2 yoffset=0 xadvance=37 page=0 chnl=0
16+
char id=56 x=0 y=0 width=35 height=50 xoffset=2 yoffset=-1 xadvance=39 page=0 chnl=0
17+
char id=57 x=0 y=148 width=35 height=49 xoffset=2 yoffset=0 xadvance=39 page=0 chnl=0
18+
kernings count=0
4.36 KB
Loading

android/assets/themes/dark.theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"current_score": "c83737ff",
1919
"high_score": "d400aaff",
20+
"bonus": "e3e3e3ff",
2021
"band": "2b5ccfff"
2122
},
2223
"cell_texture": "basic.png"

android/assets/themes/default.theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"current_score": "ffcc00ff",
1919
"high_score": "65d681ff",
20+
"bonus": "4d4d4dff",
2021
"band": "87ceebff"
2122
},
2223
"cell_texture": "basic.png"

core/src/io/github/lonamiwebs/klooni/Klooni.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public void create() {
5757

5858
skin.add("font", new BitmapFont(Gdx.files.internal("font/geosans-light.fnt")));
5959
skin.add("font_small", new BitmapFont(Gdx.files.internal("font/geosans-light32.fnt")));
60+
skin.add("font_bonus", new BitmapFont(Gdx.files.internal("font/the-next-font.fnt")));
6061

6162
// Use only one instance for the theme, so anyone using it uses the most up-to-date
6263
Theme.skin = skin; // Not the best idea

core/src/io/github/lonamiwebs/klooni/Theme.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class Theme {
2727

2828
public Color currentScore;
2929
public Color highScore;
30+
public Color bonus;
3031
public Color bandColor;
3132

3233
private Color[] cells;
@@ -109,6 +110,7 @@ private Theme update(final FileHandle handle) {
109110

110111
currentScore = new Color((int)Long.parseLong(colors.getString("current_score"), 16));
111112
highScore = new Color((int)Long.parseLong(colors.getString("high_score"), 16));
113+
bonus = new Color((int)Long.parseLong(colors.getString("bonus"), 16));
112114
bandColor = new Color((int)Long.parseLong(colors.getString("band"), 16));
113115

114116
emptyCell = new Color((int)Long.parseLong(colors.getString("empty_cell"), 16));

core/src/io/github/lonamiwebs/klooni/game/BonusParticle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void run(final Batch batch) {
2727
lifetime = 1f;
2828

2929
// Render
30-
label.setColor(Klooni.theme.highScore);
30+
label.setColor(Klooni.theme.bonus);
3131
label.setFontScale(Interpolation.elasticOut.apply(0f, 1f, lifetime));
3232
float opacity = Interpolation.linear.apply(1f, 0f, lifetime);
3333
label.draw(batch, opacity);

core/src/io/github/lonamiwebs/klooni/game/BonusParticleHandler.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77

88
import java.util.Iterator;
99

10+
import io.github.lonamiwebs.klooni.Klooni;
11+
1012
public class BonusParticleHandler {
1113

1214
private final Array<BonusParticle> particles;
1315
private final Label.LabelStyle labelStyle;
1416

15-
public BonusParticleHandler(final Label.LabelStyle style) {
16-
labelStyle = style;
17+
public BonusParticleHandler(final Klooni game) {
18+
labelStyle = new Label.LabelStyle();
19+
labelStyle.font = game.skin.getFont("font_bonus");
1720
particles = new Array<BonusParticle>();
1821
}
1922

core/src/io/github/lonamiwebs/klooni/screens/GameScreen.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import com.badlogic.gdx.files.FileHandle;
99
import com.badlogic.gdx.graphics.GL20;
1010
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
11-
import com.badlogic.gdx.scenes.scene2d.ui.Label;
1211

1312
import java.io.DataInputStream;
1413
import java.io.DataOutputStream;
@@ -88,10 +87,7 @@ class GameScreen implements Screen, InputProcessor, BinSerializable {
8887
board = new Board(layout, BOARD_SIZE);
8988
holder = new PieceHolder(layout, HOLDER_PIECE_COUNT, board.cellSize);
9089
pauseMenu = new PauseMenuStage(layout, game, scorer, gameMode);
91-
92-
Label.LabelStyle labelStyle = new Label.LabelStyle();
93-
labelStyle.font = game.skin.getFont("font");
94-
bonusParticleHandler = new BonusParticleHandler(labelStyle);
90+
bonusParticleHandler = new BonusParticleHandler(game);
9591

9692
gameOverSound = Gdx.audio.newSound(Gdx.files.internal("sound/game_over.mp3"));
9793

original-resources/generate_theme.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
],
2828
"current_score": "{current_score}",
2929
"high_score": "{high_score}",
30+
"bonus": "{bonus}",
3031
"band": "{band}"
3132
}},
3233
"cell_texture": "{cell_tex}"

0 commit comments

Comments
 (0)