[editor] tank color view
This commit is contained in:
@@ -79,12 +79,25 @@ class BitmapItem<T:TRectangle> extends RenderItem<T, Bitmap> {
|
||||
|
||||
|
||||
class BrickItem extends BitmapItem<Brick> {
|
||||
private var type:BrickType;
|
||||
|
||||
public function new(value:Brick) {
|
||||
super(value);
|
||||
redraw();
|
||||
}
|
||||
|
||||
override public function update():Void {
|
||||
super.update();
|
||||
var t = value.config.type;
|
||||
if (t != type) {
|
||||
type = t;
|
||||
view.visible = t != 'none';
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
override private function getImage():String {
|
||||
return 'resources/image/map/${value.config.type}.png';
|
||||
}
|
||||
@@ -108,7 +121,6 @@ class BrickAnimateItem extends AnimateItem<Brick> {
|
||||
|
||||
|
||||
class BrickBreakingItem extends RenderItem<Brick, Shape> {
|
||||
|
||||
private var broken:Int;
|
||||
private var type:BrickType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user