Crash fixes / New ammo types / New turrets / Missiles added
This commit is contained in:
@@ -9,10 +9,10 @@ import io.anuke.mindustry.type.AmmoType;
|
||||
import io.anuke.mindustry.type.ContentList;
|
||||
|
||||
public class AmmoTypes implements ContentList {
|
||||
public static AmmoType bulletTungsten, bulletLead, bulletCarbide, bulletThorium, bulletSilicon, bulletThermite,
|
||||
public static AmmoType bulletTungsten, bulletLead, bulletCarbide, bulletThorium, bulletSilicon, bulletPyratite,
|
||||
shotgunTungsten, bombExplosive, bombIncendiary, bombOil, shellCarbide, flamerThermite,
|
||||
flakLead, flakExplosive, flakPlastic, flakSurge, missileExplosive, missileIncindiary, missileSurge,
|
||||
artilleryCarbide, artilleryThorium, artilleryPlastic, artilleryHoming, artilleryIncindiary,
|
||||
artilleryCarbide, artilleryPlastic, artilleryHoming, artilleryIncindiary, artilleryExplosive,
|
||||
basicFlame, lancerLaser, lightning, spectreLaser, meltdownLaser, fuseShotgun, oil, water, lava, cryofluid;
|
||||
|
||||
@Override
|
||||
@@ -72,8 +72,8 @@ public class AmmoTypes implements ContentList {
|
||||
}};
|
||||
|
||||
bulletThorium = new AmmoType(Items.thorium, StandardBullets.thorium, 2) {{
|
||||
shootEffect = ShootFx.shootSmall;
|
||||
smokeEffect = ShootFx.shootSmallSmoke;
|
||||
shootEffect = ShootFx.shootBig;
|
||||
smokeEffect = ShootFx.shootBigSmoke;
|
||||
}};
|
||||
|
||||
bulletSilicon = new AmmoType(Items.silicon, StandardBullets.homing, 5) {{
|
||||
@@ -82,7 +82,7 @@ public class AmmoTypes implements ContentList {
|
||||
reloadMultiplier = 1.4f;
|
||||
}};
|
||||
|
||||
bulletThermite = new AmmoType(Items.pyratite, StandardBullets.tracer, 3) {{
|
||||
bulletPyratite = new AmmoType(Items.pyratite, StandardBullets.tracer, 3) {{
|
||||
shootEffect = ShootFx.shootSmall;
|
||||
smokeEffect = ShootFx.shootSmallSmoke;
|
||||
inaccuracy = 3f;
|
||||
@@ -115,11 +115,13 @@ public class AmmoTypes implements ContentList {
|
||||
missileExplosive = new AmmoType(Items.blastCompound, MissileBullets.explosive, 1) {{
|
||||
shootEffect = ShootFx.shootBig2;
|
||||
smokeEffect = ShootFx.shootBigSmoke2;
|
||||
reloadMultiplier = 1.2f;
|
||||
}};
|
||||
|
||||
missileIncindiary = new AmmoType(Items.pyratite, MissileBullets.incindiary, 1) {{
|
||||
shootEffect = ShootFx.shootBig2;
|
||||
smokeEffect = ShootFx.shootBigSmoke2;
|
||||
reloadMultiplier = 1.0f;
|
||||
}};
|
||||
|
||||
missileSurge = new AmmoType(Items.surgealloy, MissileBullets.surge, 1) {{
|
||||
@@ -129,29 +131,33 @@ public class AmmoTypes implements ContentList {
|
||||
|
||||
//artillery
|
||||
|
||||
artilleryCarbide = new AmmoType(Items.carbide, ArtilleryBullets.carbide, 1) {{
|
||||
artilleryCarbide = new AmmoType(Items.carbide, ArtilleryBullets.carbide, 2) {{
|
||||
shootEffect = ShootFx.shootBig2;
|
||||
smokeEffect = ShootFx.shootBigSmoke2;
|
||||
}};
|
||||
|
||||
artilleryThorium = new AmmoType(Items.thorium, ArtilleryBullets.thorium, 1) {{
|
||||
shootEffect = ShootFx.shootBig2;
|
||||
smokeEffect = ShootFx.shootBigSmoke2;
|
||||
}};
|
||||
|
||||
artilleryPlastic = new AmmoType(Items.plastanium, ArtilleryBullets.plastic, 1) {{
|
||||
artilleryPlastic = new AmmoType(Items.plastanium, ArtilleryBullets.plastic, 2) {{
|
||||
shootEffect = ShootFx.shootBig2;
|
||||
smokeEffect = ShootFx.shootBigSmoke2;
|
||||
reloadMultiplier = 1.4f;
|
||||
}};
|
||||
|
||||
artilleryHoming = new AmmoType(Items.silicon, ArtilleryBullets.homing, 1) {{
|
||||
shootEffect = ShootFx.shootBig2;
|
||||
smokeEffect = ShootFx.shootBigSmoke2;
|
||||
reloadMultiplier = 0.9f;
|
||||
}};
|
||||
|
||||
artilleryIncindiary = new AmmoType(Items.pyratite, ArtilleryBullets.incindiary, 1) {{
|
||||
artilleryIncindiary = new AmmoType(Items.pyratite, ArtilleryBullets.incindiary, 2) {{
|
||||
shootEffect = ShootFx.shootBig2;
|
||||
smokeEffect = ShootFx.shootBigSmoke2;
|
||||
reloadMultiplier = 1.2f;
|
||||
}};
|
||||
|
||||
artilleryExplosive = new AmmoType(Items.blastCompound, ArtilleryBullets.explosive, 1) {{
|
||||
shootEffect = ShootFx.shootBig2;
|
||||
smokeEffect = ShootFx.shootBigSmoke2;
|
||||
reloadMultiplier = 1.6f;
|
||||
}};
|
||||
|
||||
//flame
|
||||
|
||||
@@ -82,7 +82,7 @@ public class Items implements ContentList{
|
||||
explosiveness = 0.6f;
|
||||
}};
|
||||
|
||||
pyratite = new Item("pyratite", Color.valueOf("ff795e")) {{
|
||||
pyratite = new Item("pyratite", Color.valueOf("ffaa5f")) {{
|
||||
flammability = 0.7f;
|
||||
explosiveness = 0.2f;
|
||||
}};
|
||||
|
||||
@@ -33,9 +33,9 @@ public class Recipes implements ContentList{
|
||||
|
||||
new Recipe(weapon, TurretBlocks.lancer, new ItemStack(Items.tungsten, 50), new ItemStack(Items.lead, 100), new ItemStack(Items.silicon, 90));
|
||||
new Recipe(weapon, TurretBlocks.wave, new ItemStack(Items.carbide, 60), new ItemStack(Items.titanium, 70), new ItemStack(Items.lead, 150));
|
||||
new Recipe(weapon, TurretBlocks.swarmer, new ItemStack(Items.carbide, 70), new ItemStack(Items.titanium, 70), new ItemStack(Items.plastanium, 90), new ItemStack(Items.silicon, 60), new ItemStack(Items.phasematter, 60));
|
||||
new Recipe(weapon, TurretBlocks.salvo, new ItemStack(Items.tungsten, 160), new ItemStack(Items.carbide, 190), new ItemStack(Items.thorium, 130));
|
||||
new Recipe(weapon, TurretBlocks.ripple, new ItemStack(Items.tungsten, 170), new ItemStack(Items.carbide, 220), new ItemStack(Items.thorium, 120));
|
||||
new Recipe(weapon, TurretBlocks.swarmer, new ItemStack(Items.carbide, 70), new ItemStack(Items.titanium, 70), new ItemStack(Items.plastanium, 90), new ItemStack(Items.silicon, 60));
|
||||
new Recipe(weapon, TurretBlocks.salvo, new ItemStack(Items.tungsten, 210), new ItemStack(Items.carbide, 190), new ItemStack(Items.thorium, 130));
|
||||
new Recipe(weapon, TurretBlocks.ripple, new ItemStack(Items.tungsten, 300), new ItemStack(Items.carbide, 220), new ItemStack(Items.thorium, 120));
|
||||
|
||||
//DISTRIBUTION
|
||||
new Recipe(distribution, DistributionBlocks.conveyor, new ItemStack(Items.lead, 1));
|
||||
|
||||
@@ -76,7 +76,7 @@ public class Weapons implements ContentList {
|
||||
reload = 10f;
|
||||
roundrobin = true;
|
||||
ejectEffect = ShootFx.shellEjectSmall;
|
||||
setAmmo(AmmoTypes.bulletThermite);
|
||||
setAmmo(AmmoTypes.bulletPyratite);
|
||||
}};
|
||||
|
||||
bomber = new Weapon("bomber") {{
|
||||
|
||||
@@ -18,13 +18,14 @@ public class TurretBlocks extends BlockList implements ContentList {
|
||||
@Override
|
||||
public void load() {
|
||||
duo = new DoubleTurret("duo") {{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.bulletTungsten, AmmoTypes.bulletLead, AmmoTypes.bulletCarbide, AmmoTypes.bulletThermite, AmmoTypes.bulletSilicon};
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.bulletTungsten, AmmoTypes.bulletLead, AmmoTypes.bulletCarbide, AmmoTypes.bulletPyratite, AmmoTypes.bulletSilicon};
|
||||
reload = 25f;
|
||||
restitution = 0.03f;
|
||||
range = 80f;
|
||||
shootCone = 15f;
|
||||
ammoUseEffect = ShootFx.shellEjectSmall;
|
||||
health = 80;
|
||||
inaccuracy = 3f;
|
||||
}};
|
||||
/*
|
||||
scatter = new BurstTurret("scatter") {{
|
||||
@@ -115,22 +116,30 @@ public class TurretBlocks extends BlockList implements ContentList {
|
||||
size = 2;
|
||||
}};
|
||||
|
||||
swarmer = new ItemTurret("swarmer") {{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary, AmmoTypes.missileSurge};
|
||||
swarmer = new BurstTurret("swarmer") {{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.missileExplosive, AmmoTypes.missileIncindiary/*, AmmoTypes.missileSurge*/};
|
||||
reload = 60f;
|
||||
shots = 4;
|
||||
burstSpacing = 5;
|
||||
inaccuracy = 10f;
|
||||
range = 140f;
|
||||
xRand = 6f;
|
||||
size = 2;
|
||||
health = 380;
|
||||
}};
|
||||
|
||||
salvo = new ItemTurret("salvo") {{
|
||||
salvo = new BurstTurret("salvo") {{
|
||||
size = 2;
|
||||
range = 100f;
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.bulletTungsten, AmmoTypes.bulletLead, AmmoTypes.bulletCarbide, AmmoTypes.bulletThermite, AmmoTypes.bulletThorium, AmmoTypes.bulletSilicon};
|
||||
reload = 70f;
|
||||
range = 110f;
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.bulletTungsten, AmmoTypes.bulletCarbide, AmmoTypes.bulletPyratite, AmmoTypes.bulletThorium, AmmoTypes.bulletSilicon};
|
||||
reload = 40f;
|
||||
restitution = 0.03f;
|
||||
ammoEjectBack = 3f;
|
||||
cooldown = 0.03f;
|
||||
recoil = 3f;
|
||||
shootShake = 2f;
|
||||
burstSpacing = 4;
|
||||
shots = 3;
|
||||
ammoUseEffect = ShootFx.shellEjectBig;
|
||||
|
||||
drawer = (tile, entity) -> {
|
||||
@@ -146,12 +155,23 @@ public class TurretBlocks extends BlockList implements ContentList {
|
||||
}
|
||||
};
|
||||
|
||||
health = 430;
|
||||
health = 360;
|
||||
}};
|
||||
|
||||
ripple = new ArtilleryTurret("ripple") {{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.artilleryCarbide, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary, AmmoTypes.artilleryPlastic, AmmoTypes.artilleryThorium};
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.artilleryCarbide, AmmoTypes.artilleryHoming, AmmoTypes.artilleryIncindiary, AmmoTypes.artilleryExplosive, AmmoTypes.artilleryPlastic};
|
||||
size = 3;
|
||||
shots = 4;
|
||||
inaccuracy = 12f;
|
||||
reload = 60f;
|
||||
ammoEjectBack = 5f;
|
||||
ammoUseEffect = ShootFx.shellEjectBig;
|
||||
cooldown = 0.03f;
|
||||
velocityInaccuracy = 0.2f;
|
||||
restitution = 0.02f;
|
||||
recoil = 6f;
|
||||
shootShake = 2f;
|
||||
range = 300f;
|
||||
|
||||
health = 550;
|
||||
}};
|
||||
@@ -168,7 +188,7 @@ public class TurretBlocks extends BlockList implements ContentList {
|
||||
}};
|
||||
|
||||
spectre = new ItemTurret("spectre") {{
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.bulletTungsten, AmmoTypes.bulletLead, AmmoTypes.bulletCarbide, AmmoTypes.bulletThermite, AmmoTypes.bulletThorium, AmmoTypes.bulletSilicon};
|
||||
ammoTypes = new AmmoType[]{AmmoTypes.bulletTungsten, AmmoTypes.bulletLead, AmmoTypes.bulletCarbide, AmmoTypes.bulletPyratite, AmmoTypes.bulletThorium, AmmoTypes.bulletSilicon};
|
||||
reload = 25f;
|
||||
restitution = 0.03f;
|
||||
ammoUseEffect = ShootFx.shellEjectSmall;
|
||||
|
||||
@@ -4,15 +4,16 @@ import io.anuke.mindustry.content.fx.BulletFx;
|
||||
import io.anuke.mindustry.entities.bullet.ArtilleryBulletType;
|
||||
import io.anuke.mindustry.entities.bullet.BasicBulletType;
|
||||
import io.anuke.mindustry.entities.bullet.BulletType;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.type.ContentList;
|
||||
|
||||
public class ArtilleryBullets extends BulletList implements ContentList{
|
||||
public static BulletType carbide, thorium, plastic, homing, incindiary, surge;
|
||||
public static BulletType carbide, plastic, plasticFrag, homing, incindiary, explosive, surge;
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
|
||||
carbide = new ArtilleryBulletType(3f, 4, "shell") {
|
||||
carbide = new ArtilleryBulletType(3f, 0, "shell") {
|
||||
{
|
||||
hiteffect = BulletFx.flakExplosion;
|
||||
knockback = 0.8f;
|
||||
@@ -24,58 +25,81 @@ public class ArtilleryBullets extends BulletList implements ContentList{
|
||||
}
|
||||
};
|
||||
|
||||
thorium = new BasicBulletType(3f, 0, "shell") {
|
||||
plasticFrag = new BasicBulletType(2.5f, 6, "bullet") {
|
||||
{
|
||||
hiteffect = BulletFx.flakExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 90f;
|
||||
drag = 0.01f;
|
||||
bulletWidth = bulletHeight = 9f;
|
||||
bulletShrink = 0.1f;
|
||||
bulletWidth = 10f;
|
||||
bulletHeight = 12f;
|
||||
bulletShrink = 1f;
|
||||
lifetime = 15f;
|
||||
backColor = Palette.plastaniumBack;
|
||||
frontColor = Palette.plastaniumFront;
|
||||
}
|
||||
};
|
||||
|
||||
plastic = new BasicBulletType(3f, 0, "shell") {
|
||||
plastic = new ArtilleryBulletType(3.3f, 0, "shell") {
|
||||
{
|
||||
hiteffect = BulletFx.flakExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 90f;
|
||||
drag = 0.01f;
|
||||
bulletWidth = bulletHeight = 9f;
|
||||
bulletShrink = 0.1f;
|
||||
hiteffect = BulletFx.plasticExplosion;
|
||||
knockback = 1f;
|
||||
lifetime = 55f;
|
||||
bulletWidth = bulletHeight = 13f;
|
||||
collidesTiles = false;
|
||||
splashDamageRadius = 35f;
|
||||
splashDamage = 35f;
|
||||
fragBullet = plasticFrag;
|
||||
fragBullets = 9;
|
||||
backColor = Palette.plastaniumBack;
|
||||
frontColor = Palette.plastaniumFront;
|
||||
}
|
||||
};
|
||||
|
||||
homing = new BasicBulletType(3f, 0, "shell") {
|
||||
homing = new ArtilleryBulletType(3f, 0, "shell") {
|
||||
{
|
||||
hiteffect = BulletFx.flakExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 90f;
|
||||
drag = 0.01f;
|
||||
bulletWidth = bulletHeight = 9f;
|
||||
bulletShrink = 0.1f;
|
||||
lifetime = 45f;
|
||||
bulletWidth = bulletHeight = 11f;
|
||||
collidesTiles = false;
|
||||
splashDamageRadius = 25f;
|
||||
splashDamage = 33f;
|
||||
homingPower = 2f;
|
||||
homingRange = 50f;
|
||||
}
|
||||
};
|
||||
|
||||
incindiary = new BasicBulletType(3f, 0, "shell") {
|
||||
incindiary = new ArtilleryBulletType(3f, 0, "shell") {
|
||||
{
|
||||
hiteffect = BulletFx.flakExplosion;
|
||||
hiteffect = BulletFx.blastExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 90f;
|
||||
drag = 0.01f;
|
||||
bulletWidth = bulletHeight = 9f;
|
||||
bulletShrink = 0.1f;
|
||||
lifetime = 60f;
|
||||
bulletWidth = bulletHeight = 13f;
|
||||
collidesTiles = false;
|
||||
splashDamageRadius = 25f;
|
||||
splashDamage = 30f;
|
||||
incendAmount = 4;
|
||||
incendSpread = 11f;
|
||||
frontColor = Palette.lightishOrange;
|
||||
backColor = Palette.lightOrange;
|
||||
trailEffect = BulletFx.incendTrail;
|
||||
}
|
||||
};
|
||||
|
||||
surge = new BasicBulletType(3f, 0, "shell") {
|
||||
explosive = new ArtilleryBulletType(2f, 0, "shell") {
|
||||
{
|
||||
hiteffect = BulletFx.flakExplosion;
|
||||
hiteffect = BulletFx.blastExplosion;
|
||||
knockback = 0.8f;
|
||||
lifetime = 90f;
|
||||
drag = 0.01f;
|
||||
bulletWidth = bulletHeight = 9f;
|
||||
bulletShrink = 0.1f;
|
||||
lifetime = 70f;
|
||||
bulletWidth = bulletHeight = 14f;
|
||||
collidesTiles = false;
|
||||
splashDamageRadius = 45f;
|
||||
splashDamage = 50f;
|
||||
backColor = Palette.missileYellowBack;
|
||||
frontColor = Palette.missileYellow;
|
||||
}
|
||||
};
|
||||
|
||||
surge = new ArtilleryBulletType(3f, 0, "shell") {
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package io.anuke.mindustry.content.bullets;
|
||||
|
||||
import io.anuke.mindustry.entities.bullet.BasicBulletType;
|
||||
import io.anuke.mindustry.content.fx.BulletFx;
|
||||
import io.anuke.mindustry.entities.bullet.BulletType;
|
||||
import io.anuke.mindustry.entities.bullet.MissileBulletType;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.type.ContentList;
|
||||
|
||||
public class MissileBullets extends BulletList implements ContentList {
|
||||
@@ -10,21 +12,39 @@ public class MissileBullets extends BulletList implements ContentList {
|
||||
@Override
|
||||
public void load() {
|
||||
|
||||
explosive = new BasicBulletType(3f, 5, "bullet") {
|
||||
explosive = new MissileBulletType(1.8f, 10, "missile") {
|
||||
{
|
||||
bulletWidth = 7f;
|
||||
bulletHeight = 9f;
|
||||
bulletWidth = 8f;
|
||||
bulletHeight = 8f;
|
||||
bulletShrink = 0f;
|
||||
drag = -0.01f;
|
||||
splashDamageRadius = 30f;
|
||||
splashDamage = 30f;
|
||||
lifetime = 150f;
|
||||
hiteffect = BulletFx.blastExplosion;
|
||||
despawneffect = BulletFx.blastExplosion;
|
||||
}
|
||||
};
|
||||
|
||||
incindiary = new BasicBulletType(3f, 5, "bullet") {
|
||||
incindiary = new MissileBulletType(2f, 12, "missile") {
|
||||
{
|
||||
frontColor = Palette.lightishOrange;
|
||||
backColor = Palette.lightOrange;
|
||||
bulletWidth = 7f;
|
||||
bulletHeight = 9f;
|
||||
bulletHeight = 8f;
|
||||
bulletShrink = 0f;
|
||||
drag = -0.01f;
|
||||
homingPower = 7f;
|
||||
splashDamageRadius = 10f;
|
||||
splashDamage = 10f;
|
||||
lifetime = 160f;
|
||||
hiteffect = BulletFx.blastExplosion;
|
||||
incendSpread = 10f;
|
||||
incendAmount = 3;
|
||||
}
|
||||
};
|
||||
|
||||
surge = new BasicBulletType(3f, 5, "bullet") {
|
||||
surge = new MissileBulletType(3f, 5, "bullet") {
|
||||
{
|
||||
bulletWidth = 7f;
|
||||
bulletHeight = 9f;
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package io.anuke.mindustry.content.bullets;
|
||||
|
||||
import io.anuke.mindustry.entities.Unit;
|
||||
import io.anuke.mindustry.entities.Units;
|
||||
import io.anuke.mindustry.entities.bullet.BasicBulletType;
|
||||
import io.anuke.mindustry.entities.bullet.Bullet;
|
||||
import io.anuke.mindustry.entities.bullet.BulletType;
|
||||
import io.anuke.mindustry.graphics.Palette;
|
||||
import io.anuke.mindustry.type.ContentList;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.util.Angles;
|
||||
|
||||
public class StandardBullets extends BulletList implements ContentList {
|
||||
public static BulletType tungsten, lead, carbide, thorium, homing, tracer;
|
||||
@@ -46,25 +42,22 @@ public class StandardBullets extends BulletList implements ContentList {
|
||||
};
|
||||
|
||||
homing = new BasicBulletType(3f, 9, "bullet") {
|
||||
float homingPower = 5f;
|
||||
{
|
||||
bulletWidth = 7f;
|
||||
bulletHeight = 9f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Bullet b) {
|
||||
Unit target = Units.getClosestEnemy(b.getTeam(), b.x, b.y, 40f, unit -> true);
|
||||
if(target != null){
|
||||
b.getVelocity().setAngle(Angles.moveToward(b.getVelocity().angle(), b.angleTo(target), homingPower * Timers.delta()));
|
||||
}
|
||||
homingPower = 5f;
|
||||
}
|
||||
};
|
||||
|
||||
tracer = new BasicBulletType(3f, 5, "bullet") {
|
||||
tracer = new BasicBulletType(3.2f, 11, "bullet") {
|
||||
{
|
||||
bulletWidth = 7f;
|
||||
bulletHeight = 9f;
|
||||
bulletWidth = 10f;
|
||||
bulletHeight = 12f;
|
||||
frontColor = Palette.lightishOrange;
|
||||
backColor = Palette.lightOrange;
|
||||
incendSpread = 3f;
|
||||
incendAmount = 1;
|
||||
incendChance = 0.3f;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@ import io.anuke.ucore.util.Angles;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class BulletFx extends FxList implements ContentList {
|
||||
public static Effect hitBulletSmall, hitBulletBig, hitFlameSmall, hitLiquid, hitLancer, despawn, flakExplosion, artilleryTrail;
|
||||
public static Effect hitBulletSmall, hitBulletBig, hitFlameSmall, hitLiquid, hitLancer, despawn, flakExplosion, blastExplosion, plasticExplosion,
|
||||
artilleryTrail, incendTrail, missileTrail;
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
@@ -110,8 +111,68 @@ public class BulletFx extends FxList implements ContentList {
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
plasticExplosion = new Effect(24, e -> {
|
||||
|
||||
Draw.color(Palette.plastaniumFront);
|
||||
e.scaled(7, i -> {
|
||||
Lines.stroke(3f * i.fout());
|
||||
Lines.circle(e.x, e.y, 3f + i.fin() * 24f);
|
||||
});
|
||||
|
||||
Draw.color(Color.GRAY);
|
||||
|
||||
Angles.randLenVectors(e.id, 7, 2f + 28f * e.finpow(), (x, y) -> {
|
||||
Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f);
|
||||
});
|
||||
|
||||
Draw.color(Palette.plastaniumBack);
|
||||
Lines.stroke(1f * e.fout());
|
||||
|
||||
Angles.randLenVectors(e.id + 1, 4, 1f + 25f * e.finpow(), (x, y) -> {
|
||||
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), 1f + e.fout() * 3f);
|
||||
});
|
||||
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
blastExplosion = new Effect(22, e -> {
|
||||
|
||||
Draw.color(Palette.missileYellow);
|
||||
e.scaled(6, i -> {
|
||||
Lines.stroke(3f * i.fout());
|
||||
Lines.circle(e.x, e.y, 3f + i.fin() * 15f);
|
||||
});
|
||||
|
||||
Draw.color(Color.GRAY);
|
||||
|
||||
Angles.randLenVectors(e.id, 5, 2f + 23f * e.finpow(), (x, y) -> {
|
||||
Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f);
|
||||
});
|
||||
|
||||
Draw.color(Palette.missileYellowBack);
|
||||
Lines.stroke(1f * e.fout());
|
||||
|
||||
Angles.randLenVectors(e.id + 1, 4, 1f + 23f * e.finpow(), (x, y) -> {
|
||||
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), 1f + e.fout() * 3f);
|
||||
});
|
||||
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
artilleryTrail = new Effect(50, e -> {
|
||||
Draw.color(Palette.bulletYellowBack);
|
||||
Draw.color(e.color);
|
||||
Fill.circle(e.x, e.y, e.rotation * e.fout());
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
incendTrail = new Effect(50, e -> {
|
||||
Draw.color(Palette.lightOrange);
|
||||
Fill.circle(e.x, e.y, e.rotation * e.fout());
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
missileTrail = new Effect(50, e -> {
|
||||
Draw.color(Palette.missileYellowBack);
|
||||
Fill.circle(e.x, e.y, e.rotation * e.fout());
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user