[common] added PlayerState
This commit is contained in:
@@ -69,7 +69,7 @@ class GameFrame extends VGroupView implements ViewBuilder implements IPacketHand
|
||||
}
|
||||
|
||||
private function stateString(game:Game):String {
|
||||
if (game.state == null) {
|
||||
if (game == null) {
|
||||
return '';
|
||||
}
|
||||
var result:Array<String> = [];
|
||||
@@ -77,12 +77,12 @@ class GameFrame extends VGroupView implements ViewBuilder implements IPacketHand
|
||||
for (team in game.teams) {
|
||||
if (game.state.loser == team.id) {
|
||||
result.push('${team.id}: LOSE');
|
||||
} else if (team.life > -1) {
|
||||
} else if (team.life > 0) {
|
||||
result.push('${team.id}: ${team.life}');
|
||||
} else {
|
||||
for (player in team.players) {
|
||||
if (player.life > -1) {
|
||||
result.push('${player.id.team}${player.id.index}: ${player.life}');
|
||||
if (player.state.life > 0) {
|
||||
result.push('${player.id.team}${player.id.index}: ${player.state.life}');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ class Render extends SpriteView implements EngineListener {
|
||||
clearLayer(entryLayer);
|
||||
clearLayer(groundLayer);
|
||||
clearLayer(upLayer);
|
||||
clearLayer(upperLayer);
|
||||
}
|
||||
|
||||
public function onSpawn(entity:EntityType):Void {
|
||||
|
||||
Reference in New Issue
Block a user