Finalized unit type definitions
|
Before Width: | Height: | Size: 250 B |
|
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 250 B |
|
After Width: | Height: | Size: 211 B |
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 621 B |
|
After Width: | Height: | Size: 220 B |
|
After Width: | Height: | Size: 234 B |
|
After Width: | Height: | Size: 840 B |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
@@ -147,16 +147,19 @@ public class Bullets implements ContentList{
|
|||||||
hitEffect = Fx.plasticExplosion;
|
hitEffect = Fx.plasticExplosion;
|
||||||
frontColor = Palette.plastaniumFront;
|
frontColor = Palette.plastaniumFront;
|
||||||
backColor = Palette.plastaniumBack;
|
backColor = Palette.plastaniumBack;
|
||||||
|
shootEffect = Fx.shootBig;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
flakExplosive = new FlakBulletType(4f, 5){{
|
flakExplosive = new FlakBulletType(4f, 5){{
|
||||||
//default bullet type, no changes
|
//default bullet type, no changes
|
||||||
|
shootEffect = Fx.shootBig;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
flakSurge = new FlakBulletType(4f, 7){{
|
flakSurge = new FlakBulletType(4f, 7){{
|
||||||
splashDamage = 33f;
|
splashDamage = 33f;
|
||||||
lightining = 2;
|
lightining = 2;
|
||||||
lightningLength = 12;
|
lightningLength = 12;
|
||||||
|
shootEffect = Fx.shootBig;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
missileExplosive = new MissileBulletType(1.8f, 10, "missile"){{
|
missileExplosive = new MissileBulletType(1.8f, 10, "missile"){{
|
||||||
|
|||||||
@@ -120,7 +120,53 @@ public class UnitTypes implements ContentList{
|
|||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
bullet = Bullets.eruptorShot;
|
bullet = Bullets.eruptorShot;
|
||||||
recoil = 1f;
|
recoil = 1f;
|
||||||
width = 9f;
|
width = 5f;
|
||||||
|
}};
|
||||||
|
}};
|
||||||
|
|
||||||
|
chaosArray = new UnitType("chaos-array", Dagger.class, Dagger::new){{
|
||||||
|
maxVelocity = 0.68f;
|
||||||
|
speed = 0.12f;
|
||||||
|
drag = 0.4f;
|
||||||
|
mass = 5f;
|
||||||
|
hitsize = 20f;
|
||||||
|
rotatespeed = 0.06f;
|
||||||
|
health = 800;
|
||||||
|
weapon = new Weapon("chaos"){{
|
||||||
|
length = 8f;
|
||||||
|
reload = 50f;
|
||||||
|
width = 17.5f;
|
||||||
|
roundrobin = true;
|
||||||
|
recoil = 5f;
|
||||||
|
shake = 2f;
|
||||||
|
shots = 4;
|
||||||
|
spacing = 4f;
|
||||||
|
shotDelay = 5;
|
||||||
|
ejectEffect = Fx.shellEjectMedium;
|
||||||
|
bullet = Bullets.flakSurge;
|
||||||
|
}};
|
||||||
|
}};
|
||||||
|
|
||||||
|
eradicator = new UnitType("eradicator", Dagger.class, Dagger::new){{
|
||||||
|
maxVelocity = 0.68f;
|
||||||
|
speed = 0.12f;
|
||||||
|
drag = 0.4f;
|
||||||
|
mass = 5f;
|
||||||
|
hitsize = 20f;
|
||||||
|
rotatespeed = 0.06f;
|
||||||
|
health = 800;
|
||||||
|
weapon = new Weapon("eradication"){{
|
||||||
|
length = 9f;
|
||||||
|
reload = 30f;
|
||||||
|
width = 20f;
|
||||||
|
roundrobin = true;
|
||||||
|
recoil = 4f;
|
||||||
|
shake = 2f;
|
||||||
|
shots = 4;
|
||||||
|
spacing = 4f;
|
||||||
|
shotDelay = 1;
|
||||||
|
ejectEffect = Fx.shellEjectMedium;
|
||||||
|
bullet = Bullets.standardThoriumBig;
|
||||||
}};
|
}};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public abstract class GroundUnit extends BaseUnit{
|
|||||||
public void draw(){
|
public void draw(){
|
||||||
Draw.alpha(Draw.getShader() != Shaders.mix ? 1f : hitTime / hitDuration);
|
Draw.alpha(Draw.getShader() != Shaders.mix ? 1f : hitTime / hitDuration);
|
||||||
|
|
||||||
float ft = Mathf.sin(walkTime * type.speed*5f, 6f, 2f);
|
float ft = Mathf.sin(walkTime * type.speed*5f, 6f, 2f + type.hitsize/15f);
|
||||||
|
|
||||||
Floor floor = getFloorOn();
|
Floor floor = getFloorOn();
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ public abstract class GroundUnit extends BaseUnit{
|
|||||||
Draw.rect(type.legRegion,
|
Draw.rect(type.legRegion,
|
||||||
x + Angles.trnsx(baseRotation, ft * i),
|
x + Angles.trnsx(baseRotation, ft * i),
|
||||||
y + Angles.trnsy(baseRotation, ft * i),
|
y + Angles.trnsy(baseRotation, ft * i),
|
||||||
12f * i, 12f - Mathf.clamp(ft * i, 0, 2), baseRotation - 90);
|
type.legRegion.getWidth() * i * Draw.scl, type.legRegion.getHeight() * Draw.scl - Mathf.clamp(ft * i, 0, 2), baseRotation - 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(floor.isLiquid){
|
if(floor.isLiquid){
|
||||||
@@ -145,10 +145,10 @@ public abstract class GroundUnit extends BaseUnit{
|
|||||||
|
|
||||||
for(int i : Mathf.signs){
|
for(int i : Mathf.signs){
|
||||||
float tra = rotation - 90, trY = -type.weapon.getRecoil(this, i > 0) + type.weaponOffsetY;
|
float tra = rotation - 90, trY = -type.weapon.getRecoil(this, i > 0) + type.weaponOffsetY;
|
||||||
float w = i > 0 ? -12 : 12;
|
float w = - i * type.weapon.region.getWidth() * Draw.scl;
|
||||||
Draw.rect(type.weapon.equipRegion,
|
Draw.rect(type.weapon.region,
|
||||||
x + Angles.trnsx(tra, getWeapon().width * i, trY),
|
x + Angles.trnsx(tra, getWeapon().width * i, trY),
|
||||||
y + Angles.trnsy(tra, getWeapon().width * i, trY), w, 12, rotation - 90);
|
y + Angles.trnsy(tra, getWeapon().width * i, trY), w, type.weapon.region.getHeight() * Draw.scl, rotation - 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
drawItems();
|
drawItems();
|
||||||
|
|||||||
@@ -328,12 +328,12 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
|||||||
|
|
||||||
for(int i : Mathf.signs){
|
for(int i : Mathf.signs){
|
||||||
float tra = rotation - 90, trY = -mech.weapon.getRecoil(this, i > 0) + mech.weaponOffsetY;
|
float tra = rotation - 90, trY = -mech.weapon.getRecoil(this, i > 0) + mech.weaponOffsetY;
|
||||||
float w = i > 0 ? -mech.weapon.equipRegion.getWidth() : mech.weapon.equipRegion.getWidth();
|
float w = i > 0 ? -mech.weapon.region.getWidth() : mech.weapon.region.getWidth();
|
||||||
Draw.rect(mech.weapon.equipRegion,
|
Draw.rect(mech.weapon.region,
|
||||||
x + Angles.trnsx(tra, (mech.weaponOffsetX + mech.spreadX(this)) * i, trY),
|
x + Angles.trnsx(tra, (mech.weaponOffsetX + mech.spreadX(this)) * i, trY),
|
||||||
y + Angles.trnsy(tra, (mech.weaponOffsetX + mech.spreadX(this)) * i, trY),
|
y + Angles.trnsy(tra, (mech.weaponOffsetX + mech.spreadX(this)) * i, trY),
|
||||||
w * Draw.scl,
|
w * Draw.scl,
|
||||||
mech.weapon.equipRegion.getHeight() * Draw.scl,
|
mech.weapon.region.getHeight() * Draw.scl,
|
||||||
rotation - 90);
|
rotation - 90);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class Revenant extends FlyingUnit{
|
|||||||
float w = i > 0 ? -12 : 12;
|
float w = i > 0 ? -12 : 12;
|
||||||
float wx = x + Angles.trnsx(tra, getWeapon().width * i, trY), wy = y + Angles.trnsy(tra, getWeapon().width * i, trY);
|
float wx = x + Angles.trnsx(tra, getWeapon().width * i, trY), wy = y + Angles.trnsy(tra, getWeapon().width * i, trY);
|
||||||
int wi = (i + 1)/2;
|
int wi = (i + 1)/2;
|
||||||
Draw.rect(getWeapon().equipRegion, wx, wy, w, 12, weaponAngles[wi] - 90);
|
Draw.rect(getWeapon().region, wx, wy, w, 12, weaponAngles[wi] - 90);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class Weapon{
|
|||||||
/**whether shooter rotation is ignored when shooting.*/
|
/**whether shooter rotation is ignored when shooting.*/
|
||||||
public boolean ignoreRotation = false;
|
public boolean ignoreRotation = false;
|
||||||
|
|
||||||
public TextureRegion equipRegion;
|
public TextureRegion region;
|
||||||
|
|
||||||
protected Weapon(String name){
|
protected Weapon(String name){
|
||||||
this.name = name;
|
this.name = name;
|
||||||
@@ -119,7 +119,7 @@ public class Weapon{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void load(){
|
public void load(){
|
||||||
equipRegion = Core.atlas.find(name + "-equip", Core.atlas.find("clear"));
|
region = Core.atlas.find(name + "-equip", Core.atlas.find("clear"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(ShooterTrait shooter, float pointerX, float pointerY){
|
public void update(ShooterTrait shooter, float pointerX, float pointerY){
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ public class Block extends BlockStorage{
|
|||||||
|
|
||||||
public TextureRegion icon(Icon icon){
|
public TextureRegion icon(Icon icon){
|
||||||
if(icons[icon.ordinal()] == null){
|
if(icons[icon.ordinal()] == null){
|
||||||
icons[icon.ordinal()] = Core.atlas.find(name + "-icon-" + icon.name(), icon == Icon.full ? getGeneratedIcons()[0] : Core.atlas.find(name + "-icon-full"));
|
icons[icon.ordinal()] = Core.atlas.find(name + "-icon-" + icon.name(), icon == Icon.full ? getGeneratedIcons()[0] : Core.atlas.find(name + "-icon-full", getGeneratedIcons()[0]));
|
||||||
}
|
}
|
||||||
return icons[icon.ordinal()];
|
return icons[icon.ordinal()];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,10 +84,10 @@ public class Generators {
|
|||||||
image.drawCenter(mech.region);
|
image.drawCenter(mech.region);
|
||||||
}
|
}
|
||||||
|
|
||||||
int off = (image.width() - mech.weapon.equipRegion.getWidth())/2;
|
int off = (image.width() - mech.weapon.region.getWidth())/2;
|
||||||
|
|
||||||
image.draw(mech.weapon.equipRegion, -(int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, false, false);
|
image.draw(mech.weapon.region, -(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.draw(mech.weapon.region, (int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, true, false);
|
||||||
|
|
||||||
|
|
||||||
image.save("mech-icon-" + mech.name);
|
image.save("mech-icon-" + mech.name);
|
||||||
@@ -109,13 +109,13 @@ public class Generators {
|
|||||||
image.draw(type.legRegion, true, false);
|
image.draw(type.legRegion, true, false);
|
||||||
image.draw(type.region);
|
image.draw(type.region);
|
||||||
|
|
||||||
image.draw(type.weapon.equipRegion,
|
image.draw(type.weapon.region,
|
||||||
-(int)type.weapon.width + (image.width() - type.weapon.equipRegion.getWidth())/2,
|
-(int)type.weapon.width + (image.width() - type.weapon.region.getWidth())/2,
|
||||||
(int)type.weaponOffsetY - (image.height() - type.weapon.equipRegion.getHeight())/2 + 1,
|
(int)type.weaponOffsetY - (image.height() - type.weapon.region.getHeight())/2 + 1,
|
||||||
false, false);
|
false, false);
|
||||||
image.draw(type.weapon.equipRegion,
|
image.draw(type.weapon.region,
|
||||||
(int)type.weapon.width + (image.width() - type.weapon.equipRegion.getWidth())/2,
|
(int)type.weapon.width + (image.width() - type.weapon.region.getWidth())/2,
|
||||||
(int)type.weaponOffsetY - (image.height() - type.weapon.equipRegion.getHeight())/2 + 1,
|
(int)type.weaponOffsetY - (image.height() - type.weapon.region.getHeight())/2 + 1,
|
||||||
true, false);
|
true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||