[common] update Game with GameEvent
This commit is contained in:
@@ -4,7 +4,6 @@ import haxework.view.HGroupView;
|
||||
import haxework.view.ImageView;
|
||||
import haxework.view.LabelView;
|
||||
import openfl.Assets;
|
||||
import ru.m.tankz.game.GameState.PlayerState;
|
||||
import ru.m.tankz.game.GameState;
|
||||
|
||||
@:template class LifeView extends HGroupView {
|
||||
@@ -51,7 +50,7 @@ import ru.m.tankz.game.GameState;
|
||||
|
||||
override public function update():Void {
|
||||
super.update();
|
||||
if (state != null) {
|
||||
if (state != null && currentState != null) {
|
||||
var tankConfig = currentState.config.getTank(state.tank);
|
||||
tank = tankConfig == null ? 'ba' : tankConfig.skin;
|
||||
color = currentState.config.getColor(state.id);
|
||||
|
||||
Reference in New Issue
Block a user