Mech descriptions / Balancing / Crash fix / Physics fix
This commit is contained in:
@@ -79,14 +79,16 @@ public class Generators {
|
||||
Image image = context.get(mech.region);
|
||||
|
||||
if(!mech.flying){
|
||||
image.draw(mech.baseRegion);
|
||||
image.draw(mech.legRegion);
|
||||
image.draw(mech.legRegion, true, false);
|
||||
image.draw(mech.region);
|
||||
image.drawCenter(mech.baseRegion);
|
||||
image.drawCenter(mech.legRegion);
|
||||
image.drawCenter(mech.legRegion, true, false);
|
||||
image.drawCenter(mech.region);
|
||||
}
|
||||
|
||||
image.draw(mech.weapon.equipRegion, -(int)mech.weaponOffsetX, (int)mech.weaponOffsetY, false, false);
|
||||
image.draw(mech.weapon.equipRegion, (int)mech.weaponOffsetX, (int)mech.weaponOffsetY, true, false);
|
||||
int off = (image.width() - mech.weapon.equipRegion.getRegionWidth())/2;
|
||||
|
||||
image.draw(mech.weapon.equipRegion, -(int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, false, false);
|
||||
image.draw(mech.weapon.equipRegion, (int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, true, false);
|
||||
|
||||
|
||||
image.save("mech-icon-" + mech.name);
|
||||
|
||||
@@ -67,6 +67,16 @@ public class Image {
|
||||
draw(region, 0, 0, false, false);
|
||||
}
|
||||
|
||||
/**Draws a region at the center.*/
|
||||
public void drawCenter(TextureRegion region){
|
||||
draw(region, (width() - region.getRegionWidth())/2, (height() - region.getRegionHeight())/2, false, false);
|
||||
}
|
||||
|
||||
/**Draws a region at the center.*/
|
||||
public void drawCenter(TextureRegion region, boolean flipx, boolean flipy){
|
||||
draw(region, (width() - region.getRegionWidth())/2, (height() - region.getRegionHeight())/2, flipx, flipy);
|
||||
}
|
||||
|
||||
/**Draws an image at the top left corner.*/
|
||||
public void draw(Image image){
|
||||
draw(image, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user