24 lines
509 B
Haxe
24 lines
509 B
Haxe
package ru.m.tankz.view.common;
|
|
|
|
import haxework.view.ImageView;
|
|
import ru.m.tankz.game.GameEvent;
|
|
import ru.m.tankz.render.RenderUtil;
|
|
|
|
class TankView extends ImageView {
|
|
|
|
public var tank(null, set):TankInfo;
|
|
|
|
public function new() {
|
|
super();
|
|
style = "icon.tank";
|
|
}
|
|
|
|
private function set_tank(value:TankInfo):TankInfo {
|
|
if (value != null) {
|
|
color = value.color;
|
|
image = RenderUtil.tankImage(value.skin);
|
|
}
|
|
return value;
|
|
}
|
|
}
|