Redundant field cleanup
This commit is contained in:
@@ -284,7 +284,7 @@ public class MapObjectivesCanvas extends WidgetGroup{
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(var other : children){
|
for(var other : children){
|
||||||
if(other instanceof ObjectiveTile tile && tile != ignore && Tmp.r2.set(tile.tx, tile.ty, objWidth, objHeight).overlaps(Tmp.r1)){
|
if(other instanceof ObjectiveTile tile && tile != ignore && Tmp.r2.set(tile.obj.editorX, tile.obj.editorY, objWidth, objHeight).overlaps(Tmp.r1)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -340,7 +340,6 @@ public class MapObjectivesCanvas extends WidgetGroup{
|
|||||||
|
|
||||||
public class ObjectiveTile extends Table{
|
public class ObjectiveTile extends Table{
|
||||||
public final MapObjective obj;
|
public final MapObjective obj;
|
||||||
public int tx, ty;
|
|
||||||
|
|
||||||
public final Mover mover;
|
public final Mover mover;
|
||||||
public final Connector conParent, conChildren;
|
public final Connector conParent, conChildren;
|
||||||
@@ -392,8 +391,8 @@ public class MapObjectivesCanvas extends WidgetGroup{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void pos(int x, int y){
|
public void pos(int x, int y){
|
||||||
tx = obj.editorX = x;
|
obj.editorX = x;
|
||||||
ty = obj.editorY = y;
|
obj.editorY = y;
|
||||||
this.x = x * unitSize;
|
this.x = x * unitSize;
|
||||||
this.y = y * unitSize;
|
this.y = y * unitSize;
|
||||||
}
|
}
|
||||||
@@ -439,8 +438,8 @@ public class MapObjectivesCanvas extends WidgetGroup{
|
|||||||
moving = ObjectiveTile.this;
|
moving = ObjectiveTile.this;
|
||||||
moving.toFront();
|
moving.toFront();
|
||||||
|
|
||||||
prevX = moving.tx;
|
prevX = moving.obj.editorX;
|
||||||
prevY = moving.ty;
|
prevY = moving.obj.editorY;
|
||||||
|
|
||||||
// Convert to world pos first because the button gets dragged too.
|
// Convert to world pos first because the button gets dragged too.
|
||||||
Vec2 pos = event.listenerActor.localToStageCoordinates(Tmp.v1.set(x, y));
|
Vec2 pos = event.listenerActor.localToStageCoordinates(Tmp.v1.set(x, y));
|
||||||
|
|||||||
Reference in New Issue
Block a user