Finalized unit type definitions
|
Before Width: | Height: | Size: 250 B |
|
Before Width: | Height: | Size: 140 B After Width: | Height: | Size: 250 B |
BIN
core/assets-raw/sprites/mechs/mechs/chaos-array-base.png
Normal file
|
After Width: | Height: | Size: 211 B |
BIN
core/assets-raw/sprites/mechs/mechs/chaos-array-leg.png
Normal file
|
After Width: | Height: | Size: 287 B |
BIN
core/assets-raw/sprites/mechs/mechs/chaos-array.png
Normal file
|
After Width: | Height: | Size: 621 B |
BIN
core/assets-raw/sprites/mechs/mechs/eradicator-base.png
Normal file
|
After Width: | Height: | Size: 220 B |
BIN
core/assets-raw/sprites/mechs/mechs/eradicator-leg.png
Normal file
|
After Width: | Height: | Size: 234 B |
BIN
core/assets-raw/sprites/mechs/mechs/eradicator.png
Normal file
|
After Width: | Height: | Size: 840 B |
BIN
core/assets-raw/sprites/weapons/chaos-equip.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
core/assets-raw/sprites/weapons/eradication-equip.png
Normal file
|
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;
|
||||
frontColor = Palette.plastaniumFront;
|
||||
backColor = Palette.plastaniumBack;
|
||||
shootEffect = Fx.shootBig;
|
||||
}};
|
||||
|
||||
flakExplosive = new FlakBulletType(4f, 5){{
|
||||
//default bullet type, no changes
|
||||
shootEffect = Fx.shootBig;
|
||||
}};
|
||||
|
||||
flakSurge = new FlakBulletType(4f, 7){{
|
||||
splashDamage = 33f;
|
||||
lightining = 2;
|
||||
lightningLength = 12;
|
||||
shootEffect = Fx.shootBig;
|
||||
}};
|
||||
|
||||
missileExplosive = new MissileBulletType(1.8f, 10, "missile"){{
|
||||
|
||||
@@ -120,7 +120,53 @@ public class UnitTypes implements ContentList{
|
||||
ejectEffect = Fx.none;
|
||||
bullet = Bullets.eruptorShot;
|
||||
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(){
|
||||
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();
|
||||
|
||||
@@ -130,7 +130,7 @@ public abstract class GroundUnit extends BaseUnit{
|
||||
Draw.rect(type.legRegion,
|
||||
x + Angles.trnsx(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){
|
||||
@@ -145,10 +145,10 @@ public abstract class GroundUnit extends BaseUnit{
|
||||
|
||||
for(int i : Mathf.signs){
|
||||
float tra = rotation - 90, trY = -type.weapon.getRecoil(this, i > 0) + type.weaponOffsetY;
|
||||
float w = i > 0 ? -12 : 12;
|
||||
Draw.rect(type.weapon.equipRegion,
|
||||
float w = - i * type.weapon.region.getWidth() * Draw.scl;
|
||||
Draw.rect(type.weapon.region,
|
||||
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();
|
||||
|
||||
@@ -328,12 +328,12 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
||||
|
||||
for(int i : Mathf.signs){
|
||||
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();
|
||||
Draw.rect(mech.weapon.equipRegion,
|
||||
float w = i > 0 ? -mech.weapon.region.getWidth() : mech.weapon.region.getWidth();
|
||||
Draw.rect(mech.weapon.region,
|
||||
x + Angles.trnsx(tra, (mech.weaponOffsetX + mech.spreadX(this)) * i, trY),
|
||||
y + Angles.trnsy(tra, (mech.weaponOffsetX + mech.spreadX(this)) * i, trY),
|
||||
w * Draw.scl,
|
||||
mech.weapon.equipRegion.getHeight() * Draw.scl,
|
||||
mech.weapon.region.getHeight() * Draw.scl,
|
||||
rotation - 90);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class Revenant extends FlyingUnit{
|
||||
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);
|
||||
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.*/
|
||||
public boolean ignoreRotation = false;
|
||||
|
||||
public TextureRegion equipRegion;
|
||||
public TextureRegion region;
|
||||
|
||||
protected Weapon(String name){
|
||||
this.name = name;
|
||||
@@ -119,7 +119,7 @@ public class Weapon{
|
||||
}
|
||||
|
||||
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){
|
||||
|
||||
@@ -508,7 +508,7 @@ public class Block extends BlockStorage{
|
||||
|
||||
public TextureRegion icon(Icon icon){
|
||||
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()];
|
||||
}
|
||||
|
||||
@@ -84,10 +84,10 @@ public class Generators {
|
||||
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.equipRegion, (int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, true, false);
|
||||
image.draw(mech.weapon.region, -(int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, false, false);
|
||||
image.draw(mech.weapon.region, (int)mech.weaponOffsetX + off, (int)mech.weaponOffsetY + off, true, false);
|
||||
|
||||
|
||||
image.save("mech-icon-" + mech.name);
|
||||
@@ -109,13 +109,13 @@ public class Generators {
|
||||
image.draw(type.legRegion, true, false);
|
||||
image.draw(type.region);
|
||||
|
||||
image.draw(type.weapon.equipRegion,
|
||||
-(int)type.weapon.width + (image.width() - type.weapon.equipRegion.getWidth())/2,
|
||||
(int)type.weaponOffsetY - (image.height() - type.weapon.equipRegion.getHeight())/2 + 1,
|
||||
image.draw(type.weapon.region,
|
||||
-(int)type.weapon.width + (image.width() - type.weapon.region.getWidth())/2,
|
||||
(int)type.weaponOffsetY - (image.height() - type.weapon.region.getHeight())/2 + 1,
|
||||
false, false);
|
||||
image.draw(type.weapon.equipRegion,
|
||||
(int)type.weapon.width + (image.width() - type.weapon.equipRegion.getWidth())/2,
|
||||
(int)type.weaponOffsetY - (image.height() - type.weapon.equipRegion.getHeight())/2 + 1,
|
||||
image.draw(type.weapon.region,
|
||||
(int)type.weapon.width + (image.width() - type.weapon.region.getWidth())/2,
|
||||
(int)type.weaponOffsetY - (image.height() - type.weapon.region.getHeight())/2 + 1,
|
||||
true, false);
|
||||
}
|
||||
|
||||
|
||||