Unit weapon rework, titan and bomber enemies added, various fixes

This commit is contained in:
Anuken
2018-06-26 22:48:18 -04:00
parent 03277c69af
commit c89123b18a
48 changed files with 1154 additions and 879 deletions

View File

@@ -2,6 +2,7 @@ package io.anuke.mindustry;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import io.anuke.mindustry.entities.units.UnitType;
import io.anuke.mindustry.type.Item;
import io.anuke.mindustry.type.Mech;
import io.anuke.mindustry.type.Upgrade;
@@ -63,6 +64,28 @@ public class Generators {
}
});
context.generate("unit-icons", () -> {
for(UnitType type : UnitType.all()){
type.load();
type.weapon.load();
Image image = context.get(type.region);
if(!type.isFlying){
image.draw(type.baseRegion);
image.draw(type.legRegion);
image.draw(type.legRegion, true, false);
image.draw(type.region);
image.draw(type.weapon.equipRegion, -(int)type.weaponOffsetX, (int)type.weaponOffsetY, false, false);
image.draw(type.weapon.equipRegion, (int)type.weaponOffsetX, (int)type.weaponOffsetY, true, false);
}
image.save("unit-icon-" + type.name);
}
});
context.generate("ore-icons", () -> {
for(Block block : Block.all()){
if(!(block instanceof OreBlock)) continue;