diff --git a/core/src/io/anuke/mindustry/content/Bullets.java b/core/src/io/anuke/mindustry/content/Bullets.java index 8900001cb6..e8551c7978 100644 --- a/core/src/io/anuke/mindustry/content/Bullets.java +++ b/core/src/io/anuke/mindustry/content/Bullets.java @@ -9,7 +9,6 @@ import io.anuke.arc.graphics.g2d.Lines; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.arc.util.Tmp; -import io.anuke.mindustry.content.fx.*; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.bullet.*; import io.anuke.mindustry.entities.effect.Fire; @@ -56,7 +55,7 @@ public class Bullets implements ContentList{ public void load(){ artilleryDense = new ArtilleryBulletType(3f, 0, "shell"){{ - hitEffect = BulletFx.flakExplosion; + hitEffect = Fx.flakExplosion; knockback = 0.8f; lifetime = 50f; bulletWidth = bulletHeight = 11f; @@ -76,7 +75,7 @@ public class Bullets implements ContentList{ }}; arilleryPlastic = new ArtilleryBulletType(3.3f, 0, "shell"){{ - hitEffect = BulletFx.plasticExplosion; + hitEffect = Fx.plasticExplosion; knockback = 1f; lifetime = 55f; bulletWidth = bulletHeight = 13f; @@ -90,7 +89,7 @@ public class Bullets implements ContentList{ }}; artilleryHoming = new ArtilleryBulletType(3f, 0, "shell"){{ - hitEffect = BulletFx.flakExplosion; + hitEffect = Fx.flakExplosion; knockback = 0.8f; lifetime = 45f; bulletWidth = bulletHeight = 11f; @@ -102,7 +101,7 @@ public class Bullets implements ContentList{ }}; artlleryIncendiary = new ArtilleryBulletType(3f, 0, "shell"){{ - hitEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; knockback = 0.8f; lifetime = 60f; bulletWidth = bulletHeight = 13f; @@ -113,11 +112,11 @@ public class Bullets implements ContentList{ incendSpread = 11f; frontColor = Palette.lightishOrange; backColor = Palette.lightOrange; - trailEffect = BulletFx.incendTrail; + trailEffect = Fx.incendTrail; }}; artilleryExplosive = new ArtilleryBulletType(2f, 0, "shell"){{ - hitEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; knockback = 0.8f; lifetime = 70f; bulletWidth = bulletHeight = 14f; @@ -129,7 +128,7 @@ public class Bullets implements ContentList{ }}; artilleryUnit = new ArtilleryBulletType(2f, 0, "shell"){{ - hitEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; knockback = 0.8f; lifetime = 90f; bulletWidth = bulletHeight = 14f; @@ -145,7 +144,7 @@ public class Bullets implements ContentList{ splashDamageRadius = 40f; fragBullet = artilleryPlasticFrag; fragBullets = 4; - hitEffect = BulletFx.plasticExplosion; + hitEffect = Fx.plasticExplosion; frontColor = Palette.plastaniumFront; backColor = Palette.plastaniumBack; }}; @@ -168,8 +167,8 @@ public class Bullets implements ContentList{ splashDamageRadius = 30f; splashDamage = 30f; lifetime = 150f; - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; + despawnEffect = Fx.blastExplosion; }}; missileIncendiary = new MissileBulletType(2f, 12, "missile"){{ @@ -183,7 +182,7 @@ public class Bullets implements ContentList{ splashDamageRadius = 10f; splashDamage = 10f; lifetime = 160f; - hitEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; incendSpread = 10f; incendAmount = 3; }}; @@ -196,8 +195,8 @@ public class Bullets implements ContentList{ splashDamageRadius = 30f; splashDamage = 22f; lifetime = 150f; - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; + despawnEffect = Fx.blastExplosion; lightining = 2; lightningLength = 14; }}; @@ -212,8 +211,8 @@ public class Bullets implements ContentList{ splashDamage = 1f; lifetime = 90f; trailColor = Color.valueOf("b6c6fd"); - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; + despawnEffect = Fx.blastExplosion; backColor = Palette.bulletYellowBack; frontColor = Palette.bulletYellow; weaveScale = 8f; @@ -233,8 +232,8 @@ public class Bullets implements ContentList{ trailColor = Color.GRAY; backColor = Palette.bulletYellowBack; frontColor = Palette.bulletYellow; - hitEffect = BulletFx.blastExplosion; - despawnEffect = BulletFx.blastExplosion; + hitEffect = Fx.blastExplosion; + despawnEffect = Fx.blastExplosion; weaveScale = 8f; weaveMag = 2f; }}; @@ -242,8 +241,8 @@ public class Bullets implements ContentList{ standardCopper = new BasicBulletType(2.5f, 7, "bullet"){{ bulletWidth = 7f; bulletHeight = 9f; - shootEffect = ShootFx.shootSmall; - smokeEffect = ShootFx.shootSmallSmoke; + shootEffect = Fx.shootSmall; + smokeEffect = Fx.shootSmallSmoke; ammoMultiplier = 5; }}; @@ -259,8 +258,8 @@ public class Bullets implements ContentList{ bulletWidth = 10f; bulletHeight = 13f; armorPierce = 0.5f; - shootEffect = ShootFx.shootBig; - smokeEffect = ShootFx.shootBigSmoke; + shootEffect = Fx.shootBig; + smokeEffect = Fx.shootBigSmoke; ammoMultiplier = 2; }}; @@ -298,7 +297,7 @@ public class Bullets implements ContentList{ bulletHeight = 14f; lifetime = 40f; inaccuracy = 5f; - despawnEffect = BulletFx.hitBulletSmall; + despawnEffect = Fx.hitBulletSmall; }}; standardDenseBig = new BasicBulletType(7f, 42, "bullet"){{ @@ -326,7 +325,7 @@ public class Bullets implements ContentList{ damageLightning = new BulletType(0.0001f, 0f){ { lifetime = Lightning.lifetime; - hitEffect = BulletFx.hitLancer; + hitEffect = Fx.hitLancer; despawnEffect = Fx.none; status = StatusEffects.shocked; statusIntensity = 1f; @@ -337,8 +336,8 @@ public class Bullets implements ContentList{ float healPercent = 3f; { - hitEffect = BulletFx.hitLaser; - despawnEffect = BulletFx.hitLaser; + hitEffect = Fx.hitLaser; + despawnEffect = Fx.hitLaser; collidesTeam = true; } @@ -363,7 +362,7 @@ public class Bullets implements ContentList{ tile = tile.target(); if(tile != null && tile.getTeam() == b.getTeam() && !(tile.block() instanceof BuildBlock)){ - Effects.effect(BlockFx.healBlockFull, Palette.heal, tile.drawx(), tile.drawy(), tile.block().size); + Effects.effect(Fx.healBlockFull, Palette.heal, tile.drawx(), tile.drawy(), tile.block().size); tile.entity.healBy(healPercent / 100f * tile.entity.maxHealth()); } } @@ -402,11 +401,11 @@ public class Bullets implements ContentList{ } if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.fireballsmoke, b.x, b.y); + Effects.effect(Fx.fireballsmoke, b.x, b.y); } if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.ballfire, b.x, b.y); + Effects.effect(Fx.ballfire, b.x, b.y); } } }; @@ -417,7 +416,7 @@ public class Bullets implements ContentList{ lifetime = 35f; pierce = true; drag = 0.05f; - hitEffect = BulletFx.hitFlameSmall; + hitEffect = Fx.hitFlameSmall; despawnEffect = Fx.none; status = StatusEffects.burning; } @@ -434,7 +433,7 @@ public class Bullets implements ContentList{ float length = 100f; { - hitEffect = BulletFx.hitLancer; + hitEffect = Fx.hitLancer; despawnEffect = Fx.none; hitSize = 4; lifetime = 16f; @@ -472,7 +471,7 @@ public class Bullets implements ContentList{ float length = 200f; { - hitEffect = BulletFx.hitMeltdown; + hitEffect = Fx.hitMeltdown; despawnEffect = Fx.none; hitSize = 4; drawSize = 420f; @@ -518,7 +517,7 @@ public class Bullets implements ContentList{ float raySpace = 2f; float rayLength = 80f; { - hitEffect = BulletFx.hitFuse; + hitEffect = Fx.hitFuse; lifetime = 13f; despawnEffect = Fx.none; pierce = true; @@ -570,7 +569,7 @@ public class Bullets implements ContentList{ { lifetime = 1f; despawnEffect = Fx.none; - hitEffect = BulletFx.hitLancer; + hitEffect = Fx.hitLancer; keepVelocity = false; } @@ -587,7 +586,7 @@ public class Bullets implements ContentList{ arc = new BulletType(0.001f, 26){{ lifetime = 1; despawnEffect = Fx.none; - hitEffect = BulletFx.hitLancer; + hitEffect = Fx.hitLancer; } @Override @@ -612,13 +611,13 @@ public class Bullets implements ContentList{ bombExplosive = new BombBulletType(10f, 20f, "shell"){{ bulletWidth = 9f; bulletHeight = 13f; - hitEffect = BulletFx.flakExplosion; + hitEffect = Fx.flakExplosion; }}; bombIncendiary = new BombBulletType(7f, 10f, "shell"){{ bulletWidth = 8f; bulletHeight = 12f; - hitEffect = BulletFx.flakExplosion; + hitEffect = Fx.flakExplosion; backColor = Palette.lightOrange; frontColor = Palette.lightishOrange; incendChance = 1f; @@ -629,7 +628,7 @@ public class Bullets implements ContentList{ bombOil = new BombBulletType(2f, 3f, "shell"){{ bulletWidth = 8f; bulletHeight = 12f; - hitEffect = BlockFx.pulverize; + hitEffect = Fx.pulverize; backColor = new Color(0x4f4f4fff); frontColor = Color.GRAY; } diff --git a/core/src/io/anuke/mindustry/content/Fx.java b/core/src/io/anuke/mindustry/content/Fx.java new file mode 100644 index 0000000000..ee3985365e --- /dev/null +++ b/core/src/io/anuke/mindustry/content/Fx.java @@ -0,0 +1,814 @@ +package io.anuke.mindustry.content; + +import io.anuke.arc.Core; +import io.anuke.arc.entities.Effects.Effect; +import io.anuke.arc.graphics.Color; +import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.arc.graphics.g2d.Fill; +import io.anuke.arc.graphics.g2d.Lines; +import io.anuke.arc.math.Angles; +import io.anuke.arc.math.Mathf; +import io.anuke.mindustry.content.Liquids; +import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect; +import io.anuke.mindustry.game.ContentList; +import io.anuke.mindustry.graphics.Palette; +import io.anuke.mindustry.graphics.Shapes; +import io.anuke.mindustry.type.ContentType; +import io.anuke.mindustry.type.Item; + +import static io.anuke.mindustry.Vars.tilesize; + +public class Fx implements ContentList{ + public static Effect + + none, placeBlock, breakBlock, smoke, spawn, tapBlock, select, + vtolHover, unitDrop, unitPickup, unitLand, pickup, healWave, heal, landShock, reactorsmoke, nuclearsmoke, nuclearcloud, + redgeneratespark, generatespark, fuelburn, plasticburn, pulverize, pulverizeRed, pulverizeRedder, pulverizeSmall, pulverizeMedium, + producesmoke, smeltsmoke, formsmoke, blastsmoke, lava, doorclose, dooropenlarge, doorcloselarge, purify, purifyoil, purifystone, generate, + mine, mineBig, mineHuge, smelt, teleportActivate, teleport, teleportOut, ripple, bubble, commandSend, + healBlock, healBlockFull, healWaveMend, overdriveWave, overdriveBlockFull, shieldBreak, hitBulletSmall, hitFuse, + hitBulletBig, hitFlameSmall, hitLiquid, hitLaser, hitLancer, hitMeltdown, despawn, flakExplosion, blastExplosion, + plasticExplosion, artilleryTrail, incendTrail, missileTrail, absorb, flakExplosionBig, plasticExplosionFlak, burning, fire, + fireSmoke, steam, fireballsmoke, ballfire, freezing, melting, wet, oily, overdriven, dropItem, shockwave, + bigShockwave, nuclearShockwave, explosion, blockExplosion, blockExplosionSmoke, shootSmall, shootHeal, shootSmallSmoke, shootBig, shootBig2, shootBigSmoke, + shootBigSmoke2, shootSmallFlame, shootLiquid, shellEjectSmall, shellEjectMedium, + shellEjectBig, lancerLaserShoot, lancerLaserShootSmoke, lancerLaserCharge, lancerLaserChargeBegin, lightningCharge, lightningShoot; + + @Override + public void load(){ + + none = new Effect(0, 0f, e -> {}); + + placeBlock = new Effect(16, e -> { + Draw.color(Palette.accent); + Lines.stroke(3f - e.fin() * 2f); + Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f); + Draw.reset(); + }); + + tapBlock = new Effect(12, e -> { + Draw.color(Palette.accent); + Lines.stroke(3f - e.fin() * 2f); + Lines.circle(e.x, e.y, 4f + (tilesize / 1.5f * e.rotation) * e.fin()); + Draw.reset(); + }); + + breakBlock = new Effect(12, e -> { + Draw.color(Palette.remove); + Lines.stroke(3f - e.fin() * 2f); + Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f); + + Angles.randLenVectors(e.id, 3 + (int) (e.rotation * 3), e.rotation * 2f + (tilesize * e.rotation) * e.finpow(), (x, y) -> { + Fill.square(e.x + x, e.y + y, 1f + e.fout() * (3f + e.rotation)); + }); + Draw.reset(); + }); + + select = new Effect(23, e -> { + Draw.color(Palette.accent); + Lines.stroke(e.fout() * 3f); + Lines.circle(e.x, e.y, 3f + e.fin() * 14f); + Draw.reset(); + }); + + smoke = new Effect(100, e -> { + Draw.color(Color.GRAY, Palette.darkishGray, e.fin()); + float size = 7f - e.fin() * 7f; + Draw.rect("circle", e.x, e.y, size, size); + Draw.reset(); + }); + + spawn = new Effect(23, e -> { + Lines.stroke(2f * e.fout()); + Draw.color(Palette.accent); + Lines.poly(e.x, e.y, 4, 3f + e.fin() * 8f); + Draw.reset(); + }); + + vtolHover = new Effect(40f, e -> { + float len = e.finpow() * 10f; + float ang = e.rotation + Mathf.randomSeedRange(e.id, 30f); + Draw.color(Palette.lightFlame, Palette.lightOrange, e.fin()); + Fill.circle(e.x + Angles.trnsx(ang, len), e.y + Angles.trnsy(ang, len), 2f * e.fout()); + Draw.reset(); + }); + + unitDrop = new GroundEffect(30, e -> { + Draw.color(Palette.lightishGray); + Angles.randLenVectors(e.id, 9, 3 + 20f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.4f); + }); + Draw.reset(); + }); + + unitLand = new GroundEffect(30, e -> { + Draw.color(Palette.lightishGray, e.color, e.rotation); + Angles.randLenVectors(e.id, 6, 17f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.3f); + }); + Draw.reset(); + }); + + unitPickup = new GroundEffect(18, e -> { + Draw.color(Palette.lightishGray); + Lines.stroke(e.fin() * 2f); + Lines.poly(e.x, e.y, 4, 13f * e.fout()); + Draw.reset(); + }); + + landShock = new GroundEffect(12, e -> { + Draw.color(Palette.lancerLaser); + Lines.stroke(e.fout() * 3f); + Lines.poly(e.x, e.y, 12, 20f * e.fout()); + Draw.reset(); + }); + + pickup = new Effect(18, e -> { + Draw.color(Palette.lightishGray); + Lines.stroke(e.fout() * 2f); + Lines.spikes(e.x, e.y, 1f + e.fin() * 6f, e.fout() * 4f, 6); + Draw.reset(); + }); + + healWave = new Effect(22, e -> { + Draw.color(Palette.heal); + Lines.stroke(e.fout() * 2f); + Lines.poly(e.x, e.y, 30, 4f + e.finpow() * 60f); + Draw.color(); + }); + + heal = new Effect(11, e -> { + Draw.color(Palette.heal); + Lines.stroke(e.fout() * 2f); + Lines.poly(e.x, e.y, 10, 2f + e.finpow() * 7f); + Draw.color(); + }); + + + hitBulletSmall = new Effect(14, e -> { + Draw.color(Color.WHITE, Palette.lightOrange, e.fin()); + + e.scaled(7f, s -> { + Lines.stroke(0.5f + s.fout()); + Lines.circle(e.x, e.y, s.fin()*5f); + }); + + + Lines.stroke(0.5f + e.fout()); + + Angles.randLenVectors(e.id, 5, e.fin() * 15f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); + }); + + Draw.reset(); + }); + + hitFuse = new Effect(14, e -> { + Draw.color(Color.WHITE, Palette.surge, e.fin()); + + e.scaled(7f, s -> { + Lines.stroke(0.5f + s.fout()); + Lines.circle(e.x, e.y, s.fin()*7f); + }); + + + Lines.stroke(0.5f + e.fout()); + + Angles.randLenVectors(e.id, 6, e.fin() * 15f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); + }); + + Draw.reset(); + }); + + hitBulletBig = new Effect(13, e -> { + Draw.color(Color.WHITE, Palette.lightOrange, e.fin()); + Lines.stroke(0.5f + e.fout() * 1.5f); + + Angles.randLenVectors(e.id, 8, e.finpow() * 30f, e.rotation, 50f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1.5f); + }); + + Draw.reset(); + }); + + hitFlameSmall = new Effect(14, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); + Lines.stroke(0.5f + e.fout()); + + Angles.randLenVectors(e.id, 5, e.fin() * 15f, e.rotation, 50f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); + }); + + Draw.reset(); + }); + + hitLiquid = new Effect(16, e -> { + Draw.color(e.color); + + Angles.randLenVectors(e.id, 5, e.fin() * 15f, e.rotation + 180f, 60f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 2f); + }); + + Draw.reset(); + }); + + hitLancer = new Effect(12, e -> { + Draw.color(Color.WHITE); + Lines.stroke(e.fout() * 1.5f); + + Angles.randLenVectors(e.id, 8, e.finpow() * 17f, e.rotation, 360f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f); + }); + + Draw.reset(); + }); + + hitMeltdown = new Effect(12, e -> { + Draw.color(Palette.meltdownHit); + Lines.stroke(e.fout() * 2f); + + Angles.randLenVectors(e.id, 6, e.finpow() * 18f, e.rotation, 360f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f); + }); + + Draw.reset(); + }); + + hitLaser = new Effect(8, e -> { + Draw.color(Color.WHITE, Palette.heal, e.fin()); + Lines.stroke(0.5f + e.fout()); + Lines.circle(e.x, e.y, e.fin()*5f); + Draw.reset(); + }); + + despawn = new Effect(12, e -> { + Draw.color(Palette.lighterOrange, Color.GRAY, e.fin()); + Lines.stroke(e.fout()); + + Angles.randLenVectors(e.id, 7, e.fin() * 7f, e.rotation, 40f, (x, y) -> { + float ang = Mathf.angle(x, y); + Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 2 + 1f); + }); + + Draw.reset(); + }); + + flakExplosion = new Effect(20, e -> { + + Draw.color(Palette.bulletYellow); + e.scaled(6, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 10f); + }); + + 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() * 3f + 0.5f); + }); + + Draw.color(Palette.lighterOrange); + 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.angle(x, y), 1f + e.fout() * 3f); + }); + + 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.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + plasticExplosionFlak = new Effect(28, e -> { + + Draw.color(Palette.plastaniumFront); + e.scaled(7, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 34f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 7, 2f + 30f * 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 + 30f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(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.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + artilleryTrail = new Effect(50, e -> { + 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(e.color); + Fill.circle(e.x, e.y, e.rotation * e.fout()); + Draw.reset(); + }); + + absorb = new Effect(12, e -> { + Draw.color(Palette.accent); + Lines.stroke(2f * e.fout()); + Lines.circle(e.x, e.y, 5f * e.fout()); + Draw.reset(); + }); + + flakExplosionBig = new Effect(30, e -> { + + Draw.color(Palette.bulletYellowBack); + e.scaled(6, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 25f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 6, 2f + 23f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); + }); + + Draw.color(Palette.bulletYellow); + 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.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + + burning = new Effect(35f, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); + + Angles.randLenVectors(e.id, 3, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.1f + e.fout() * 1.4f); + }); + + Draw.color(); + }); + + fire = new Effect(35f, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); + + Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); + }); + + Draw.color(); + }); + + fireSmoke = new Effect(35f, e -> { + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 1, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); + }); + + Draw.color(); + }); + + steam = new Effect(35f, e -> { + Draw.color(Color.LIGHT_GRAY); + + Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); + }); + + Draw.color(); + }); + + fireballsmoke = new Effect(25f, e -> { + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 1, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f); + }); + + Draw.color(); + }); + + ballfire = new Effect(25f, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); + + Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f); + }); + + Draw.color(); + }); + + freezing = new Effect(40f, e -> { + Draw.color(Liquids.cryofluid.color); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1.2f); + }); + + Draw.color(); + }); + + melting = new Effect(40f, e -> { + Draw.color(Liquids.lava.color, Color.WHITE, e.fout() / 5f + Mathf.randomSeedRange(e.id, 0.12f)); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 3f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, .2f + e.fout() * 1.2f); + }); + + Draw.color(); + }); + + wet = new Effect(40f, e -> { + Draw.color(Liquids.water.color); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1f); + }); + + Draw.color(); + }); + + oily = new Effect(42f, e -> { + Draw.color(Liquids.oil.color); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1f); + }); + + Draw.color(); + }); + + overdriven = new Effect(20f, e -> { + Draw.color(Palette.accent); + + Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { + Fill.square(e.x + x, e.y + y, e.fout() * 2.3f+0.5f); + }); + + Draw.color(); + }); + + dropItem = new Effect(20f, e -> { + float length = 20f * e.finpow(); + float size = 7f * e.fout(); + + Draw.rect(((Item) e.data).region, e.x + Angles.trnsx(e.rotation, length), e.y + Angles.trnsy(e.rotation, length), size, size); + }); + + + shockwave = new Effect(10f, 80f, e -> { + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.stroke(e.fout() * 2f + 0.2f); + Lines.circle(e.x, e.y, e.fin() * 28f); + Draw.reset(); + }); + + bigShockwave = new Effect(10f, 80f, e -> { + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.stroke(e.fout() * 3f); + Lines.circle(e.x, e.y, e.fin() * 50f); + Draw.reset(); + }); + + nuclearShockwave = new Effect(10f, 200f, e -> { + Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); + Lines.stroke(e.fout() * 3f + 0.2f); + Lines.poly(e.x, e.y, 40, e.fin() * 140f); + Draw.reset(); + }); + + explosion = new Effect(30, e -> { + e.scaled(7, i -> { + Lines.stroke(3f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 10f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); + Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); + }); + + Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin()); + Lines.stroke(1.5f * e.fout()); + + Angles.randLenVectors(e.id + 1, 8, 1f + 23f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + blockExplosion = new Effect(30, e -> { + e.scaled(7, i -> { + Lines.stroke(3.1f * i.fout()); + Lines.circle(e.x, e.y, 3f + i.fin() * 14f); + }); + + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); + Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); + }); + + Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin()); + Lines.stroke(1.7f * e.fout()); + + Angles.randLenVectors(e.id + 1, 9, 1f + 23f * e.finpow(), (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); + }); + + Draw.reset(); + }); + + blockExplosionSmoke = new Effect(30, e -> { + Draw.color(Color.GRAY); + + Angles.randLenVectors(e.id, 6, 4f + 30f * e.finpow(), (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 3f); + Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); + }); + + Draw.reset(); + }); + + + shootSmall = new Effect(8, e -> { + Draw.color(Palette.lighterOrange, Palette.lightOrange, e.fin()); + float w = 1f + 5 * e.fout(); + Shapes.tri(e.x, e.y, w, 15f * e.fout(), e.rotation); + Shapes.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f); + Draw.reset(); + }); + + shootHeal = new Effect(8, e -> { + Draw.color(Palette.heal); + float w = 1f + 5 * e.fout(); + Shapes.tri(e.x, e.y, w, 17f * e.fout(), e.rotation); + Shapes.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f); + Draw.reset(); + }); + + shootSmallSmoke = new Effect(20f, e -> { + Draw.color(Palette.lighterOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); + + Angles.randLenVectors(e.id, 5, e.finpow() * 6f, e.rotation, 20f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1.5f); + }); + + Draw.reset(); + }); + + shootBig = new Effect(9, e -> { + Draw.color(Palette.lighterOrange, Palette.lightOrange, e.fin()); + float w = 1.2f + 7 * e.fout(); + Shapes.tri(e.x, e.y, w, 25f * e.fout(), e.rotation); + Shapes.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f); + Draw.reset(); + }); + + shootBig2 = new Effect(10, e -> { + Draw.color(Palette.lightOrange, Color.GRAY, e.fin()); + float w = 1.2f + 8 * e.fout(); + Shapes.tri(e.x, e.y, w, 29f * e.fout(), e.rotation); + Shapes.tri(e.x, e.y, w, 5f * e.fout(), e.rotation + 180f); + Draw.reset(); + }); + + shootBigSmoke = new Effect(17f, e -> { + Draw.color(Palette.lighterOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); + + Angles.randLenVectors(e.id, 8, e.finpow() * 19f, e.rotation, 10f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 2f + 0.2f); + }); + + Draw.reset(); + }); + + shootBigSmoke2 = new Effect(18f, e -> { + Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); + + Angles.randLenVectors(e.id, 9, e.finpow() * 23f, e.rotation, 20f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 2.4f + 0.2f); + }); + + Draw.reset(); + }); + + shootSmallFlame = new Effect(30f, e -> { + Draw.color(Palette.lightFlame, Palette.darkFlame, Color.GRAY, e.fin()); + + Angles.randLenVectors(e.id, 8, e.finpow() * 36f, e.rotation, 10f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.5f); + }); + + Draw.reset(); + }); + + shootLiquid = new Effect(40f, e -> { + Draw.color(e.color, Color.WHITE, e.fout() / 6f + Mathf.randomSeedRange(e.id, 0.1f)); + + Angles.randLenVectors(e.id, 6, e.finpow() * 60f, e.rotation, 11f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, 0.5f + e.fout() * 2.5f); + }); + + Draw.reset(); + }); + + shellEjectSmall = new GroundEffect(30f, 400f, e -> { + Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); + float rot = Math.abs(e.rotation) + 90f; + + int i = Mathf.sign(e.rotation); + + float len = (2f + e.finpow() * 6f) * i; + float lr = rot + e.fin() * 30f * i; + Fill.rect(e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), + e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), + 1f, 2f, rot + e.fin() * 50f * i); + + Draw.color(); + }); + + shellEjectMedium = new GroundEffect(34f, 400f, e -> { + Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); + float rot = e.rotation + 90f; + for(int i : Mathf.signs){ + float len = (2f + e.finpow() * 10f) * i; + float lr = rot + e.fin() * 20f * i; + Draw.rect(Core.atlas.find("casing"), + e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), + e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), + 2f, 3f, rot); + } + + Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); + + for(int i : Mathf.signs){ + Angles.randLenVectors(e.id, 4, 1f + e.finpow() * 11f, e.rotation + 90f * i, 20f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 1.5f); + }); + } + + Draw.color(); + }); + + shellEjectBig = new GroundEffect(22f, 400f, e -> { + Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); + float rot = e.rotation + 90f; + for(int i : Mathf.signs){ + float len = (4f + e.finpow() * 8f) * i; + float lr = rot + Mathf.randomSeedRange(e.id + i + 6, 20f * e.fin()) * i; + Draw.rect(Core.atlas.find("casing"), + e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), + e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), + 2.5f, 4f, + rot + e.fin() * 30f * i + Mathf.randomSeedRange(e.id + i + 9, 40f * e.fin())); + } + + Draw.color(Color.LIGHT_GRAY); + + for(int i : Mathf.signs){ + Angles.randLenVectors(e.id, 4, -e.finpow() * 15f, e.rotation + 90f * i, 25f, (x, y) -> { + Fill.circle(e.x + x, e.y + y, e.fout() * 2f); + }); + } + + Draw.color(); + }); + + lancerLaserShoot = new Effect(21f, e -> { + Draw.color(Palette.lancerLaser); + + for(int i : Mathf.signs){ + Shapes.tri(e.x, e.y, 4f * e.fout(), 29f, e.rotation + 90f * i); + } + + Draw.reset(); + }); + + lancerLaserShootSmoke = new Effect(26f, e -> { + Draw.color(Palette.lancerLaser); + + Angles.randLenVectors(e.id, 7, 80f, e.rotation, 0f, (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fout() * 9f); + }); + + Draw.reset(); + }); + + lancerLaserCharge = new Effect(38f, e -> { + Draw.color(Palette.lancerLaser); + + Angles.randLenVectors(e.id, 2, 1f + 20f * e.fout(), e.rotation, 120f, (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 3f + 1f); + }); + + Draw.reset(); + }); + + lancerLaserChargeBegin = new Effect(71f, e -> { + Draw.color(Palette.lancerLaser); + Fill.circle(e.x, e.y, e.fin() * 3f); + + Draw.color(); + Fill.circle(e.x, e.y, e.fin() * 2f); + }); + + lightningCharge = new Effect(38f, e -> { + Draw.color(Palette.lancerLaser); + + Angles.randLenVectors(e.id, 2, 1f + 20f * e.fout(), e.rotation, 120f, (x, y) -> { + Shapes.tri(e.x + x, e.y + y, e.fslope() * 3f + 1, e.fslope() * 3f + 1, Mathf.angle(x, y)); + }); + + Draw.reset(); + }); + + lightningShoot = new Effect(12f, e -> { + Draw.color(Color.WHITE, Palette.lancerLaser, e.fin()); + Lines.stroke(e.fout() * 1.2f + 0.5f); + + Angles.randLenVectors(e.id, 7, 25f * e.finpow(), e.rotation, 50f, (x, y) -> { + Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 5f + 2f); + }); + + Draw.reset(); + }); + } + + @Override + public ContentType type(){ + return ContentType.effect; + } +} diff --git a/core/src/io/anuke/mindustry/content/Mechs.java b/core/src/io/anuke/mindustry/content/Mechs.java index 5ec66db65c..01df597434 100644 --- a/core/src/io/anuke/mindustry/content/Mechs.java +++ b/core/src/io/anuke/mindustry/content/Mechs.java @@ -9,8 +9,6 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.UnitFx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.entities.effect.Lightning; @@ -68,7 +66,7 @@ public class Mechs implements ContentList{ public void onLand(Player player){ if(player.timer.get(Player.timerAbility, cooldown)){ Effects.shake(1f, 1f, player); - Effects.effect(UnitFx.landShock, player); + Effects.effect(Fx.landShock, player); for(int i = 0; i < 8; i++){ Time.run(Mathf.random(8f), () -> Lightning.create(player.getTeam(), Palette.lancerLaser, 17f, player.x, player.y, Mathf.random(360f), 14)); } @@ -109,7 +107,7 @@ public class Mechs implements ContentList{ Units.getNearby(player.getTeam(), rect, unit -> { if(unit.dst(player) <= healRange){ if(unit.health < unit.maxHealth()){ - Effects.effect(UnitFx.heal, unit); + Effects.effect(Fx.heal, unit); wasHealed = true; } unit.healBy(healAmount); @@ -117,7 +115,7 @@ public class Mechs implements ContentList{ }); if(wasHealed){ - Effects.effect(UnitFx.healWave, player); + Effects.effect(Fx.healWave, player); } } } @@ -228,7 +226,7 @@ public class Mechs implements ContentList{ public void updateAlt(Player player){ float scl = scld(player); if(Mathf.chance(Time.delta() * (0.15*scl))){ - Effects.effect(BulletFx.hitLancer, Palette.lancerLaser, player.x, player.y); + Effects.effect(Fx.hitLancer, Palette.lancerLaser, player.x, player.y); Lightning.create(player.getTeam(), Palette.lancerLaser, 10f, player.x + player.velocity().x, player.y + player.velocity().y, player.rotation, 14); } diff --git a/core/src/io/anuke/mindustry/content/StatusEffects.java b/core/src/io/anuke/mindustry/content/StatusEffects.java index 9162d9be3a..eb37c73e11 100644 --- a/core/src/io/anuke/mindustry/content/StatusEffects.java +++ b/core/src/io/anuke/mindustry/content/StatusEffects.java @@ -3,7 +3,6 @@ package io.anuke.mindustry.content; import io.anuke.arc.entities.Effects; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.EnvironmentFx; import io.anuke.mindustry.entities.StatusController.StatusEntry; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.game.ContentList; @@ -27,7 +26,7 @@ public class StatusEffects implements ContentList{ public StatusEntry getTransition(Unit unit, StatusEffect to, float time, float newTime, StatusEntry result){ if(to == tarred){ unit.damage(1f); - Effects.effect(EnvironmentFx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); return result.set(this, Math.min(time + newTime, baseDuration + tarred.baseDuration)); } @@ -39,7 +38,7 @@ public class StatusEffects implements ContentList{ unit.damagePeriodic(0.04f); if(Mathf.chance(Time.delta() * 0.2f)){ - Effects.effect(EnvironmentFx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.burning, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } }; @@ -55,7 +54,7 @@ public class StatusEffects implements ContentList{ public void update(Unit unit, float time){ if(Mathf.chance(Time.delta() * 0.15f)){ - Effects.effect(EnvironmentFx.freezing, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.freezing, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } }; @@ -80,7 +79,7 @@ public class StatusEffects implements ContentList{ @Override public void update(Unit unit, float time){ if(Mathf.chance(Time.delta() * 0.15f)){ - Effects.effect(EnvironmentFx.wet, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.wet, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } }; @@ -106,7 +105,7 @@ public class StatusEffects implements ContentList{ unit.damagePeriodic(0.3f); if(Mathf.chance(Time.delta() * 0.2f)){ - Effects.effect(EnvironmentFx.melting, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.melting, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } }; @@ -119,7 +118,7 @@ public class StatusEffects implements ContentList{ @Override public void update(Unit unit, float time){ if(Mathf.chance(Time.delta() * 0.15f)){ - Effects.effect(EnvironmentFx.oily, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); + Effects.effect(Fx.oily, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f)); } } @@ -146,7 +145,7 @@ public class StatusEffects implements ContentList{ unit.health += 0.01f * Time.delta(); if(Mathf.chance(Time.delta() * 0.25f)){ - Effects.effect(EnvironmentFx.overdriven, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f), 0f, unit); + Effects.effect(Fx.overdriven, unit.x + Mathf.range(unit.getSize() / 2f), unit.y + Mathf.range(unit.getSize() / 2f), 0f, unit); } } }; diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index 20fa1f5804..e731067a45 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -1,7 +1,5 @@ package io.anuke.mindustry.content; -import io.anuke.mindustry.content.fx.Fx; -import io.anuke.mindustry.content.fx.ShootFx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.Weapon; @@ -17,7 +15,7 @@ public class Weapons implements ContentList{ length = 1.5f; reload = 14f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardMechSmall; }}; @@ -25,7 +23,7 @@ public class Weapons implements ContentList{ length = 1.5f; reload = 15f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardCopper; }}; @@ -33,7 +31,7 @@ public class Weapons implements ContentList{ length = 1.5f; reload = 10f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardGlaive; }}; @@ -42,7 +40,7 @@ public class Weapons implements ContentList{ reload = 25f; width = 1f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardCopper; }}; @@ -84,7 +82,7 @@ public class Weapons implements ContentList{ length = 1.5f; reload = 28f; roundrobin = true; - ejectEffect = ShootFx.shellEjectSmall; + ejectEffect = Fx.shellEjectSmall; ammo = Bullets.standardCopper; }}; @@ -107,7 +105,7 @@ public class Weapons implements ContentList{ inaccuracy = 3f; recoil = 3f; velocityRnd = 0.1f; - ejectEffect = ShootFx.shellEjectMedium; + ejectEffect = Fx.shellEjectMedium; ammo = Bullets.artilleryDense; }}; @@ -126,7 +124,7 @@ public class Weapons implements ContentList{ roundrobin = true; recoil = 5f; shake = 2f; - ejectEffect = ShootFx.shellEjectMedium; + ejectEffect = Fx.shellEjectMedium; ammo = Bullets.artilleryUnit; }}; diff --git a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java index 0933c8a0fb..034480bdcf 100644 --- a/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/CraftingBlocks.java @@ -3,7 +3,7 @@ package io.anuke.mindustry.content.blocks; import io.anuke.arc.graphics.Color; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.type.ItemStack; import io.anuke.mindustry.world.Block; @@ -29,7 +29,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ arcsmelter = new PowerSmelter("arc-smelter"){{ health = 90; - craftEffect = BlockFx.smeltsmoke; + craftEffect = Fx.smeltsmoke; result = Items.densealloy; craftTime = 30f; size = 2; @@ -43,7 +43,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ siliconsmelter = new PowerSmelter("silicon-smelter"){{ health = 90; - craftEffect = BlockFx.smeltsmoke; + craftEffect = Fx.smeltsmoke; result = Items.silicon; craftTime = 40f; size = 2; @@ -63,8 +63,8 @@ public class CraftingBlocks extends BlockList implements ContentList{ size = 2; health = 320; hasPower = hasLiquids = true; - craftEffect = BlockFx.formsmoke; - updateEffect = BlockFx.plasticburn; + craftEffect = Fx.formsmoke; + updateEffect = Fx.plasticburn; consumes.liquid(Liquids.oil, 0.25f); consumes.power(0.3f); @@ -72,7 +72,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ }}; phaseWeaver = new PhaseWeaver("phase-weaver"){{ - craftEffect = BlockFx.smeltsmoke; + craftEffect = Fx.smeltsmoke; result = Items.phasefabric; craftTime = 120f; size = 2; @@ -82,7 +82,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ }}; alloySmelter = new PowerSmelter("alloy-smelter"){{ - craftEffect = BlockFx.smeltsmoke; + craftEffect = Fx.smeltsmoke; result = Items.surgealloy; craftTime = 75f; size = 2; @@ -207,9 +207,9 @@ public class CraftingBlocks extends BlockList implements ContentList{ itemCapacity = 40; output = Items.sand; health = 80; - craftEffect = BlockFx.pulverize; + craftEffect = Fx.pulverize; craftTime = 40f; - updateEffect = BlockFx.pulverizeSmall; + updateEffect = Fx.pulverizeSmall; hasItems = hasPower = true; consumes.item(Items.stone, 1); @@ -222,7 +222,7 @@ public class CraftingBlocks extends BlockList implements ContentList{ output = Items.stone; itemCapacity = 20; health = 80; - craftEffect = BlockFx.purifystone; + craftEffect = Fx.purifystone; hasLiquids = hasItems = true; consumes.liquid(Liquids.lava, 1f); diff --git a/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java b/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java index 9f67d7fe7f..84e48c3207 100644 --- a/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/DefenseBlocks.java @@ -1,7 +1,7 @@ package io.anuke.mindustry.content.blocks; import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.defense.*; @@ -64,8 +64,8 @@ public class DefenseBlocks extends BlockList implements ContentList{ }}; doorLarge = new Door("door-large"){{ - openfx = BlockFx.dooropenlarge; - closefx = BlockFx.doorcloselarge; + openfx = Fx.dooropenlarge; + closefx = Fx.doorcloselarge; health = 100 * 4 * wallHealthMultiplier; size = 2; }}; diff --git a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java b/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java index 843541ca64..af35629803 100644 --- a/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/PowerBlocks.java @@ -1,10 +1,9 @@ package io.anuke.mindustry.content.blocks; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; -import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.blocks.power.*; public class PowerBlocks extends BlockList implements ContentList{ @@ -21,7 +20,7 @@ public class PowerBlocks extends BlockList implements ContentList{ thermalGenerator = new LiquidHeatGenerator("thermal-generator"){{ maxLiquidGenerate = 2f; powerProduction = 2f; - generateEffect = BlockFx.redgeneratespark; + generateEffect = Fx.redgeneratespark; size = 2; }}; diff --git a/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java b/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java index 101db89ec7..30a5f8f5a5 100644 --- a/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/ProductionBlocks.java @@ -3,7 +3,7 @@ package io.anuke.mindustry.content.blocks; import io.anuke.arc.graphics.Color; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.production.Cultivator; @@ -35,8 +35,8 @@ public class ProductionBlocks extends BlockList implements ContentList{ size = 2; hasPower = true; tier = 4; - updateEffect = BlockFx.pulverizeMedium; - drillEffect = BlockFx.mineBig; + updateEffect = Fx.pulverizeMedium; + drillEffect = Fx.mineBig; consumes.power(0.11f); }}; @@ -47,9 +47,9 @@ public class ProductionBlocks extends BlockList implements ContentList{ drawRim = true; hasPower = true; tier = 5; - updateEffect = BlockFx.pulverizeRed; + updateEffect = Fx.pulverizeRed; updateEffectChance = 0.03f; - drillEffect = BlockFx.mineHuge; + drillEffect = Fx.mineHuge; rotateSpeed = 6f; warmupSpeed = 0.01f; @@ -65,9 +65,9 @@ public class ProductionBlocks extends BlockList implements ContentList{ tier = 5; rotateSpeed = 9f; drawRim = true; - updateEffect = BlockFx.pulverizeRedder; + updateEffect = Fx.pulverizeRedder; updateEffectChance = 0.04f; - drillEffect = BlockFx.mineHuge; + drillEffect = Fx.mineHuge; warmupSpeed = 0.005f; consumes.power(0.7f); @@ -85,7 +85,7 @@ public class ProductionBlocks extends BlockList implements ContentList{ oilExtractor = new Fracker("oil-extractor"){{ result = Liquids.oil; - updateEffect = BlockFx.pulverize; + updateEffect = Fx.pulverize; liquidCapacity = 50f; updateEffectChance = 0.05f; pumpAmount = 0.09f; diff --git a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java index f1a7ac794b..dd963b0a6e 100644 --- a/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java +++ b/core/src/io/anuke/mindustry/content/blocks/TurretBlocks.java @@ -5,7 +5,7 @@ import io.anuke.arc.graphics.g2d.Draw; import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.ShootFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.ContentList; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.blocks.defense.turrets.*; @@ -27,7 +27,7 @@ public class TurretBlocks extends BlockList implements ContentList{ restitution = 0.03f; range = 90f; shootCone = 15f; - ammoUseEffect = ShootFx.shellEjectSmall; + ammoUseEffect = Fx.shellEjectSmall; health = 80; inaccuracy = 2f; rotatespeed = 10f; @@ -52,7 +52,7 @@ public class TurretBlocks extends BlockList implements ContentList{ recoil = 0f; reload = 4f; shootCone = 50f; - ammoUseEffect = ShootFx.shellEjectSmall; + ammoUseEffect = Fx.shellEjectSmall; health = 160; }}; @@ -68,7 +68,7 @@ public class TurretBlocks extends BlockList implements ContentList{ reload = 4f; inaccuracy = 5f; shootCone = 50f; - shootEffect = ShootFx.shootLiquid; + shootEffect = Fx.shootLiquid; range = 90f; health = 360; @@ -94,10 +94,10 @@ public class TurretBlocks extends BlockList implements ContentList{ powerUsed = 1 / 3f; consumes.powerBuffered(60f); shootShake = 2f; - shootEffect = ShootFx.lancerLaserShoot; - smokeEffect = ShootFx.lancerLaserShootSmoke; - chargeEffect = ShootFx.lancerLaserCharge; - chargeBeginEffect = ShootFx.lancerLaserChargeBegin; + shootEffect = Fx.lancerLaserShoot; + smokeEffect = Fx.lancerLaserShootSmoke; + chargeEffect = Fx.lancerLaserCharge; + chargeBeginEffect = Fx.lancerLaserChargeBegin; heatColor = Color.RED; size = 2; health = 320; @@ -113,7 +113,7 @@ public class TurretBlocks extends BlockList implements ContentList{ powerUsed = 1f / 3f; consumes.powerBuffered(30f); range = 150f; - shootEffect = ShootFx.lightningShoot; + shootEffect = Fx.lightningShoot; heatColor = Color.RED; recoil = 1f; size = 1; @@ -154,7 +154,7 @@ public class TurretBlocks extends BlockList implements ContentList{ shootShake = 2f; burstSpacing = 4; shots = 3; - ammoUseEffect = ShootFx.shellEjectBig; + ammoUseEffect = Fx.shellEjectBig; health = 360; }}; @@ -171,7 +171,7 @@ public class TurretBlocks extends BlockList implements ContentList{ inaccuracy = 12f; reload = 60f; ammoEjectBack = 5f; - ammoUseEffect = ShootFx.shellEjectBig; + ammoUseEffect = Fx.shellEjectBig; cooldown = 0.03f; velocityInaccuracy = 0.2f; restitution = 0.02f; @@ -222,7 +222,7 @@ public class TurretBlocks extends BlockList implements ContentList{ coolantMultiplier = 0.5f; maxCoolantUsed = 1.5f; restitution = 0.1f; - ammoUseEffect = ShootFx.shellEjectBig; + ammoUseEffect = Fx.shellEjectBig; range = 200f; inaccuracy = 3f; recoil = 3f; @@ -238,7 +238,7 @@ public class TurretBlocks extends BlockList implements ContentList{ meltdown = new LaserTurret("meltdown"){{ shootType = Bullets.meltdownLaser; - shootEffect = ShootFx.shootBigSmoke2; + shootEffect = Fx.shootBigSmoke2; shootCone = 40f; recoil = 4f; size = 4; diff --git a/core/src/io/anuke/mindustry/content/fx/BlockFx.java b/core/src/io/anuke/mindustry/content/fx/BlockFx.java deleted file mode 100644 index 106582a241..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/BlockFx.java +++ /dev/null @@ -1,330 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; -import io.anuke.arc.util.Tmp; - -import static io.anuke.mindustry.Vars.tilesize; - -public class BlockFx extends FxList implements ContentList{ - public static Effect reactorsmoke, nuclearsmoke, nuclearcloud, redgeneratespark, generatespark, fuelburn, plasticburn, - pulverize, pulverizeRed, pulverizeRedder, pulverizeSmall, pulverizeMedium, producesmoke, smeltsmoke, formsmoke, blastsmoke, - lava, dooropen, doorclose, dooropenlarge, doorcloselarge, purify, purifyoil, purifystone, generate, mine, mineBig, mineHuge, - smelt, teleportActivate, teleport, teleportOut, ripple, bubble, commandSend, healBlock, healBlockFull, healWaveMend, overdriveWave, - overdriveBlockFull, shieldBreak; - - @Override - public void load(){ - - reactorsmoke = new Effect(17, e -> { - Angles.randLenVectors(e.id, 4, e.fin() * 8f, (x, y) -> { - float size = 1f + e.fout() * 5f; - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - nuclearsmoke = new Effect(40, e -> { - Angles.randLenVectors(e.id, 4, e.fin() * 13f, (x, y) -> { - float size = e.fslope() * 4f; - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - nuclearcloud = new Effect(90, 200f, e -> { - Angles.randLenVectors(e.id, 10, e.finpow() * 90f, (x, y) -> { - float size = e.fout() * 14f; - Draw.color(Color.LIME, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - redgeneratespark = new Effect(18, e -> { - Angles.randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> { - float len = e.fout() * 4f; - Draw.color(Palette.redSpark, Color.GRAY, e.fin()); - //Draw.alpha(e.fout()); - Draw.rect("circle", e.x + x, e.y + y, len, len); - Draw.reset(); - }); - }); - generatespark = new Effect(18, e -> { - Angles.randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> { - float len = e.fout() * 4f; - Draw.color(Palette.orangeSpark, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, len, len); - Draw.reset(); - }); - }); - fuelburn = new Effect(23, e -> { - Angles.randLenVectors(e.id, 5, e.fin() * 9f, (x, y) -> { - float len = e.fout() * 4f; - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, len, len); - Draw.reset(); - }); - }); - plasticburn = new Effect(40, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 5f, (x, y) -> { - Draw.color(Color.valueOf("e9ead3"), Color.GRAY, e.fin()); - Fill.circle(e.x + x, e.y + y, e.fout() * 1f); - Draw.reset(); - }); - }); - pulverize = new Effect(40, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { - Draw.color(Palette.stoneGray); - Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); - Draw.reset(); - }); - }); - pulverizeRed = new Effect(40, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { - Draw.color(Palette.redDust, Palette.stoneGray, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); - Draw.reset(); - }); - }); - pulverizeRedder = new Effect(40, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 9f, (x, y) -> { - Draw.color(Palette.redderDust, Palette.stoneGray, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2.5f + 0.5f, 45); - Draw.reset(); - }); - }); - pulverizeSmall = new Effect(30, e -> { - Angles.randLenVectors(e.id, 3, e.fin() * 5f, (x, y) -> { - Draw.color(Palette.stoneGray); - Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45); - Draw.reset(); - }); - }); - pulverizeMedium = new Effect(30, e -> { - Angles.randLenVectors(e.id, 5, 3f + e.fin() * 8f, (x, y) -> { - Draw.color(Palette.stoneGray); - Fill.square(e.x + x, e.y + y, e.fout() * 1f + 0.5f, 45); - Draw.reset(); - }); - }); - producesmoke = new Effect(12, e -> { - Angles.randLenVectors(e.id, 8, 4f + e.fin() * 18f, (x, y) -> { - Draw.color(Color.WHITE, Palette.accent, e.fin()); - Fill.square(e.x + x, e.y + y, 1f + e.fout() * 3f, 45); - Draw.reset(); - }); - }); - smeltsmoke = new Effect(15, e -> { - Angles.randLenVectors(e.id, 6, 4f + e.fin() * 5f, (x, y) -> { - Draw.color(Color.WHITE, e.color, e.fin()); - Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45); - Draw.reset(); - }); - }); - formsmoke = new Effect(40, e -> { - Angles.randLenVectors(e.id, 6, 5f + e.fin() * 8f, (x, y) -> { - Draw.color(Palette.plasticSmoke, Color.LIGHT_GRAY, e.fin()); - Fill.square(e.x + x, e.y + y, 0.2f + e.fout() * 2f, 45); - Draw.reset(); - }); - }); - blastsmoke = new Effect(26, e -> { - Angles.randLenVectors(e.id, 12, 1f + e.fin() * 23f, (x, y) -> { - float size = 2f + e.fout() * 6f; - Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - lava = new Effect(18, e -> { - Angles.randLenVectors(e.id, 3, 1f + e.fin() * 10f, (x, y) -> { - float size = e.fslope() * 4f; - Draw.color(Color.ORANGE, Color.GRAY, e.fin()); - Draw.rect("circle", e.x + x, e.y + y, size, size); - Draw.reset(); - }); - }); - dooropen = new Effect(10, e -> { - Lines.stroke(e.fout() * 1.6f); - Lines.square(e.x, e.y, tilesize / 2f + e.fin() * 2f); - Draw.reset(); - }); - doorclose = new Effect(10, e -> { - Lines.stroke(e.fout() * 1.6f); - Lines.square(e.x, e.y, tilesize / 2f + e.fout() * 2f); - Draw.reset(); - }); - dooropenlarge = new Effect(10, e -> { - Lines.stroke(e.fout() * 1.6f); - Lines.square(e.x, e.y, tilesize + e.fin() * 2f); - Draw.reset(); - }); - doorcloselarge = new Effect(10, e -> { - Lines.stroke(e.fout() * 1.6f); - Lines.square(e.x, e.y, tilesize + e.fout() * 2f); - Draw.reset(); - }); - purify = new Effect(10, e -> { - Draw.color(Color.ROYAL, Color.GRAY, e.fin()); - Lines.stroke(2f); - Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); - Draw.reset(); - }); - purifyoil = new Effect(10, e -> { - Draw.color(Color.BLACK, Color.GRAY, e.fin()); - Lines.stroke(2f); - Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); - Draw.reset(); - }); - purifystone = new Effect(10, e -> { - Draw.color(Color.ORANGE, Color.GRAY, e.fin()); - Lines.stroke(2f); - Lines.spikes(e.x, e.y, e.fin() * 4f, 2, 6); - Draw.reset(); - }); - generate = new Effect(11, e -> { - Draw.color(Color.ORANGE, Color.YELLOW, e.fin()); - Lines.stroke(1f); - Lines.spikes(e.x, e.y, e.fin() * 5f, 2, 8); - Draw.reset(); - }); - mine = new Effect(20, e -> { - Angles.randLenVectors(e.id, 6, 3f + e.fin() * 6f, (x, y) -> { - Draw.color(e.color, Color.LIGHT_GRAY, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2f, 45); - Draw.reset(); - }); - }); - mineBig = new Effect(30, e -> { - Angles.randLenVectors(e.id, 6, 4f + e.fin() * 8f, (x, y) -> { - Draw.color(e.color, Color.LIGHT_GRAY, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.2f, 45); - Draw.reset(); - }); - }); - mineHuge = new Effect(40, e -> { - Angles.randLenVectors(e.id, 8, 5f + e.fin() * 10f, (x, y) -> { - Draw.color(e.color, Color.LIGHT_GRAY, e.fin()); - Fill.square(e.x + x, e.y + y, e.fout() * 2f + 0.5f, 45); - Draw.reset(); - }); - }); - smelt = new Effect(20, e -> { - Angles.randLenVectors(e.id, 6, 2f + e.fin() * 5f, (x, y) -> { - Draw.color(Color.WHITE, e.color, e.fin()); - Fill.square(e.x + x, e.y + y, 0.5f + e.fout() * 2f, 45); - Draw.reset(); - }); - }); - teleportActivate = new Effect(50, e -> { - Draw.color(e.color); - - e.scaled(8f, e2 -> { - Lines.stroke(e2.fout() * 4f); - Lines.circle(e2.x, e2.y, 4f + e2.fin() * 27f); - }); - - Lines.stroke(e.fout() * 2f); - - Angles.randLenVectors(e.id, 30, 4f + 40f * e.fin(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 4f + 1f); - }); - - Draw.reset(); - }); - teleport = new Effect(60, e -> { - Draw.color(e.color); - Lines.stroke(e.fin() * 2f); - Lines.circle(e.x, e.y, 7f + e.fout() * 8f); - - Angles.randLenVectors(e.id, 20, 6f + 20f * e.fout(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 4f + 1f); - }); - - Draw.reset(); - }); - teleportOut = new Effect(20, e -> { - Draw.color(e.color); - Lines.stroke(e.fout() * 2f); - Lines.circle(e.x, e.y, 7f + e.fin() * 8f); - - Angles.randLenVectors(e.id, 20, 4f + 20f * e.fin(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 4f + 1f); - }); - - Draw.reset(); - }); - ripple = new GroundEffect(false, 30, e -> { - Draw.color(Tmp.c1.set(e.color).shiftValue(0.1f)); - Lines.stroke(e.fout() + 0.4f); - Lines.circle(e.x, e.y, 2f + e.fin() * 4f); - Draw.reset(); - }); - - bubble = new Effect(20, e -> { - Draw.color(Tmp.c1.set(e.color).shiftValue(0.1f)); - Lines.stroke(e.fout() + 0.2f); - Angles.randLenVectors(e.id, 2, 8f, (x, y) -> { - Lines.circle(e.x + x, e.y + y, 1f + e.fin() * 3f); - }); - Draw.reset(); - }); - - commandSend = new Effect(28, e -> { - Draw.color(Palette.command); - Lines.stroke(e.fout() * 2f); - Lines.poly(e.x, e.y, 40, 4f + e.finpow() * 120f); - Draw.color(); - }); - - healWaveMend = new Effect(40, e -> { - Draw.color(e.color); - Lines.stroke(e.fout() * 2f); - Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation); - Draw.color(); - }); - - overdriveWave = new Effect(50, e -> { - Draw.color(e.color); - Lines.stroke(e.fout() * 1f); - Lines.poly(e.x, e.y, 30, e.finpow() * e.rotation); - Draw.color(); - }); - - healBlock = new Effect(20, e -> { - Draw.color(Palette.heal); - Lines.stroke(2f * e.fout() + 0.5f); - Lines.square(e.x, e.y, 1f + (e.fin() * e.rotation * tilesize/2f-1f)); - Draw.color(); - }); - - healBlockFull = new Effect(20, e -> { - Draw.color(e.color); - Draw.alpha(e.fout()); - Fill.square(e.x, e.y, e.rotation * tilesize / 2f); - Draw.color(); - }); - - overdriveBlockFull = new Effect(60, e -> { - Draw.color(e.color); - Draw.alpha(e.fslope() * 0.4f); - Fill.square(e.x, e.y, e.rotation * tilesize); - Draw.color(); - }); - - shieldBreak = new Effect(40, e -> { - Draw.color(Palette.accent); - Lines.stroke(3f * e.fout()); - Lines.poly(e.x, e.y, 6, e.rotation + e.fin(), 90); - Draw.reset(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/BulletFx.java b/core/src/io/anuke/mindustry/content/fx/BulletFx.java deleted file mode 100644 index 3c6441b876..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/BulletFx.java +++ /dev/null @@ -1,281 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; - -public class BulletFx extends FxList implements ContentList{ - public static Effect hitBulletSmall, hitFuse, hitBulletBig, hitFlameSmall, hitLiquid, hitLaser, hitLancer, hitMeltdown, despawn, flakExplosion, blastExplosion, plasticExplosion, - artilleryTrail, incendTrail, missileTrail, absorb, flakExplosionBig, plasticExplosionFlak; - - @Override - public void load(){ - - hitBulletSmall = new Effect(14, e -> { - Draw.color(Color.WHITE, Palette.lightOrange, e.fin()); - - e.scaled(7f, s -> { - Lines.stroke(0.5f + s.fout()); - Lines.circle(e.x, e.y, s.fin()*5f); - }); - - - Lines.stroke(0.5f + e.fout()); - - Angles.randLenVectors(e.id, 5, e.fin() * 15f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); - }); - - Draw.reset(); - }); - - hitFuse = new Effect(14, e -> { - Draw.color(Color.WHITE, Palette.surge, e.fin()); - - e.scaled(7f, s -> { - Lines.stroke(0.5f + s.fout()); - Lines.circle(e.x, e.y, s.fin()*7f); - }); - - - Lines.stroke(0.5f + e.fout()); - - Angles.randLenVectors(e.id, 6, e.fin() * 15f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); - }); - - Draw.reset(); - }); - - hitBulletBig = new Effect(13, e -> { - Draw.color(Color.WHITE, Palette.lightOrange, e.fin()); - Lines.stroke(0.5f + e.fout() * 1.5f); - - Angles.randLenVectors(e.id, 8, e.finpow() * 30f, e.rotation, 50f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1.5f); - }); - - Draw.reset(); - }); - - hitFlameSmall = new Effect(14, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); - Lines.stroke(0.5f + e.fout()); - - Angles.randLenVectors(e.id, 5, e.fin() * 15f, e.rotation, 50f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 3 + 1f); - }); - - Draw.reset(); - }); - - hitLiquid = new Effect(16, e -> { - Draw.color(e.color); - - Angles.randLenVectors(e.id, 5, e.fin() * 15f, e.rotation + 180f, 60f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 2f); - }); - - Draw.reset(); - }); - - hitLancer = new Effect(12, e -> { - Draw.color(Color.WHITE); - Lines.stroke(e.fout() * 1.5f); - - Angles.randLenVectors(e.id, 8, e.finpow() * 17f, e.rotation, 360f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f); - }); - - Draw.reset(); - }); - - hitMeltdown = new Effect(12, e -> { - Draw.color(Palette.meltdownHit); - Lines.stroke(e.fout() * 2f); - - Angles.randLenVectors(e.id, 6, e.finpow() * 18f, e.rotation, 360f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 4 + 1f); - }); - - Draw.reset(); - }); - - hitLaser = new Effect(8, e -> { - Draw.color(Color.WHITE, Palette.heal, e.fin()); - Lines.stroke(0.5f + e.fout()); - Lines.circle(e.x, e.y, e.fin()*5f); - Draw.reset(); - }); - - despawn = new Effect(12, e -> { - Draw.color(Palette.lighterOrange, Color.GRAY, e.fin()); - Lines.stroke(e.fout()); - - Angles.randLenVectors(e.id, 7, e.fin() * 7f, e.rotation, 40f, (x, y) -> { - float ang = Mathf.angle(x, y); - Lines.lineAngle(e.x + x, e.y + y, ang, e.fout() * 2 + 1f); - }); - - Draw.reset(); - }); - - flakExplosion = new Effect(20, e -> { - - Draw.color(Palette.bulletYellow); - e.scaled(6, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 10f); - }); - - 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() * 3f + 0.5f); - }); - - Draw.color(Palette.lighterOrange); - 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.angle(x, y), 1f + e.fout() * 3f); - }); - - 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.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - plasticExplosionFlak = new Effect(28, e -> { - - Draw.color(Palette.plastaniumFront); - e.scaled(7, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 34f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 7, 2f + 30f * 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 + 30f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(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.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - artilleryTrail = new Effect(50, e -> { - 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(e.color); - Fill.circle(e.x, e.y, e.rotation * e.fout()); - Draw.reset(); - }); - - absorb = new Effect(12, e -> { - Draw.color(Palette.accent); - Lines.stroke(2f * e.fout()); - Lines.circle(e.x, e.y, 5f * e.fout()); - Draw.reset(); - }); - - flakExplosionBig = new Effect(30, e -> { - - Draw.color(Palette.bulletYellowBack); - e.scaled(6, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 25f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 6, 2f + 23f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.5f); - }); - - Draw.color(Palette.bulletYellow); - 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.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - } - -} diff --git a/core/src/io/anuke/mindustry/content/fx/EnvironmentFx.java b/core/src/io/anuke/mindustry/content/fx/EnvironmentFx.java deleted file mode 100644 index 16b3c5e85a..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/EnvironmentFx.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.Color; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.type.Item; - -public class EnvironmentFx extends FxList implements ContentList{ - public static Effect burning, fire, smoke, steam, fireballsmoke, ballfire, freezing, melting, wet, oily, overdriven, dropItem; - - @Override - public void load(){ - - burning = new Effect(35f, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); - - Angles.randLenVectors(e.id, 3, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.1f + e.fout() * 1.4f); - }); - - Draw.color(); - }); - - fire = new Effect(35f, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); - - Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); - }); - - Draw.color(); - }); - - smoke = new Effect(35f, e -> { - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 1, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); - }); - - Draw.color(); - }); - - steam = new Effect(35f, e -> { - Draw.color(Color.LIGHT_GRAY); - - Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fslope() * 1.5f); - }); - - Draw.color(); - }); - - fireballsmoke = new Effect(25f, e -> { - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 1, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f); - }); - - Draw.color(); - }); - - ballfire = new Effect(25f, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, e.fin()); - - Angles.randLenVectors(e.id, 2, 2f + e.fin() * 7f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.2f + e.fout() * 1.5f); - }); - - Draw.color(); - }); - - freezing = new Effect(40f, e -> { - Draw.color(Liquids.cryofluid.color); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1.2f); - }); - - Draw.color(); - }); - - melting = new Effect(40f, e -> { - Draw.color(Liquids.lava.color, Color.WHITE, e.fout() / 5f + Mathf.randomSeedRange(e.id, 0.12f)); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 3f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, .2f + e.fout() * 1.2f); - }); - - Draw.color(); - }); - - wet = new Effect(40f, e -> { - Draw.color(Liquids.water.color); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1f); - }); - - Draw.color(); - }); - - oily = new Effect(42f, e -> { - Draw.color(Liquids.oil.color); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1f); - }); - - Draw.color(); - }); - - overdriven = new Effect(20f, e -> { - Draw.color(Palette.accent); - - Angles.randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> { - Fill.square(e.x + x, e.y + y, e.fout() * 2.3f+0.5f); - }); - - Draw.color(); - }); - - dropItem = new Effect(20f, e -> { - float length = 20f * e.finpow(); - float size = 7f * e.fout(); - - Draw.rect(((Item) e.data).region, e.x + Angles.trnsx(e.rotation, length), e.y + Angles.trnsy(e.rotation, length), size, size); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/ExplosionFx.java b/core/src/io/anuke/mindustry/content/fx/ExplosionFx.java deleted file mode 100644 index 6d823b0e48..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/ExplosionFx.java +++ /dev/null @@ -1,97 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; - -public class ExplosionFx extends FxList implements ContentList{ - public static Effect shockwave, bigShockwave, nuclearShockwave, explosion, blockExplosion, blockExplosionSmoke; - - @Override - public void load(){ - - shockwave = new Effect(10f, 80f, e -> { - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); - Lines.stroke(e.fout() * 2f + 0.2f); - Lines.circle(e.x, e.y, e.fin() * 28f); - Draw.reset(); - }); - - bigShockwave = new Effect(10f, 80f, e -> { - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); - Lines.stroke(e.fout() * 3f); - Lines.circle(e.x, e.y, e.fin() * 50f); - Draw.reset(); - }); - - nuclearShockwave = new Effect(10f, 200f, e -> { - Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fin()); - Lines.stroke(e.fout() * 3f + 0.2f); - Lines.poly(e.x, e.y, 40, e.fin() * 140f); - Draw.reset(); - }); - - explosion = new Effect(30, e -> { - e.scaled(7, i -> { - Lines.stroke(3f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 10f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); - Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); - }); - - Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin()); - Lines.stroke(1.5f * e.fout()); - - Angles.randLenVectors(e.id + 1, 8, 1f + 23f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - blockExplosion = new Effect(30, e -> { - e.scaled(7, i -> { - Lines.stroke(3.1f * i.fout()); - Lines.circle(e.x, e.y, 3f + i.fin() * 14f); - }); - - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 6, 2f + 19f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 3f + 0.5f); - Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); - }); - - Draw.color(Palette.lighterOrange, Palette.lightOrange, Color.GRAY, e.fin()); - Lines.stroke(1.7f * e.fout()); - - Angles.randLenVectors(e.id + 1, 9, 1f + 23f * e.finpow(), (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), 1f + e.fout() * 3f); - }); - - Draw.reset(); - }); - - blockExplosionSmoke = new Effect(30, e -> { - Draw.color(Color.GRAY); - - Angles.randLenVectors(e.id, 6, 4f + 30f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 3f); - Fill.circle(e.x + x / 2f, e.y + y / 2f, e.fout() * 1f); - }); - - Draw.reset(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/Fx.java b/core/src/io/anuke/mindustry/content/fx/Fx.java deleted file mode 100644 index e544459e79..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/Fx.java +++ /dev/null @@ -1,69 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; - -import static io.anuke.mindustry.Vars.tilesize; - -public class Fx extends FxList implements ContentList{ - public static Effect none, placeBlock, breakBlock, smoke, spawn, tapBlock, select; - - @Override - public void load(){ - - none = new Effect(0, 0f, e -> { - }); - - placeBlock = new Effect(16, e -> { - Draw.color(Palette.accent); - Lines.stroke(3f - e.fin() * 2f); - Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f); - Draw.reset(); - }); - - tapBlock = new Effect(12, e -> { - Draw.color(Palette.accent); - Lines.stroke(3f - e.fin() * 2f); - Lines.circle(e.x, e.y, 4f + (tilesize / 1.5f * e.rotation) * e.fin()); - Draw.reset(); - }); - - breakBlock = new Effect(12, e -> { - Draw.color(Palette.remove); - Lines.stroke(3f - e.fin() * 2f); - Lines.square(e.x, e.y, tilesize / 2f * e.rotation + e.fin() * 3f); - - Angles.randLenVectors(e.id, 3 + (int) (e.rotation * 3), e.rotation * 2f + (tilesize * e.rotation) * e.finpow(), (x, y) -> { - Fill.square(e.x + x, e.y + y, 1f + e.fout() * (3f + e.rotation)); - }); - Draw.reset(); - }); - - select = new Effect(23, e -> { - Draw.color(Palette.accent); - Lines.stroke(e.fout() * 3f); - Lines.circle(e.x, e.y, 3f + e.fin() * 14f); - Draw.reset(); - }); - - smoke = new Effect(100, e -> { - Draw.color(Color.GRAY, Palette.darkishGray, e.fin()); - float size = 7f - e.fin() * 7f; - Draw.rect("circle", e.x, e.y, size, size); - Draw.reset(); - }); - - spawn = new Effect(23, e -> { - Lines.stroke(2f * e.fout()); - Draw.color(Palette.accent); - Lines.poly(e.x, e.y, 4, 3f + e.fin() * 8f); - Draw.reset(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/FxList.java b/core/src/io/anuke/mindustry/content/fx/FxList.java deleted file mode 100644 index 3809d32391..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/FxList.java +++ /dev/null @@ -1,12 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.type.ContentType; - -public abstract class FxList implements ContentList{ - - @Override - public ContentType type(){ - return ContentType.effect; - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/ShootFx.java b/core/src/io/anuke/mindustry/content/fx/ShootFx.java deleted file mode 100644 index 39b96c6161..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/ShootFx.java +++ /dev/null @@ -1,225 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.arc.Core; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.Color; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect; -import io.anuke.mindustry.game.ContentList; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.graphics.Shapes; - -public class ShootFx extends FxList implements ContentList{ - public static Effect shootSmall, shootHeal, shootSmallSmoke, shootBig, shootBig2, shootBigSmoke, shootBigSmoke2, shootSmallFlame, shootLiquid, shellEjectSmall, shellEjectMedium, shellEjectBig, lancerLaserShoot, lancerLaserShootSmoke, lancerLaserCharge, lancerLaserChargeBegin, lightningCharge, lightningShoot; - - @Override - public void load(){ - - shootSmall = new Effect(8, e -> { - Draw.color(Palette.lighterOrange, Palette.lightOrange, e.fin()); - float w = 1f + 5 * e.fout(); - Shapes.tri(e.x, e.y, w, 15f * e.fout(), e.rotation); - Shapes.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f); - Draw.reset(); - }); - - shootHeal = new Effect(8, e -> { - Draw.color(Palette.heal); - float w = 1f + 5 * e.fout(); - Shapes.tri(e.x, e.y, w, 17f * e.fout(), e.rotation); - Shapes.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f); - Draw.reset(); - }); - - shootSmallSmoke = new Effect(20f, e -> { - Draw.color(Palette.lighterOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); - - Angles.randLenVectors(e.id, 5, e.finpow() * 6f, e.rotation, 20f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1.5f); - }); - - Draw.reset(); - }); - - shootBig = new Effect(9, e -> { - Draw.color(Palette.lighterOrange, Palette.lightOrange, e.fin()); - float w = 1.2f + 7 * e.fout(); - Shapes.tri(e.x, e.y, w, 25f * e.fout(), e.rotation); - Shapes.tri(e.x, e.y, w, 4f * e.fout(), e.rotation + 180f); - Draw.reset(); - }); - - shootBig2 = new Effect(10, e -> { - Draw.color(Palette.lightOrange, Color.GRAY, e.fin()); - float w = 1.2f + 8 * e.fout(); - Shapes.tri(e.x, e.y, w, 29f * e.fout(), e.rotation); - Shapes.tri(e.x, e.y, w, 5f * e.fout(), e.rotation + 180f); - Draw.reset(); - }); - - shootBigSmoke = new Effect(17f, e -> { - Draw.color(Palette.lighterOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); - - Angles.randLenVectors(e.id, 8, e.finpow() * 19f, e.rotation, 10f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 2f + 0.2f); - }); - - Draw.reset(); - }); - - shootBigSmoke2 = new Effect(18f, e -> { - Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Color.GRAY, e.fin()); - - Angles.randLenVectors(e.id, 9, e.finpow() * 23f, e.rotation, 20f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 2.4f + 0.2f); - }); - - Draw.reset(); - }); - - shootSmallFlame = new Effect(30f, e -> { - Draw.color(Palette.lightFlame, Palette.darkFlame, Color.GRAY, e.fin()); - - Angles.randLenVectors(e.id, 8, e.finpow() * 36f, e.rotation, 10f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.65f + e.fout() * 1.5f); - }); - - Draw.reset(); - }); - - shootLiquid = new Effect(40f, e -> { - Draw.color(e.color, Color.WHITE, e.fout() / 6f + Mathf.randomSeedRange(e.id, 0.1f)); - - Angles.randLenVectors(e.id, 6, e.finpow() * 60f, e.rotation, 11f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, 0.5f + e.fout() * 2.5f); - }); - - Draw.reset(); - }); - - shellEjectSmall = new GroundEffect(30f, 400f, e -> { - Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); - float rot = Math.abs(e.rotation) + 90f; - - int i = Mathf.sign(e.rotation); - - float len = (2f + e.finpow() * 6f) * i; - float lr = rot + e.fin() * 30f * i; - Fill.rect(e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), - e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), - 1f, 2f, rot + e.fin() * 50f * i); - - Draw.color(); - }); - - shellEjectMedium = new GroundEffect(34f, 400f, e -> { - Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); - float rot = e.rotation + 90f; - for(int i : Mathf.signs){ - float len = (2f + e.finpow() * 10f) * i; - float lr = rot + e.fin() * 20f * i; - Draw.rect(Core.atlas.find("casing"), - e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), - e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), - 2f, 3f, rot); - } - - Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fin()); - - for(int i : Mathf.signs){ - Angles.randLenVectors(e.id, 4, 1f + e.finpow() * 11f, e.rotation + 90f * i, 20f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 1.5f); - }); - } - - Draw.color(); - }); - - shellEjectBig = new GroundEffect(22f, 400f, e -> { - Draw.color(Palette.lightOrange, Color.LIGHT_GRAY, Palette.lightishGray, e.fin()); - float rot = e.rotation + 90f; - for(int i : Mathf.signs){ - float len = (4f + e.finpow() * 8f) * i; - float lr = rot + Mathf.randomSeedRange(e.id + i + 6, 20f * e.fin()) * i; - Draw.rect(Core.atlas.find("casing"), - e.x + Angles.trnsx(lr, len) + Mathf.randomSeedRange(e.id + i + 7, 3f * e.fin()), - e.y + Angles.trnsy(lr, len) + Mathf.randomSeedRange(e.id + i + 8, 3f * e.fin()), - 2.5f, 4f, - rot + e.fin() * 30f * i + Mathf.randomSeedRange(e.id + i + 9, 40f * e.fin())); - } - - Draw.color(Color.LIGHT_GRAY); - - for(int i : Mathf.signs){ - Angles.randLenVectors(e.id, 4, -e.finpow() * 15f, e.rotation + 90f * i, 25f, (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 2f); - }); - } - - Draw.color(); - }); - - lancerLaserShoot = new Effect(21f, e -> { - Draw.color(Palette.lancerLaser); - - for(int i : Mathf.signs){ - Shapes.tri(e.x, e.y, 4f * e.fout(), 29f, e.rotation + 90f * i); - } - - Draw.reset(); - }); - - lancerLaserShootSmoke = new Effect(26f, e -> { - Draw.color(Palette.lancerLaser); - - Angles.randLenVectors(e.id, 7, 80f, e.rotation, 0f, (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fout() * 9f); - }); - - Draw.reset(); - }); - - lancerLaserCharge = new Effect(38f, e -> { - Draw.color(Palette.lancerLaser); - - Angles.randLenVectors(e.id, 2, 1f + 20f * e.fout(), e.rotation, 120f, (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fslope() * 3f + 1f); - }); - - Draw.reset(); - }); - - lancerLaserChargeBegin = new Effect(71f, e -> { - Draw.color(Palette.lancerLaser); - Fill.circle(e.x, e.y, e.fin() * 3f); - - Draw.color(); - Fill.circle(e.x, e.y, e.fin() * 2f); - }); - - lightningCharge = new Effect(38f, e -> { - Draw.color(Palette.lancerLaser); - - Angles.randLenVectors(e.id, 2, 1f + 20f * e.fout(), e.rotation, 120f, (x, y) -> { - Shapes.tri(e.x + x, e.y + y, e.fslope() * 3f + 1, e.fslope() * 3f + 1, Mathf.angle(x, y)); - }); - - Draw.reset(); - }); - - lightningShoot = new Effect(12f, e -> { - Draw.color(Color.WHITE, Palette.lancerLaser, e.fin()); - Lines.stroke(e.fout() * 1.2f + 0.5f); - - Angles.randLenVectors(e.id, 7, 25f * e.finpow(), e.rotation, 50f, (x, y) -> { - Lines.lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fin() * 5f + 2f); - }); - - Draw.reset(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/content/fx/UnitFx.java b/core/src/io/anuke/mindustry/content/fx/UnitFx.java deleted file mode 100644 index e58fba9d8b..0000000000 --- a/core/src/io/anuke/mindustry/content/fx/UnitFx.java +++ /dev/null @@ -1,78 +0,0 @@ -package io.anuke.mindustry.content.fx; - -import io.anuke.mindustry.entities.effect.GroundEffectEntity.GroundEffect; -import io.anuke.mindustry.graphics.Palette; -import io.anuke.mindustry.game.ContentList; -import io.anuke.arc.entities.Effects.Effect; -import io.anuke.arc.graphics.g2d.Draw; -import io.anuke.arc.graphics.g2d.Fill; -import io.anuke.arc.graphics.g2d.Lines; -import io.anuke.arc.math.Angles; -import io.anuke.arc.math.Mathf; - -public class UnitFx extends FxList implements ContentList{ - public static Effect vtolHover, unitDrop, unitPickup, unitLand, pickup, healWave, heal, landShock; - - @Override - public void load(){ - - vtolHover = new Effect(40f, e -> { - float len = e.finpow() * 10f; - float ang = e.rotation + Mathf.randomSeedRange(e.id, 30f); - Draw.color(Palette.lightFlame, Palette.lightOrange, e.fin()); - Fill.circle(e.x + Angles.trnsx(ang, len), e.y + Angles.trnsy(ang, len), 2f * e.fout()); - Draw.reset(); - }); - - unitDrop = new GroundEffect(30, e -> { - Draw.color(Palette.lightishGray); - Angles.randLenVectors(e.id, 9, 3 + 20f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.4f); - }); - Draw.reset(); - }); - - unitLand = new GroundEffect(30, e -> { - Draw.color(Palette.lightishGray, e.color, e.rotation); - Angles.randLenVectors(e.id, 6, 17f * e.finpow(), (x, y) -> { - Fill.circle(e.x + x, e.y + y, e.fout() * 4f + 0.3f); - }); - Draw.reset(); - }); - - unitPickup = new GroundEffect(18, e -> { - Draw.color(Palette.lightishGray); - Lines.stroke(e.fin() * 2f); - Lines.poly(e.x, e.y, 4, 13f * e.fout()); - Draw.reset(); - }); - - landShock = new GroundEffect(12, e -> { - Draw.color(Palette.lancerLaser); - Lines.stroke(e.fout() * 3f); - Lines.poly(e.x, e.y, 12, 20f * e.fout()); - Draw.reset(); - }); - - pickup = new Effect(18, e -> { - Draw.color(Palette.lightishGray); - Lines.stroke(e.fout() * 2f); - Lines.spikes(e.x, e.y, 1f + e.fin() * 6f, e.fout() * 4f, 6); - Draw.reset(); - }); - - healWave = new Effect(22, e -> { - Draw.color(Palette.heal); - Lines.stroke(e.fout() * 2f); - Lines.poly(e.x, e.y, 30, 4f + e.finpow() * 60f); - Draw.color(); - }); - - heal = new Effect(11, e -> { - Draw.color(Palette.heal); - Lines.stroke(e.fout() * 2f); - Lines.poly(e.x, e.y, 10, 2f + e.finpow() * 7f); - Draw.color(); - }); - } -} diff --git a/core/src/io/anuke/mindustry/core/ContentLoader.java b/core/src/io/anuke/mindustry/core/ContentLoader.java index e425e33e21..bb7b015539 100644 --- a/core/src/io/anuke/mindustry/core/ContentLoader.java +++ b/core/src/io/anuke/mindustry/core/ContentLoader.java @@ -7,7 +7,6 @@ import io.anuke.arc.function.Consumer; import io.anuke.arc.util.Log; import io.anuke.mindustry.content.*; import io.anuke.mindustry.content.blocks.*; -import io.anuke.mindustry.content.fx.*; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.bullet.BulletType; @@ -41,13 +40,7 @@ public class ContentLoader{ private ObjectSet> initialization = new ObjectSet<>(); private ContentList[] content = { //effects - new BlockFx(), - new BulletFx(), - new EnvironmentFx(), - new ExplosionFx(), new Fx(), - new ShootFx(), - new UnitFx(), //items new Items(), diff --git a/core/src/io/anuke/mindustry/core/Renderer.java b/core/src/io/anuke/mindustry/core/Renderer.java index cff7944281..05477315ef 100644 --- a/core/src/io/anuke/mindustry/core/Renderer.java +++ b/core/src/io/anuke/mindustry/core/Renderer.java @@ -21,7 +21,7 @@ import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.ScreenRecorder; import io.anuke.arc.util.Time; import io.anuke.arc.util.pooling.Pools; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; diff --git a/core/src/io/anuke/mindustry/entities/Damage.java b/core/src/io/anuke/mindustry/entities/Damage.java index 49ad873375..e8b51dbf35 100644 --- a/core/src/io/anuke/mindustry/entities/Damage.java +++ b/core/src/io/anuke/mindustry/entities/Damage.java @@ -11,7 +11,7 @@ import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.Bullets; -import io.anuke.mindustry.content.fx.ExplosionFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.effect.Fire; import io.anuke.mindustry.entities.effect.Lightning; @@ -46,21 +46,21 @@ public class Damage{ int f = i; Time.run(i * 2f, () -> { Damage.damage(x, y, Mathf.clamp(radius + explosiveness, 0, 50f) * ((f + 1f) / waves), explosiveness / 2f); - Effects.effect(ExplosionFx.blockExplosionSmoke, x + Mathf.range(radius), y + Mathf.range(radius)); + Effects.effect(Fx.blockExplosionSmoke, x + Mathf.range(radius), y + Mathf.range(radius)); }); } if(explosiveness > 15f){ - Effects.effect(ExplosionFx.shockwave, x, y); + Effects.effect(Fx.shockwave, x, y); } if(explosiveness > 30f){ - Effects.effect(ExplosionFx.bigShockwave, x, y); + Effects.effect(Fx.bigShockwave, x, y); } float shake = Math.min(explosiveness / 4f + 3f, 9f); Effects.shake(shake, shake, x, y); - Effects.effect(ExplosionFx.blockExplosion, x, y); + Effects.effect(Fx.blockExplosion, x, y); } public static void createIncend(float x, float y, float range, int amount){ diff --git a/core/src/io/anuke/mindustry/entities/Player.java b/core/src/io/anuke/mindustry/entities/Player.java index 2410644da8..7ea5dd7797 100644 --- a/core/src/io/anuke/mindustry/entities/Player.java +++ b/core/src/io/anuke/mindustry/entities/Player.java @@ -20,7 +20,7 @@ import io.anuke.arc.util.Pack; import io.anuke.arc.util.Time; import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Mechs; -import io.anuke.mindustry.content.fx.UnitFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.effect.ScorchDecal; import io.anuke.mindustry.entities.traits.*; import io.anuke.mindustry.game.Team; @@ -502,7 +502,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra if(mech.shake > 1f){ Effects.shake(mech.shake, mech.shake, this); } - Effects.effect(UnitFx.unitLand, tile.floor().minimapColor, x, y, tile.floor().isLiquid ? 1f : 0.5f); + Effects.effect(Fx.unitLand, tile.floor().minimapColor, x, y, tile.floor().isLiquid ? 1f : 0.5f); } mech.onLand(this); achievedFlight = false; diff --git a/core/src/io/anuke/mindustry/entities/TileEntity.java b/core/src/io/anuke/mindustry/entities/TileEntity.java index a48defd085..c77d797f8a 100644 --- a/core/src/io/anuke/mindustry/entities/TileEntity.java +++ b/core/src/io/anuke/mindustry/entities/TileEntity.java @@ -13,7 +13,7 @@ import io.anuke.arc.math.geom.Point2; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Interval; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.traits.TargetTrait; import io.anuke.mindustry.game.Team; diff --git a/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java index ed25df2f5d..ee5237a2c8 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/ArtilleryBulletType.java @@ -1,13 +1,13 @@ package io.anuke.mindustry.entities.bullet; -import io.anuke.mindustry.content.fx.BulletFx; import io.anuke.arc.entities.Effects; import io.anuke.arc.entities.Effects.Effect; import io.anuke.arc.graphics.g2d.Draw; +import io.anuke.mindustry.content.Fx; //TODO scale velocity depending on fslope() public class ArtilleryBulletType extends BasicBulletType{ - protected Effect trailEffect = BulletFx.artilleryTrail; + protected Effect trailEffect = Fx.artilleryTrail; public ArtilleryBulletType(float speed, float damage, String bulletSprite){ super(speed, damage, bulletSprite); diff --git a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java index 3ac82c565b..10002296bf 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/BulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/BulletType.java @@ -3,8 +3,7 @@ package io.anuke.mindustry.entities.bullet; import io.anuke.arc.entities.Effects; import io.anuke.arc.entities.Effects.Effect; import io.anuke.mindustry.content.StatusEffects; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.ShootFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.game.Content; import io.anuke.mindustry.type.ContentType; import io.anuke.mindustry.type.StatusEffect; @@ -21,9 +20,9 @@ public abstract class BulletType extends Content{ public Effect hitEffect, despawnEffect; /**Effect created when shooting.*/ - public Effect shootEffect = ShootFx.shootSmall; + public Effect shootEffect = Fx.shootSmall; /**Extra smoke effect created when shooting.*/ - public Effect smokeEffect = ShootFx.shootSmallSmoke; + public Effect smokeEffect = Fx.shootSmallSmoke; /**Extra inaccuracy when firing.*/ public float inaccuracy = 0f; /**How many bullets get created per ammo item/liquid.*/ @@ -61,8 +60,8 @@ public abstract class BulletType extends Content{ this.speed = speed; this.damage = damage; lifetime = 40f; - hitEffect = BulletFx.hitBulletSmall; - despawnEffect = BulletFx.hitBulletSmall; + hitEffect = Fx.hitBulletSmall; + despawnEffect = Fx.hitBulletSmall; } /**Returns maximum distance the bullet this bullet type has can travel.*/ diff --git a/core/src/io/anuke/mindustry/entities/bullet/FlakBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/FlakBulletType.java index b18ff21368..908bd3f17b 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/FlakBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/FlakBulletType.java @@ -1,7 +1,7 @@ package io.anuke.mindustry.entities.bullet; import io.anuke.arc.math.geom.Rectangle; -import io.anuke.mindustry.content.fx.BulletFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Units; import io.anuke.arc.util.Time; @@ -13,7 +13,7 @@ public abstract class FlakBulletType extends BasicBulletType{ super(speed, damage, "shell"); splashDamage = 15f; splashDamageRadius = 34f; - hitEffect = BulletFx.flakExplosionBig; + hitEffect = Fx.flakExplosionBig; bulletWidth = 8f; bulletHeight = 10f; } diff --git a/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java index 90a396839d..b7a74f4486 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/LiquidBulletType.java @@ -7,8 +7,7 @@ import io.anuke.arc.graphics.g2d.Fill; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.math.geom.Point2; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.effect.Fire; import io.anuke.mindustry.entities.effect.Puddle; import io.anuke.mindustry.type.Liquid; @@ -28,7 +27,7 @@ public class LiquidBulletType extends BulletType{ status = liquid.effect; statusIntensity = 0.5f; despawnEffect = Fx.none; - hitEffect = BulletFx.hitLiquid; + hitEffect = Fx.hitLiquid; drag = 0.01f; knockback = 0.5f; } diff --git a/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java b/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java index b263b81ab6..a10421113a 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java +++ b/core/src/io/anuke/mindustry/entities/bullet/MassDriverBolt.java @@ -5,9 +5,7 @@ import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.math.Angles; import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.BulletFx; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.graphics.Palette; import io.anuke.mindustry.world.blocks.distribution.MassDriver.DriverBulletData; @@ -19,8 +17,8 @@ public class MassDriverBolt extends BulletType{ super(5.3f, 50); collidesTiles = false; lifetime = 200f; - despawnEffect = BlockFx.smeltsmoke; - hitEffect = BulletFx.hitBulletBig; + despawnEffect = Fx.smeltsmoke; + hitEffect = Fx.hitBulletBig; drag = 0.005f; } @@ -96,7 +94,7 @@ public class MassDriverBolt extends BulletType{ int amountDropped = Mathf.random(0, data.items[i]); if(amountDropped > 0){ float angle = b.rot() + Mathf.range(100f); - Effects.effect(EnvironmentFx.dropItem, Color.WHITE, b.x, b.y, angle, content.item(i)); + Effects.effect(Fx.dropItem, Color.WHITE, b.x, b.y, angle, content.item(i)); } } } diff --git a/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java b/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java index b62b83787a..6200666f1f 100644 --- a/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java +++ b/core/src/io/anuke/mindustry/entities/bullet/MissileBulletType.java @@ -1,7 +1,7 @@ package io.anuke.mindustry.entities.bullet; import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.fx.BulletFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.graphics.Palette; import io.anuke.arc.entities.Effects; import io.anuke.arc.util.Time; @@ -25,7 +25,7 @@ public class MissileBulletType extends BasicBulletType{ super.update(b); if(Mathf.chance(Time.delta() * 0.2)){ - Effects.effect(BulletFx.missileTrail, trailColor, b.x, b.y, 2f); + Effects.effect(Fx.missileTrail, trailColor, b.x, b.y, 2f); } if(weaveMag > 0){ diff --git a/core/src/io/anuke/mindustry/entities/effect/Fire.java b/core/src/io/anuke/mindustry/entities/effect/Fire.java index 359a0b1d09..4ca534df54 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Fire.java +++ b/core/src/io/anuke/mindustry/entities/effect/Fire.java @@ -15,7 +15,7 @@ import io.anuke.arc.util.pooling.Pool.Poolable; import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Bullets; import io.anuke.mindustry.content.StatusEffects; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.traits.SaveTrait; @@ -93,11 +93,11 @@ public class Fire extends TimedEntity implements SaveTrait, SyncTrait, Poolable{ @Override public void update(){ if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.fire, x + Mathf.range(4f), y + Mathf.range(4f)); + Effects.effect(Fx.fire, x + Mathf.range(4f), y + Mathf.range(4f)); } if(Mathf.chance(0.05 * Time.delta())){ - Effects.effect(EnvironmentFx.smoke, x + Mathf.range(4f), y + Mathf.range(4f)); + Effects.effect(Fx.fireSmoke, x + Mathf.range(4f), y + Mathf.range(4f)); } if(Net.client()){ diff --git a/core/src/io/anuke/mindustry/entities/effect/Puddle.java b/core/src/io/anuke/mindustry/entities/effect/Puddle.java index e134b9a069..167d6f08e9 100644 --- a/core/src/io/anuke/mindustry/entities/effect/Puddle.java +++ b/core/src/io/anuke/mindustry/entities/effect/Puddle.java @@ -21,8 +21,7 @@ import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Liquids; import io.anuke.mindustry.content.blocks.Blocks; import io.anuke.mindustry.content.Bullets; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Units; import io.anuke.mindustry.entities.traits.SaveTrait; import io.anuke.mindustry.entities.traits.SyncTrait; @@ -85,7 +84,7 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai Puddle p = map.get(tile.pos()); if(generation == 0 && p != null && p.lastRipple <= Time.time() - 40f){ - Effects.effect(BlockFx.ripple, tile.floor().liquidDrop.color, + Effects.effect(Fx.ripple, tile.floor().liquidDrop.color, (tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f); p.lastRipple = Time.time(); } @@ -108,7 +107,7 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai p.accepting = Math.max(amount, p.accepting); if(generation == 0 && p.lastRipple <= Time.time() - 40f && p.amount >= maxLiquid / 2f){ - Effects.effect(BlockFx.ripple, p.liquid.color, (tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f); + Effects.effect(Fx.ripple, p.liquid.color, (tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f); p.lastRipple = Time.time(); } }else{ @@ -134,12 +133,12 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai } }else if(dest.temperature > 0.7f && liquid.temperature < 0.55f){ //cold liquid poured onto hot puddle if(Mathf.chance(0.5f * amount)){ - Effects.effect(EnvironmentFx.steam, x, y); + Effects.effect(Fx.steam, x, y); } return -0.1f * amount; }else if(liquid.temperature > 0.7f && dest.temperature < 0.55f){ //hot liquid poured onto cold puddle if(Mathf.chance(0.8f * amount)){ - Effects.effect(EnvironmentFx.steam, x, y); + Effects.effect(Fx.steam, x, y); } return -0.4f * amount; } @@ -209,7 +208,7 @@ public class Puddle extends SolidEntity implements SaveTrait, Poolable, DrawTrai unit.applyEffect(liquid.effect, 0.5f); if(unit.velocity().len() > 0.1){ - Effects.effect(BlockFx.ripple, liquid.color, unit.x, unit.y); + Effects.effect(Fx.ripple, liquid.color, unit.x, unit.y); } }); diff --git a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java index 9a3b6e174d..73dedf309d 100644 --- a/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/BuilderTrait.java @@ -16,7 +16,7 @@ import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -285,7 +285,7 @@ public interface BuilderTrait extends Entity{ } if(Mathf.chance(0.06 * Time.delta())){ - Effects.effect(BlockFx.pulverizeSmall, + Effects.effect(Fx.pulverizeSmall, tile.worldx() + Mathf.range(tilesize / 2f), tile.worldy() + Mathf.range(tilesize / 2f), 0f, item.color); } diff --git a/core/src/io/anuke/mindustry/entities/traits/CarryTrait.java b/core/src/io/anuke/mindustry/entities/traits/CarryTrait.java index b63ce195cd..de7f571161 100644 --- a/core/src/io/anuke/mindustry/entities/traits/CarryTrait.java +++ b/core/src/io/anuke/mindustry/entities/traits/CarryTrait.java @@ -2,7 +2,7 @@ package io.anuke.mindustry.entities.traits; import io.anuke.annotations.Annotations.Loc; import io.anuke.annotations.Annotations.Remote; -import io.anuke.mindustry.content.fx.UnitFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.gen.Call; import io.anuke.arc.entities.Effects; @@ -26,7 +26,7 @@ public interface CarryTrait extends TeamTrait, SolidTrait, TargetTrait{ if(trait.getCarry() != null){ //already carrying something, drop it //drop current - Effects.effect(UnitFx.unitDrop, trait.getCarry()); + Effects.effect(Fx.unitDrop, trait.getCarry()); trait.getCarry().setCarrier(null); trait.setCarry(null); @@ -37,7 +37,7 @@ public interface CarryTrait extends TeamTrait, SolidTrait, TargetTrait{ trait.setCarry(unit); unit.setCarrier(trait); - Effects.effect(UnitFx.unitPickup, trait); + Effects.effect(Fx.unitPickup, trait); } } diff --git a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java index 4d5eb7c956..07c4d2dd4f 100644 --- a/core/src/io/anuke/mindustry/entities/units/BaseUnit.java +++ b/core/src/io/anuke/mindustry/entities/units/BaseUnit.java @@ -14,7 +14,7 @@ import io.anuke.arc.math.geom.Rectangle; import io.anuke.arc.util.Interval; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.ExplosionFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -77,7 +77,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{ unit.onSuperDeath(); ScorchDecal.create(unit.x, unit.y); - Effects.effect(ExplosionFx.explosion, unit); + Effects.effect(Fx.explosion, unit); Effects.shake(2f, 2f, unit); //must run afterwards so the unit's group is not null when sending the removal packet diff --git a/core/src/io/anuke/mindustry/input/InputHandler.java b/core/src/io/anuke/mindustry/input/InputHandler.java index 36b1fab2ef..b10d48a36e 100644 --- a/core/src/io/anuke/mindustry/input/InputHandler.java +++ b/core/src/io/anuke/mindustry/input/InputHandler.java @@ -12,7 +12,7 @@ import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.scene.ui.layout.Table; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.effect.ItemTransfer; import io.anuke.mindustry.entities.traits.BuilderTrait.BuildRequest; @@ -57,7 +57,7 @@ public abstract class InputHandler implements InputProcessor{ throw new ValidateException(player, "Player cannot drop an item."); } - Effects.effect(EnvironmentFx.dropItem, Color.WHITE, player.x, player.y, angle, player.inventory.getItem().item); + Effects.effect(Fx.dropItem, Color.WHITE, player.x, player.y, angle, player.inventory.getItem().item); player.inventory.clearItem(); } diff --git a/core/src/io/anuke/mindustry/input/MobileInput.java b/core/src/io/anuke/mindustry/input/MobileInput.java index b613415c2f..e4fbee2f6e 100644 --- a/core/src/io/anuke/mindustry/input/MobileInput.java +++ b/core/src/io/anuke/mindustry/input/MobileInput.java @@ -19,7 +19,7 @@ import io.anuke.arc.scene.ui.layout.Table; import io.anuke.arc.util.Align; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; diff --git a/core/src/io/anuke/mindustry/type/Weapon.java b/core/src/io/anuke/mindustry/type/Weapon.java index 00210b1e71..dda242a463 100644 --- a/core/src/io/anuke/mindustry/type/Weapon.java +++ b/core/src/io/anuke/mindustry/type/Weapon.java @@ -10,7 +10,7 @@ import io.anuke.arc.math.Angles; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Vector2; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.bullet.Bullet; import io.anuke.mindustry.entities.bullet.BulletType; diff --git a/core/src/io/anuke/mindustry/world/BaseBlock.java b/core/src/io/anuke/mindustry/world/BaseBlock.java index 82088ff38e..0fa31beb61 100644 --- a/core/src/io/anuke/mindustry/world/BaseBlock.java +++ b/core/src/io/anuke/mindustry/world/BaseBlock.java @@ -6,7 +6,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.EnvironmentFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; import io.anuke.mindustry.entities.effect.Puddle; @@ -157,13 +157,13 @@ public abstract class BaseBlock extends MappableContent{ tile.entity.damage(1 * Time.delta()); next.entity.damage(1 * Time.delta()); if(Mathf.chance(0.1 * Time.delta())){ - Effects.effect(EnvironmentFx.fire, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); + Effects.effect(Fx.fire, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); } }else if((liquid.temperature > 0.7f && other.temperature < 0.55f) || (other.temperature > 0.7f && liquid.temperature < 0.55f)){ tile.entity.liquids.remove(liquid, Math.min(tile.entity.liquids.get(liquid), 0.7f * Time.delta())); if(Mathf.chance(0.2f * Time.delta())){ - Effects.effect(EnvironmentFx.steam, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); + Effects.effect(Fx.steam, (tile.worldx() + next.worldx()) / 2f, (tile.worldy() + next.worldy()) / 2f); } } } diff --git a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java index 4337d83955..441508c55c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/BuildBlock.java @@ -9,8 +9,7 @@ import io.anuke.arc.entities.Effects; import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; -import io.anuke.mindustry.content.fx.ExplosionFx; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -103,7 +102,7 @@ public class BuildBlock extends Block{ @Override public void onDestroyed(Tile tile){ - Effects.effect(ExplosionFx.blockExplosionSmoke, tile); + Effects.effect(Fx.blockExplosionSmoke, tile); if(!tile.floor().solid && !tile.floor().isLiquid){ RubbleDecal.create(tile.drawx(), tile.drawy(), size); diff --git a/core/src/io/anuke/mindustry/world/blocks/Floor.java b/core/src/io/anuke/mindustry/world/blocks/Floor.java index abc3cd3a9b..aabc7e3020 100644 --- a/core/src/io/anuke/mindustry/world/blocks/Floor.java +++ b/core/src/io/anuke/mindustry/world/blocks/Floor.java @@ -11,7 +11,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.math.geom.Vector2; import io.anuke.mindustry.content.StatusEffects; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.type.StatusEffect; import io.anuke.mindustry.world.Block; @@ -33,9 +33,9 @@ public class Floor extends Block{ /** How many ticks it takes to drown on this. */ public float drownTime = 0f; /** Effect when walking on this floor. */ - public Effect walkEffect = BlockFx.ripple; + public Effect walkEffect = Fx.ripple; /** Effect displayed when drowning on this floor. */ - public Effect drownUpdateEffect = BlockFx.bubble; + public Effect drownUpdateEffect = Fx.bubble; /** Status effect applied when walking on. */ public StatusEffect status = StatusEffects.none; /** Intensity of applied status effect. */ diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/Door.java b/core/src/io/anuke/mindustry/world/blocks/defense/Door.java index 7b2303a99a..a85545453c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/Door.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/Door.java @@ -8,7 +8,7 @@ import io.anuke.arc.entities.Effects.Effect; import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.geom.Rectangle; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Units; @@ -21,8 +21,8 @@ import java.io.IOException; public class Door extends Wall{ protected final Rectangle rect = new Rectangle(); - protected Effect openfx = BlockFx.dooropen; - protected Effect closefx = BlockFx.doorclose; + protected Effect openfx = Fx.dooropen; + protected Effect closefx = Fx.doorclose; protected TextureRegion openRegion; diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java b/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java index a8a76c46a6..374c1fd3ff 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/ForceProjector.java @@ -13,8 +13,7 @@ import io.anuke.arc.graphics.g2d.Fill; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.BulletFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.traits.AbsorbTrait; import io.anuke.mindustry.graphics.Palette; @@ -94,7 +93,7 @@ public class ForceProjector extends Block { entity.radscl = Mathf.lerpDelta(entity.radscl, entity.broken ? 0f : 1f, 0.05f); if(Mathf.chance(Time.delta() * entity.buildup / breakage * 0.1f)){ - Effects.effect(BlockFx.reactorsmoke, tile.drawx() + Mathf.range(tilesize/2f), tile.drawy() + Mathf.range(tilesize/2f)); + Effects.effect(Fx.reactorsmoke, tile.drawx() + Mathf.range(tilesize/2f), tile.drawy() + Mathf.range(tilesize/2f)); } // Use Cases: @@ -137,7 +136,7 @@ public class ForceProjector extends Block { if(entity.buildup >= breakage && !entity.broken){ entity.broken = true; entity.buildup = breakage; - Effects.effect(BlockFx.shieldBreak, tile.drawx(), tile.drawy(), radius); + Effects.effect(Fx.shieldBreak, tile.drawx(), tile.drawy(), radius); } if(entity.hit > 0f){ @@ -151,7 +150,7 @@ public class ForceProjector extends Block { AbsorbTrait trait = (AbsorbTrait)bullet; if(trait.canBeAbsorbed() && trait.getTeam() != tile.getTeam() && isInsideHexagon(trait.getX(), trait.getY(), realRadius * 2f, tile.drawx(), tile.drawy())){ trait.absorb(); - Effects.effect(BulletFx.absorb, trait); + Effects.effect(Fx.absorb, trait); float relativeDamagePowerDraw = trait.getShieldDamage() * powerDamage / consumePower.powerCapacity; entity.hit = 1f; diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java b/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java index 503ad4c2f1..e79e877c09 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/MendProjector.java @@ -11,7 +11,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.arc.util.Tmp; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; @@ -68,7 +68,7 @@ public class MendProjector extends Block{ if(entity.charge >= reload){ float realRange = range + entity.phaseHeat * phaseRangeBoost; - Effects.effect(BlockFx.healWaveMend, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange); + Effects.effect(Fx.healWaveMend, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange); entity.charge = 0f; int tileRange = (int)(realRange / tilesize); @@ -85,7 +85,7 @@ public class MendProjector extends Block{ if(other.getTeamID() == tile.getTeamID() && !healed.contains(other.pos()) && other.entity != null && other.entity.health < other.entity.maxHealth()){ other.entity.healBy(other.entity.maxHealth() * (healPercent + entity.phaseHeat*phaseBoost)/100f * entity.power.satisfaction); - Effects.effect(BlockFx.healBlockFull, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), other.drawx(), other.drawy(), other.block().size); + Effects.effect(Fx.healBlockFull, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), other.drawx(), other.drawy(), other.block().size); healed.add(other.pos()); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java b/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java index 32f8498d59..54dd2f526f 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/OverdriveProjector.java @@ -11,7 +11,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.arc.util.Tmp; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; @@ -70,7 +70,7 @@ public class OverdriveProjector extends Block{ float realRange = range + entity.phaseHeat * phaseRangeBoost; float realBoost = (speedBoost + entity.phaseHeat*speedBoostPhase) * entity.power.satisfaction; - Effects.effect(BlockFx.overdriveWave, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange); + Effects.effect(Fx.overdriveWave, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), tile.drawx(), tile.drawy(), realRange); entity.charge = 0f; int tileRange = (int)(realRange / tilesize); @@ -88,7 +88,7 @@ public class OverdriveProjector extends Block{ if(other.getTeamID() == tile.getTeamID() && !healed.contains(other.pos()) && other.entity != null){ other.entity.timeScaleDuration = Math.max(other.entity.timeScaleDuration, reload + 1f); other.entity.timeScale = Math.max(other.entity.timeScale, realBoost); - Effects.effect(BlockFx.overdriveBlockFull, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), other.drawx(), other.drawy(), other.block().size); + Effects.effect(Fx.overdriveBlockFull, Tmp.c1.set(color).lerp(phase, entity.phaseHeat), other.drawx(), other.drawy(), other.block().size); healed.add(other.pos()); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java index 51a22071b7..855dc67fb2 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/ChargeTurret.java @@ -4,7 +4,7 @@ import io.anuke.arc.entities.Effects; import io.anuke.arc.entities.Effects.Effect; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.bullet.BulletType; import io.anuke.mindustry.world.Tile; diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java index 09255365a2..65053c9284 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/CooledTurret.java @@ -1,6 +1,6 @@ package io.anuke.mindustry.world.blocks.defense.turrets; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.consumers.ConsumeLiquidFilter; @@ -16,7 +16,7 @@ public class CooledTurret extends Turret{ protected float coolantMultiplier = 1f; /**Max coolant used per tick.*/ protected float maxCoolantUsed = 1f; - protected Effect coolEffect = BlockFx.fuelburn; + protected Effect coolEffect = Fx.fuelburn; public CooledTurret(String name){ super(name); diff --git a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java index 080de1cc24..6a07a00846 100644 --- a/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java +++ b/core/src/io/anuke/mindustry/world/blocks/defense/turrets/Turret.java @@ -15,7 +15,7 @@ import io.anuke.arc.math.Angles; import io.anuke.arc.math.Mathf; import io.anuke.arc.math.geom.Vector2; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Predict; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Units; diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java b/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java index 8339a7c1bd..c822a4b362 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/MassDriver.java @@ -16,10 +16,7 @@ import io.anuke.arc.util.Time; import io.anuke.arc.util.pooling.Pool.Poolable; import io.anuke.arc.util.pooling.Pools; import io.anuke.mindustry.content.Bullets; -import io.anuke.mindustry.content.Bullets; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.EnvironmentFx; -import io.anuke.mindustry.content.fx.ShootFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.bullet.Bullet; @@ -46,9 +43,9 @@ public class MassDriver extends Block{ protected int minDistribute = 10; protected float knockback = 4f; protected float reloadTime = 100f; - protected Effect shootEffect = ShootFx.shootBig2; - protected Effect smokeEffect = ShootFx.shootBigSmoke2; - protected Effect recieveEffect = BlockFx.mineBig; + protected Effect shootEffect = Fx.shootBig2; + protected Effect smokeEffect = Fx.shootBigSmoke2; + protected Effect recieveEffect = Fx.mineBig; protected float shake = 3f; protected final static float powerPercentageUsed = 1.0f; protected TextureRegion turretRegion; @@ -309,7 +306,7 @@ public class MassDriver extends Block{ int amountDropped = Mathf.random(0, data.items[i]); if(amountDropped > 0){ float angle = Mathf.range(180f); - Effects.effect(EnvironmentFx.dropItem, Color.WHITE, bullet.x, bullet.y, angle, content.item(i)); + Effects.effect(Fx.dropItem, Color.WHITE, bullet.x, bullet.y, angle, content.item(i)); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/power/ItemLiquidGenerator.java b/core/src/io/anuke/mindustry/world/blocks/power/ItemLiquidGenerator.java index d2d5106863..44fdd5caf9 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/ItemLiquidGenerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/ItemLiquidGenerator.java @@ -7,7 +7,7 @@ import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Liquid; @@ -32,8 +32,8 @@ public class ItemLiquidGenerator extends PowerGenerator{ /** Maximum liquid used per frame. */ protected float maxLiquidGenerate = 0.4f; - protected Effects.Effect generateEffect = BlockFx.generatespark; - protected Effects.Effect explodeEffect = BlockFx.generatespark; + protected Effects.Effect generateEffect = Fx.generatespark; + protected Effects.Effect explodeEffect = Fx.generatespark; protected Color heatColor = Color.valueOf("ff9b59"); protected TextureRegion topRegion; diff --git a/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java b/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java index 5f7345ddf7..91e7fadf75 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/NuclearReactor.java @@ -9,8 +9,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.arc.math.geom.Vector2; import io.anuke.mindustry.content.Items; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.ExplosionFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Damage; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Liquid; @@ -106,7 +105,7 @@ public class NuclearReactor extends PowerGenerator{ if(entity.heat > smokeThreshold){ float smoke = 1.0f + (entity.heat - smokeThreshold) / (1f - smokeThreshold); //ranges from 1.0 to 2.0 if(Mathf.chance(smoke / 20.0 * entity.delta())){ - Effects.effect(BlockFx.reactorsmoke, tile.worldx() + Mathf.range(size * tilesize / 2f), + Effects.effect(Fx.reactorsmoke, tile.worldx() + Mathf.range(size * tilesize / 2f), tile.worldy() + Mathf.random(size * tilesize / 2f)); } } @@ -131,9 +130,9 @@ public class NuclearReactor extends PowerGenerator{ if(fuel < 5 && entity.heat < 0.5f) return; Effects.shake(6f, 16f, tile.worldx(), tile.worldy()); - Effects.effect(ExplosionFx.nuclearShockwave, tile.worldx(), tile.worldy()); + Effects.effect(Fx.nuclearShockwave, tile.worldx(), tile.worldy()); for(int i = 0; i < 6; i++){ - Time.run(Mathf.random(40), () -> Effects.effect(BlockFx.nuclearcloud, tile.worldx(), tile.worldy())); + Time.run(Mathf.random(40), () -> Effects.effect(Fx.nuclearcloud, tile.worldx(), tile.worldy())); } Damage.damage(tile.worldx(), tile.worldy(), explosionRadius * tilesize, explosionDamage * 4); @@ -142,14 +141,14 @@ public class NuclearReactor extends PowerGenerator{ for(int i = 0; i < 20; i++){ Time.run(Mathf.random(50), () -> { tr.rnd(Mathf.random(40f)); - Effects.effect(ExplosionFx.explosion, tr.x + tile.worldx(), tr.y + tile.worldy()); + Effects.effect(Fx.explosion, tr.x + tile.worldx(), tr.y + tile.worldy()); }); } for(int i = 0; i < 70; i++){ Time.run(Mathf.random(80), () -> { tr.rnd(Mathf.random(120f)); - Effects.effect(BlockFx.nuclearsmoke, tr.x + tile.worldx(), tr.y + tile.worldy()); + Effects.effect(Fx.nuclearsmoke, tr.x + tile.worldx(), tr.y + tile.worldy()); }); } } diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java b/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java index ed692caf57..e900b092d5 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Cultivator.java @@ -10,7 +10,7 @@ import io.anuke.arc.math.RandomXS128; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.Items; import io.anuke.mindustry.content.blocks.Blocks; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.world.Tile; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java index b4fa156706..67c1168f75 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Drill.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Drill.java @@ -12,7 +12,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.graphics.Layer; import io.anuke.mindustry.type.Item; @@ -48,11 +48,11 @@ public class Drill extends Block{ /**Whether to draw the item this drill is mining.*/ protected boolean drawMineItem = false; /**Effect played when an item is produced. This is colored.*/ - protected Effect drillEffect = BlockFx.mine; + protected Effect drillEffect = Fx.mine; /**Speed the drill bit rotates at.*/ protected float rotateSpeed = 2f; /**Effect randomly played while drilling.*/ - protected Effect updateEffect = BlockFx.pulverizeSmall; + protected Effect updateEffect = Fx.pulverizeSmall; /**Chance the update effect will appear.*/ protected float updateEffectChance = 0.02f; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java b/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java index 4c1eef5ef7..21bcebe89c 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/GenericCrafter.java @@ -2,8 +2,7 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.Core; import io.anuke.arc.graphics.g2d.TextureRegion; -import io.anuke.mindustry.content.fx.BlockFx; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.world.Block; @@ -26,7 +25,7 @@ public class GenericCrafter extends Block{ protected Item output; protected float craftTime = 80; - protected Effect craftEffect = BlockFx.purify; + protected Effect craftEffect = Fx.purify; protected Effect updateEffect = Fx.none; protected float updateEffectChance = 0.04f; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Incinerator.java b/core/src/io/anuke/mindustry/world/blocks/production/Incinerator.java index d8fea6e766..28574e24d0 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Incinerator.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Incinerator.java @@ -7,7 +7,7 @@ import io.anuke.arc.graphics.g2d.Draw; import io.anuke.arc.graphics.g2d.Fill; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.Liquid; @@ -15,7 +15,7 @@ import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; public class Incinerator extends Block{ - protected Effect effect = BlockFx.fuelburn; + protected Effect effect = Fx.fuelburn; protected Color flameColor = Color.valueOf("ffad9d"); public Incinerator(String name){ diff --git a/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java b/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java index a2423363ae..2b34b859ee 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/PowerSmelter.java @@ -3,7 +3,7 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.Core; import io.anuke.arc.graphics.Color; import io.anuke.arc.graphics.g2d.TextureRegion; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemStack; @@ -41,8 +41,8 @@ public class PowerSmelter extends PowerBlock{ protected float craftTime = 20f; //time to craft one item, so max 3 items per second by default protected float burnEffectChance = 0.01f; - protected Effect craftEffect = BlockFx.smelt, - burnEffect = BlockFx.fuelburn; + protected Effect craftEffect = Fx.smelt, + burnEffect = Fx.fuelburn; protected Color flameColor = Color.valueOf("ffc999"); protected TextureRegion topRegion; diff --git a/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java b/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java index 985a9f0d75..65b338006d 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/Smelter.java @@ -1,7 +1,7 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.graphics.Color; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Item; import io.anuke.mindustry.type.ItemStack; @@ -32,7 +32,7 @@ public class Smelter extends Block{ protected float craftTime = 20f; protected float burnDuration = 50f; - protected Effect craftEffect = BlockFx.smelt, burnEffect = BlockFx.fuelburn; + protected Effect craftEffect = Fx.smelt, burnEffect = Fx.fuelburn; protected Color flameColor = Color.valueOf("ffb879"); public Smelter(String name){ diff --git a/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java b/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java index 729fc05a90..434a5011e3 100644 --- a/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java +++ b/core/src/io/anuke/mindustry/world/blocks/production/SolidPump.java @@ -3,7 +3,7 @@ package io.anuke.mindustry.world.blocks.production; import io.anuke.arc.Core; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.mindustry.content.Liquids; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.type.Liquid; import io.anuke.mindustry.world.Tile; diff --git a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java index d33212a858..a046e4fdee 100644 --- a/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java +++ b/core/src/io/anuke/mindustry/world/blocks/storage/CoreBlock.java @@ -12,7 +12,7 @@ import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; import io.anuke.mindustry.content.UnitTypes; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; diff --git a/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java b/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java index 57de75effc..0be196abda 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/CommandCenter.java @@ -13,7 +13,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.scene.ui.ButtonGroup; import io.anuke.arc.scene.ui.ImageButton; import io.anuke.arc.scene.ui.layout.Table; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.units.BaseUnit; @@ -35,7 +35,7 @@ public class CommandCenter extends Block{ protected TextureRegion[] commandRegions = new TextureRegion[UnitCommand.values().length]; protected Color topColor = Palette.command; protected Color bottomColor = Color.valueOf("5e5e5e"); - protected Effect effect = BlockFx.commandSend; + protected Effect effect = Fx.commandSend; public CommandCenter(String name){ super(name); diff --git a/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java b/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java index 822b8d96bc..38257657d4 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/MechPad.java @@ -12,7 +12,7 @@ import io.anuke.arc.math.geom.Geometry; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; import io.anuke.mindustry.content.Mechs; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; @@ -24,7 +24,6 @@ import io.anuke.mindustry.graphics.Shaders; import io.anuke.mindustry.type.Mech; import io.anuke.mindustry.world.Block; import io.anuke.mindustry.world.Tile; -import io.anuke.mindustry.world.meta.BlockStat; import java.io.DataInput; import java.io.DataOutput; diff --git a/core/src/io/anuke/mindustry/world/blocks/units/Reconstructor.java b/core/src/io/anuke/mindustry/world/blocks/units/Reconstructor.java index 75d69c255b..de7753e644 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/Reconstructor.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/Reconstructor.java @@ -11,7 +11,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.arc.util.Time; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.Fx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.Player; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.Unit; diff --git a/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java b/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java index b29ecab1b0..5df8efceee 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/UnitFactory.java @@ -10,7 +10,7 @@ import io.anuke.arc.graphics.g2d.Lines; import io.anuke.arc.graphics.g2d.TextureRegion; import io.anuke.arc.math.Mathf; import io.anuke.mindustry.Vars; -import io.anuke.mindustry.content.fx.BlockFx; +import io.anuke.mindustry.content.Fx; import io.anuke.mindustry.entities.TileEntity; import io.anuke.mindustry.entities.units.BaseUnit; import io.anuke.mindustry.entities.units.UnitType; @@ -64,7 +64,7 @@ public class UnitFactory extends Block{ entity.buildTime = 0f; Effects.shake(2f, 3f, entity); - Effects.effect(BlockFx.producesmoke, tile.drawx(), tile.drawy()); + Effects.effect(Fx.producesmoke, tile.drawx(), tile.drawy()); if(!Net.client()){ BaseUnit unit = factory.type.create(tile.getTeam());