add restart
This commit is contained in:
102
core/assets/font/custom.fnt
Normal file
102
core/assets/font/custom.fnt
Normal file
@@ -0,0 +1,102 @@
|
||||
info face="Arcade Rounded" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2
|
||||
common lineHeight=41 base=29 scaleW=512 scaleH=512 pages=1 packed=0
|
||||
page id=0 file="custom.png"
|
||||
chars count=97
|
||||
char id=0 x=0 y=0 width=25 height=30 xoffset=3 yoffset=0 xadvance=31 page=0 chnl=0
|
||||
char id=10 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=0 page=0 chnl=0
|
||||
char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=31 page=0 chnl=0
|
||||
char id=33 x=494 y=30 width=10 height=29 xoffset=8 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=34 x=0 y=88 width=22 height=17 xoffset=4 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=35 x=453 y=59 width=22 height=21 xoffset=4 yoffset=5 xadvance=31 page=0 chnl=0
|
||||
char id=36 x=305 y=59 width=22 height=29 xoffset=4 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=37 x=327 y=59 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=38 x=357 y=59 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=39 x=22 y=88 width=10 height=17 xoffset=4 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=40 x=119 y=59 width=18 height=29 xoffset=4 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=41 x=137 y=59 width=18 height=29 xoffset=7 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=42 x=475 y=59 width=22 height=21 xoffset=4 yoffset=5 xadvance=31 page=0 chnl=0
|
||||
char id=43 x=431 y=59 width=22 height=21 xoffset=4 yoffset=5 xadvance=31 page=0 chnl=0
|
||||
char id=44 x=497 y=59 width=10 height=18 xoffset=4 yoffset=12 xadvance=31 page=0 chnl=0
|
||||
char id=45 x=110 y=88 width=22 height=6 xoffset=4 yoffset=12 xadvance=31 page=0 chnl=0
|
||||
char id=46 x=54 y=88 width=10 height=10 xoffset=4 yoffset=20 xadvance=31 page=0 chnl=0
|
||||
char id=47 x=215 y=59 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=48 x=60 y=59 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=49 x=289 y=30 width=26 height=29 xoffset=3 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=50 x=315 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=51 x=345 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=52 x=375 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=53 x=405 y=30 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=54 x=434 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=55 x=464 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=56 x=0 y=59 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=57 x=30 y=59 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=58 x=387 y=59 width=10 height=25 xoffset=4 yoffset=5 xadvance=31 page=0 chnl=0
|
||||
char id=59 x=500 y=0 width=10 height=29 xoffset=4 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=60 x=397 y=59 width=17 height=21 xoffset=4 yoffset=5 xadvance=31 page=0 chnl=0
|
||||
char id=61 x=32 y=88 width=22 height=14 xoffset=4 yoffset=8 xadvance=31 page=0 chnl=0
|
||||
char id=62 x=414 y=59 width=17 height=21 xoffset=8 yoffset=5 xadvance=31 page=0 chnl=0
|
||||
char id=63 x=90 y=59 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=64 x=245 y=59 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=65 x=25 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=66 x=55 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=67 x=85 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=68 x=115 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=69 x=145 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=70 x=175 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=71 x=205 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=72 x=235 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=73 x=265 y=0 width=26 height=29 xoffset=3 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=74 x=291 y=0 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=75 x=320 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=76 x=350 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=77 x=380 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=78 x=410 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=79 x=440 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=80 x=470 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=81 x=0 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=82 x=30 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=83 x=60 y=30 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=84 x=89 y=30 width=26 height=29 xoffset=3 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=85 x=115 y=30 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=86 x=144 y=30 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=87 x=173 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=88 x=203 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=89 x=233 y=30 width=26 height=29 xoffset=3 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=90 x=259 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=91 x=155 y=59 width=14 height=29 xoffset=8 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=92 x=275 y=59 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=93 x=169 y=59 width=14 height=29 xoffset=8 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=94 x=74 y=88 width=14 height=9 xoffset=8 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=95 x=132 y=88 width=30 height=6 xoffset=0 yoffset=24 xadvance=31 page=0 chnl=0
|
||||
char id=96 x=64 y=88 width=10 height=9 xoffset=11 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=97 x=25 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=98 x=55 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=99 x=85 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=100 x=115 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=101 x=145 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=102 x=175 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=103 x=205 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=104 x=235 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=105 x=265 y=0 width=26 height=29 xoffset=3 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=106 x=291 y=0 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=107 x=320 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=108 x=350 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=109 x=380 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=110 x=410 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=111 x=440 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=112 x=470 y=0 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=113 x=0 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=114 x=30 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=115 x=60 y=30 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=116 x=89 y=30 width=26 height=29 xoffset=3 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=117 x=115 y=30 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=118 x=144 y=30 width=29 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=119 x=173 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=120 x=203 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=121 x=233 y=30 width=26 height=29 xoffset=3 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=122 x=259 y=30 width=30 height=29 xoffset=0 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=123 x=183 y=59 width=16 height=29 xoffset=6 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=124 x=504 y=30 width=6 height=29 xoffset=12 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=125 x=199 y=59 width=16 height=29 xoffset=8 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
char id=126 x=88 y=88 width=22 height=9 xoffset=4 yoffset=1 xadvance=31 page=0 chnl=0
|
||||
kernings count=0
|
||||
BIN
core/assets/font/custom.png
Normal file
BIN
core/assets/font/custom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -85,6 +85,10 @@ public class MainGame extends Game implements ClientCallback {
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
init();
|
||||
}
|
||||
|
||||
public void init() {
|
||||
batch = new SpriteBatch();
|
||||
screenWidth = Gdx.graphics.getWidth();
|
||||
screenHeight = Gdx.graphics.getHeight();
|
||||
@@ -121,6 +125,7 @@ public class MainGame extends Game implements ClientCallback {
|
||||
setGamestate(GAMESTATE.SELECTING_FACTION);
|
||||
connectToServer();
|
||||
playSong();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -155,8 +160,6 @@ public class MainGame extends Game implements ClientCallback {
|
||||
}
|
||||
|
||||
this.setSelectedCharacter(this.team.get(0));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -222,7 +225,7 @@ public class MainGame extends Game implements ClientCallback {
|
||||
} else if (this.team.isDead()) {
|
||||
text += "Too bad! You lost!";
|
||||
}
|
||||
text += "\nPress ESC to exit the game";
|
||||
text += "\nPress ESC to exit the game, or ENTER to start a new game";
|
||||
renderString(text, Gdx.graphics.getWidth() / 2f, Gdx.graphics.getHeight() / 2f);
|
||||
}
|
||||
|
||||
@@ -423,7 +426,7 @@ public class MainGame extends Game implements ClientCallback {
|
||||
}
|
||||
} else if (data instanceof DamageData) {
|
||||
DamageData damageData = (DamageData) data;
|
||||
team.get(damageData.getName()).damage(100);
|
||||
team.get(damageData.getName()).damage(10);
|
||||
} else if (data instanceof TurnData) {
|
||||
this.playersTurn = !this.playersTurn;
|
||||
}
|
||||
|
||||
@@ -131,6 +131,9 @@ public class GameInputProcessor implements InputProcessor {
|
||||
} else if (mainGame.getGamestate() == GAMESTATE.ENDED) {
|
||||
if (keycode == Input.Keys.ESCAPE) {
|
||||
mainGame.exit();
|
||||
} else if (keycode == Input.Keys.ENTER) {
|
||||
mainGame.dispose();
|
||||
mainGame.init();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -56,7 +56,7 @@ public abstract class GameCharacter extends Actor implements Comparable<GameChar
|
||||
|
||||
public void heal(int amount) {
|
||||
this.health += amount;
|
||||
if (this.health > 100) this.health = 100;
|
||||
if (this.health > 100) this.health = 10;
|
||||
}
|
||||
|
||||
public void damage(int amount) {
|
||||
|
||||
Reference in New Issue
Block a user