Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -13,6 +13,7 @@ public class DrawRegion extends DrawBlock{
|
||||
public String suffix = "";
|
||||
public boolean spinSprite = false;
|
||||
public boolean drawPlan = true;
|
||||
public boolean buildingRotate = false;
|
||||
public float rotateSpeed, x, y, rotation;
|
||||
/** Any number <=0 disables layer changes. */
|
||||
public float layer = -1;
|
||||
@@ -40,9 +41,9 @@ public class DrawRegion extends DrawBlock{
|
||||
float z = Draw.z();
|
||||
if(layer > 0) Draw.z(layer);
|
||||
if(spinSprite){
|
||||
Drawf.spinSprite(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation);
|
||||
Drawf.spinSprite(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation + (buildingRotate ? build.rotdeg() : 0));
|
||||
}else{
|
||||
Draw.rect(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation);
|
||||
Draw.rect(region, build.x + x, build.y + y, build.totalProgress() * rotateSpeed + rotation + (buildingRotate ? build.rotdeg() : 0));
|
||||
}
|
||||
Draw.z(z);
|
||||
}
|
||||
@@ -50,7 +51,7 @@ public class DrawRegion extends DrawBlock{
|
||||
@Override
|
||||
public void drawPlan(Block block, BuildPlan plan, Eachable<BuildPlan> list){
|
||||
if(!drawPlan) return;
|
||||
Draw.rect(region, plan.drawx(), plan.drawy());
|
||||
Draw.rect(region, plan.drawx(), plan.drawy(), (buildingRotate ? plan.rotation * 90f : 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user