[editor] update
This commit is contained in:
@@ -78,6 +78,7 @@ class BitmapItem<T:TRectangle> extends RenderItem<T, Bitmap> {
|
||||
class BrickItem extends RenderItem<Brick, Shape> {
|
||||
|
||||
private var broken:Int;
|
||||
private var type:Int;
|
||||
|
||||
public function new(value:Brick) {
|
||||
super(value);
|
||||
@@ -104,8 +105,10 @@ class BrickItem extends RenderItem<Brick, Shape> {
|
||||
override public function update():Void {
|
||||
super.update();
|
||||
var b = value.broken;
|
||||
if (b != this.broken) {
|
||||
this.broken = b;
|
||||
var t = value.config.type;
|
||||
if (b != broken || t != type) {
|
||||
broken = b;
|
||||
type = t;
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ interface LevelFrameLayout {
|
||||
|
||||
|
||||
@:template("layout/frames/level.json", "layout/styles.json")
|
||||
class LevelFrame extends VGroupView implements ViewBuilder implements LevelFrameLayout implements ListViewListener<Int> {
|
||||
class LevelFrame extends VGroupView implements ViewBuilder implements LevelFrameLayout {
|
||||
public static inline var ID = "level";
|
||||
|
||||
public function init():Void {
|
||||
|
||||
Reference in New Issue
Block a user