Organized FX
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#Autogenerated file. Do not modify.
|
#Autogenerated file. Do not modify.
|
||||||
#Sat Mar 31 14:50:44 EDT 2018
|
#Sat Mar 31 15:29:43 EDT 2018
|
||||||
version=release
|
version=release
|
||||||
androidBuildCode=766
|
androidBuildCode=766
|
||||||
name=Mindustry
|
name=Mindustry
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package io.anuke.mindustry.content;
|
package io.anuke.mindustry.content;
|
||||||
|
|
||||||
import io.anuke.mindustry.entities.BulletType;
|
import io.anuke.mindustry.entities.BulletType;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||||
import io.anuke.mindustry.resource.Weapon;
|
import io.anuke.mindustry.resource.Weapon;
|
||||||
|
|
||||||
public class Weapons {
|
public class Weapons {
|
||||||
@@ -9,20 +9,20 @@ public class Weapons {
|
|||||||
|
|
||||||
blaster = new Weapon("blaster", 12, BulletType.shot) {
|
blaster = new Weapon("blaster", 12, BulletType.shot) {
|
||||||
{
|
{
|
||||||
effect = Fx.laserShoot;
|
effect = BulletFx.laserShoot;
|
||||||
length = 2f;
|
length = 2f;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
triblaster = new Weapon("triblaster", 16, BulletType.spread) {
|
triblaster = new Weapon("triblaster", 16, BulletType.spread) {
|
||||||
{
|
{
|
||||||
shots = 3;
|
shots = 3;
|
||||||
effect = Fx.spreadShoot;
|
effect = BulletFx.spreadShoot;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clustergun = new Weapon("clustergun", 26f, BulletType.cluster) {
|
clustergun = new Weapon("clustergun", 26f, BulletType.cluster) {
|
||||||
{
|
{
|
||||||
effect = Fx.clusterShoot;
|
effect = BulletFx.clusterShoot;
|
||||||
inaccuracy = 17f;
|
inaccuracy = 17f;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
shots = 2;
|
shots = 2;
|
||||||
@@ -31,7 +31,7 @@ public class Weapons {
|
|||||||
},
|
},
|
||||||
beam = new Weapon("beam", 30f, BulletType.beamlaser) {
|
beam = new Weapon("beam", 30f, BulletType.beamlaser) {
|
||||||
{
|
{
|
||||||
effect = Fx.beamShoot;
|
effect = BulletFx.beamShoot;
|
||||||
inaccuracy = 0;
|
inaccuracy = 0;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
shake = 2f;
|
shake = 2f;
|
||||||
@@ -39,7 +39,7 @@ public class Weapons {
|
|||||||
},
|
},
|
||||||
vulcan = new Weapon("vulcan", 5, BulletType.vulcan) {
|
vulcan = new Weapon("vulcan", 5, BulletType.vulcan) {
|
||||||
{
|
{
|
||||||
effect = Fx.vulcanShoot;
|
effect = BulletFx.vulcanShoot;
|
||||||
inaccuracy = 5;
|
inaccuracy = 5;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
shake = 1f;
|
shake = 1f;
|
||||||
@@ -49,7 +49,7 @@ public class Weapons {
|
|||||||
shockgun = new Weapon("shockgun", 36, BulletType.shockshell) {
|
shockgun = new Weapon("shockgun", 36, BulletType.shockshell) {
|
||||||
{
|
{
|
||||||
shootsound = "bigshot";
|
shootsound = "bigshot";
|
||||||
effect = Fx.shockShoot;
|
effect = BulletFx.shockShoot;
|
||||||
shake = 2f;
|
shake = 2f;
|
||||||
roundrobin = true;
|
roundrobin = true;
|
||||||
shots = 7;
|
shots = 7;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package io.anuke.mindustry.content.blocks;
|
|||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import io.anuke.mindustry.content.Items;
|
import io.anuke.mindustry.content.Items;
|
||||||
import io.anuke.mindustry.content.Liquids;
|
import io.anuke.mindustry.content.Liquids;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.resource.ItemStack;
|
import io.anuke.mindustry.resource.ItemStack;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
@@ -32,7 +32,7 @@ public class CraftingBlocks {
|
|||||||
|
|
||||||
siliconsmelter = new PowerSmelter("siliconsmelter") {{
|
siliconsmelter = new PowerSmelter("siliconsmelter") {{
|
||||||
health = 90;
|
health = 90;
|
||||||
craftEffect = Fx.smeltsmoke;
|
craftEffect = BlockFx.smeltsmoke;
|
||||||
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2)};
|
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.sand, 2)};
|
||||||
result = Items.silicon;
|
result = Items.silicon;
|
||||||
powerUse = 0.05f;
|
powerUse = 0.05f;
|
||||||
@@ -44,7 +44,7 @@ public class CraftingBlocks {
|
|||||||
|
|
||||||
poweralloysmelter = new PowerSmelter("poweralloysmelter") {{
|
poweralloysmelter = new PowerSmelter("poweralloysmelter") {{
|
||||||
health = 90;
|
health = 90;
|
||||||
craftEffect = Fx.smeltsmoke;
|
craftEffect = BlockFx.smeltsmoke;
|
||||||
inputs = new ItemStack[]{new ItemStack(Items.titanium, 4), new ItemStack(Items.thorium, 4)};
|
inputs = new ItemStack[]{new ItemStack(Items.titanium, 4), new ItemStack(Items.thorium, 4)};
|
||||||
result = Items.densealloy;
|
result = Items.densealloy;
|
||||||
powerUse = 0.3f;
|
powerUse = 0.3f;
|
||||||
@@ -54,7 +54,7 @@ public class CraftingBlocks {
|
|||||||
|
|
||||||
powersmelter = new PowerSmelter("powersmelter") {{
|
powersmelter = new PowerSmelter("powersmelter") {{
|
||||||
health = 90;
|
health = 90;
|
||||||
craftEffect = Fx.smeltsmoke;
|
craftEffect = BlockFx.smeltsmoke;
|
||||||
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.iron, 1)};
|
inputs = new ItemStack[]{new ItemStack(Items.coal, 1), new ItemStack(Items.iron, 1)};
|
||||||
result = Items.steel;
|
result = Items.steel;
|
||||||
powerUse = 0.1f;
|
powerUse = 0.1f;
|
||||||
@@ -140,8 +140,8 @@ public class CraftingBlocks {
|
|||||||
size = 2;
|
size = 2;
|
||||||
health = 320;
|
health = 320;
|
||||||
hasPower = hasLiquids = true;
|
hasPower = hasLiquids = true;
|
||||||
craftEffect = Fx.formsmoke;
|
craftEffect = BlockFx.formsmoke;
|
||||||
updateEffect = Fx.plasticburn;
|
updateEffect = BlockFx.plasticburn;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
biomatterCompressor = new Compressor("biomattercompressor") {{
|
biomatterCompressor = new Compressor("biomattercompressor") {{
|
||||||
@@ -163,9 +163,9 @@ public class CraftingBlocks {
|
|||||||
powerUse = 0.2f;
|
powerUse = 0.2f;
|
||||||
output = Items.sand;
|
output = Items.sand;
|
||||||
health = 80;
|
health = 80;
|
||||||
craftEffect = Fx.pulverize;
|
craftEffect = BlockFx.pulverize;
|
||||||
craftTime = 60f;
|
craftTime = 60f;
|
||||||
updateEffect = Fx.pulverizeSmall;
|
updateEffect = BlockFx.pulverizeSmall;
|
||||||
hasInventory = hasPower = true;
|
hasInventory = hasPower = true;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ public class CraftingBlocks {
|
|||||||
liquidCapacity = 56f;
|
liquidCapacity = 56f;
|
||||||
output = Items.coal;
|
output = Items.coal;
|
||||||
health = 80;
|
health = 80;
|
||||||
craftEffect = Fx.purifyoil;
|
craftEffect = BlockFx.purifyoil;
|
||||||
hasInventory = hasLiquids = hasPower = true;
|
hasInventory = hasLiquids = hasPower = true;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ public class CraftingBlocks {
|
|||||||
craftTime = 12;
|
craftTime = 12;
|
||||||
output = Items.stone;
|
output = Items.stone;
|
||||||
health = 80;
|
health = 80;
|
||||||
craftEffect = Fx.purifystone;
|
craftEffect = BlockFx.purifystone;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
weaponFactory = new WeaponFactory("weaponfactory") {{
|
weaponFactory = new WeaponFactory("weaponfactory") {{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package io.anuke.mindustry.content.blocks;
|
package io.anuke.mindustry.content.blocks;
|
||||||
|
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
import io.anuke.mindustry.world.blocks.types.Wall;
|
import io.anuke.mindustry.world.blocks.types.Wall;
|
||||||
import io.anuke.mindustry.world.blocks.types.defense.*;
|
import io.anuke.mindustry.world.blocks.types.defense.*;
|
||||||
@@ -58,8 +58,8 @@ public class DefenseBlocks {
|
|||||||
}},
|
}},
|
||||||
|
|
||||||
largedoor = new Door("door-large") {{
|
largedoor = new Door("door-large") {{
|
||||||
openfx = Fx.dooropenlarge;
|
openfx = BlockFx.dooropenlarge;
|
||||||
closefx = Fx.doorcloselarge;
|
closefx = BlockFx.doorcloselarge;
|
||||||
health = 90 * 4 * wallHealthMultiplier;
|
health = 90 * 4 * wallHealthMultiplier;
|
||||||
size = 2;
|
size = 2;
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package io.anuke.mindustry.content.blocks;
|
package io.anuke.mindustry.content.blocks;
|
||||||
|
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
import io.anuke.mindustry.world.blocks.types.defense.RepairTurret;
|
import io.anuke.mindustry.world.blocks.types.defense.RepairTurret;
|
||||||
import io.anuke.mindustry.world.blocks.types.defense.ShieldBlock;
|
import io.anuke.mindustry.world.blocks.types.defense.ShieldBlock;
|
||||||
@@ -20,7 +20,7 @@ public class PowerBlocks {
|
|||||||
maxLiquidGenerate = 0.5f;
|
maxLiquidGenerate = 0.5f;
|
||||||
powerPerLiquid = 0.08f;
|
powerPerLiquid = 0.08f;
|
||||||
powerCapacity = 40f;
|
powerCapacity = 40f;
|
||||||
generateEffect = Fx.redgeneratespark;
|
generateEffect = BlockFx.redgeneratespark;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
combustiongenerator = new LiquidBurnerGenerator("combustiongenerator") {{
|
combustiongenerator = new LiquidBurnerGenerator("combustiongenerator") {{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package io.anuke.mindustry.content.blocks;
|
|||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import io.anuke.mindustry.content.Items;
|
import io.anuke.mindustry.content.Items;
|
||||||
import io.anuke.mindustry.content.Liquids;
|
import io.anuke.mindustry.content.Liquids;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
import io.anuke.mindustry.world.blocks.types.production.Cultivator;
|
import io.anuke.mindustry.world.blocks.types.production.Cultivator;
|
||||||
import io.anuke.mindustry.world.blocks.types.production.Drill;
|
import io.anuke.mindustry.world.blocks.types.production.Drill;
|
||||||
@@ -39,8 +39,8 @@ public class ProductionBlocks {
|
|||||||
powerUse = 0.2f;
|
powerUse = 0.2f;
|
||||||
hasPower = true;
|
hasPower = true;
|
||||||
tier = 5;
|
tier = 5;
|
||||||
updateEffect = Fx.pulverizeMedium;
|
updateEffect = BlockFx.pulverizeMedium;
|
||||||
drillEffect = Fx.mineBig;
|
drillEffect = BlockFx.mineBig;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
nucleardrill = new Drill("nucleardrill") {{
|
nucleardrill = new Drill("nucleardrill") {{
|
||||||
@@ -50,9 +50,9 @@ public class ProductionBlocks {
|
|||||||
drawRim = true;
|
drawRim = true;
|
||||||
hasPower = true;
|
hasPower = true;
|
||||||
tier = 5;
|
tier = 5;
|
||||||
updateEffect = Fx.pulverizeRed;
|
updateEffect = BlockFx.pulverizeRed;
|
||||||
updateEffectChance = 0.03f;
|
updateEffectChance = 0.03f;
|
||||||
drillEffect = Fx.mineHuge;
|
drillEffect = BlockFx.mineHuge;
|
||||||
rotateSpeed = 6f;
|
rotateSpeed = 6f;
|
||||||
warmupSpeed = 0.01f;
|
warmupSpeed = 0.01f;
|
||||||
}},
|
}},
|
||||||
@@ -70,9 +70,9 @@ public class ProductionBlocks {
|
|||||||
tier = 5;
|
tier = 5;
|
||||||
rotateSpeed = 9f;
|
rotateSpeed = 9f;
|
||||||
drawRim = true;
|
drawRim = true;
|
||||||
updateEffect = Fx.pulverizeRedder;
|
updateEffect = BlockFx.pulverizeRedder;
|
||||||
updateEffectChance = 0.04f;
|
updateEffectChance = 0.04f;
|
||||||
drillEffect = Fx.mineHuge;
|
drillEffect = BlockFx.mineHuge;
|
||||||
warmupSpeed = 0.005f;
|
warmupSpeed = 0.005f;
|
||||||
}},
|
}},
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ public class ProductionBlocks {
|
|||||||
oilextractor = new Fracker("oilextractor") {{
|
oilextractor = new Fracker("oilextractor") {{
|
||||||
result = Liquids.oil;
|
result = Liquids.oil;
|
||||||
inputLiquid = Liquids.water;
|
inputLiquid = Liquids.water;
|
||||||
updateEffect = Fx.pulverize;
|
updateEffect = BlockFx.pulverize;
|
||||||
updateEffectChance = 0.05f;
|
updateEffectChance = 0.05f;
|
||||||
inputLiquidUse = 0.3f;
|
inputLiquidUse = 0.3f;
|
||||||
powerUse = 0.6f;
|
powerUse = 0.6f;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import io.anuke.mindustry.content.Items;
|
|||||||
import io.anuke.mindustry.content.Liquids;
|
import io.anuke.mindustry.content.Liquids;
|
||||||
import io.anuke.mindustry.entities.BulletType;
|
import io.anuke.mindustry.entities.BulletType;
|
||||||
import io.anuke.mindustry.entities.effect.TeslaOrb;
|
import io.anuke.mindustry.entities.effect.TeslaOrb;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.mindustry.world.blocks.types.defense.LaserTurret;
|
import io.anuke.mindustry.world.blocks.types.defense.LaserTurret;
|
||||||
@@ -68,7 +68,7 @@ public class WeaponBlocks{
|
|||||||
bullet = BulletType.sniper;
|
bullet = BulletType.sniper;
|
||||||
ammo = Items.steel;
|
ammo = Items.steel;
|
||||||
health = 70;
|
health = 70;
|
||||||
shootEffect = Fx.railshot;
|
shootEffect = BulletFx.railshot;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ public class WeaponBlocks{
|
|||||||
ammo = Items.coal;
|
ammo = Items.coal;
|
||||||
ammoMultiplier = 5;
|
ammoMultiplier = 5;
|
||||||
health = 110;
|
health = 110;
|
||||||
shootEffect = Fx.mortarshot;
|
shootEffect = BulletFx.mortarshot;
|
||||||
shootShake = 2f;
|
shootShake = 2f;
|
||||||
size = 2;
|
size = 2;
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,7 @@ public class WeaponBlocks{
|
|||||||
shootCone = 9f;
|
shootCone = 9f;
|
||||||
ammoMultiplier = 8;
|
ammoMultiplier = 8;
|
||||||
shots = 2;
|
shots = 2;
|
||||||
shootEffect = Fx.chainshot;
|
shootEffect = BulletFx.chainshot;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -194,7 +194,7 @@ public class WeaponBlocks{
|
|||||||
size = 3;
|
size = 3;
|
||||||
rotatespeed = 0.07f;
|
rotatespeed = 0.07f;
|
||||||
shootCone = 9f;
|
shootCone = 9f;
|
||||||
shootEffect = Fx.titanshot;
|
shootEffect = BulletFx.titanshot;
|
||||||
shootShake = 3f;
|
shootShake = 3f;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -211,7 +211,7 @@ public class WeaponBlocks{
|
|||||||
size = 3;
|
size = 3;
|
||||||
rotatespeed = 0.07f;
|
rotatespeed = 0.07f;
|
||||||
shootCone = 9f;
|
shootCone = 9f;
|
||||||
shootEffect = Fx.titanshot;
|
shootEffect = BulletFx.titanshot;
|
||||||
shootShake = 3f;
|
shootShake = 3f;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -227,7 +227,7 @@ public class WeaponBlocks{
|
|||||||
size = 2;
|
size = 2;
|
||||||
rotatespeed = 0.07f;
|
rotatespeed = 0.07f;
|
||||||
shootCone = 9f;
|
shootCone = 9f;
|
||||||
shootEffect = Fx.titanshot;
|
shootEffect = BulletFx.titanshot;
|
||||||
shootShake = 3f;
|
shootShake = 3f;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ package io.anuke.mindustry.entities;
|
|||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import io.anuke.mindustry.entities.effect.DamageArea;
|
import io.anuke.mindustry.entities.effect.DamageArea;
|
||||||
import io.anuke.mindustry.entities.effect.EMP;
|
import io.anuke.mindustry.entities.effect.EMP;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
|
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||||
|
import io.anuke.mindustry.graphics.fx.Fx;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
import io.anuke.ucore.entities.BaseBulletType;
|
import io.anuke.ucore.entities.BaseBulletType;
|
||||||
@@ -12,7 +14,7 @@ import io.anuke.ucore.graphics.Lines;
|
|||||||
import io.anuke.ucore.util.Angles;
|
import io.anuke.ucore.util.Angles;
|
||||||
import io.anuke.ucore.util.Mathf;
|
import io.anuke.ucore.util.Mathf;
|
||||||
|
|
||||||
import static io.anuke.mindustry.graphics.Fx.*;
|
import static io.anuke.mindustry.graphics.fx.Fx.*;
|
||||||
|
|
||||||
public abstract class BulletType extends BaseBulletType<Bullet>{
|
public abstract class BulletType extends BaseBulletType<Bullet>{
|
||||||
|
|
||||||
@@ -52,7 +54,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
|
|
||||||
public void update(Bullet b){
|
public void update(Bullet b){
|
||||||
if(b.timer.get(0, 4)){
|
if(b.timer.get(0, 4)){
|
||||||
Effects.effect(Fx.railsmoke, b.x, b.y);
|
Effects.effect(BulletFx.railsmoke, b.x, b.y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -73,7 +75,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
|
|
||||||
public void update(Bullet b){
|
public void update(Bullet b){
|
||||||
if(b.timer.get(0, 2)){
|
if(b.timer.get(0, 2)){
|
||||||
Effects.effect(Fx.empspark, b.x + Mathf.range(2), b.y + Mathf.range(2));
|
Effects.effect(BulletFx.empspark, b.x + Mathf.range(2), b.y + Mathf.range(2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +85,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
|
|
||||||
public void hit(Bullet b, float hitx, float hity){
|
public void hit(Bullet b, float hitx, float hity){
|
||||||
Timers.run(5f, ()-> new EMP(b.x, b.y, b.getDamage()).add());
|
Timers.run(5f, ()-> new EMP(b.x, b.y, b.getDamage()).add());
|
||||||
Effects.effect(Fx.empshockwave, b);
|
Effects.effect(BulletFx.empshockwave, b);
|
||||||
Effects.shake(3f, 3f, b);
|
Effects.shake(3f, 3f, b);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -118,8 +120,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
public void hit(Bullet b, float hitx, float hity){
|
public void hit(Bullet b, float hitx, float hity){
|
||||||
Effects.shake(3f, 3f, b);
|
Effects.shake(3f, 3f, b);
|
||||||
|
|
||||||
Effects.effect(Fx.shellsmoke, b);
|
Effects.effect(BulletFx.shellsmoke, b);
|
||||||
Effects.effect(Fx.shellexplosion, b);
|
Effects.effect(BulletFx.shellexplosion, b);
|
||||||
|
|
||||||
DamageArea.damage(b.team, b.x, b.y, 25f, (int)(damage * 2f/3f));
|
DamageArea.damage(b.team, b.x, b.y, 25f, (int)(damage * 2f/3f));
|
||||||
}
|
}
|
||||||
@@ -146,7 +148,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void hit(Bullet b, float hitx, float hity) {
|
public void hit(Bullet b, float hitx, float hity) {
|
||||||
Effects.effect(shellsmoke, b);
|
Effects.effect(BulletFx.shellsmoke, b);
|
||||||
for(int i = 0; i < 3; i ++){
|
for(int i = 0; i < 3; i ++){
|
||||||
Bullet bullet = new Bullet(flakspark, b, hitx, hity, b.angle() + Mathf.range(120f));
|
Bullet bullet = new Bullet(flakspark, b, hitx, hity, b.angle() + Mathf.range(120f));
|
||||||
bullet.add();
|
bullet.add();
|
||||||
@@ -198,8 +200,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
public void hit(Bullet b, float hitx, float hity){
|
public void hit(Bullet b, float hitx, float hity){
|
||||||
Effects.shake(3f, 3f, b);
|
Effects.shake(3f, 3f, b);
|
||||||
|
|
||||||
Effects.effect(Fx.shellsmoke, b);
|
Effects.effect(BulletFx.shellsmoke, b);
|
||||||
Effects.effect(Fx.shockwaveSmall, b);
|
Effects.effect(BulletFx.shockwaveSmall, b);
|
||||||
|
|
||||||
DamageArea.damage(b.team, b.x, b.y, 50f, (int)(damage * 2f/3f));
|
DamageArea.damage(b.team, b.x, b.y, 50f, (int)(damage * 2f/3f));
|
||||||
}
|
}
|
||||||
@@ -229,8 +231,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
public void hit(Bullet b, float hitx, float hity){
|
public void hit(Bullet b, float hitx, float hity){
|
||||||
Effects.shake(3f, 3f, b);
|
Effects.shake(3f, 3f, b);
|
||||||
|
|
||||||
Effects.effect(Fx.shellsmoke, b);
|
Effects.effect(BulletFx.shellsmoke, b);
|
||||||
Effects.effect(Fx.shockwaveSmall, b);
|
Effects.effect(BulletFx.shockwaveSmall, b);
|
||||||
|
|
||||||
DamageArea.damage(b.team, b.x, b.y, 25f, (int)(damage * 2f/3f));
|
DamageArea.damage(b.team, b.x, b.y, 25f, (int)(damage * 2f/3f));
|
||||||
}
|
}
|
||||||
@@ -249,8 +251,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
public void hit(Bullet b, float hitx, float hity){
|
public void hit(Bullet b, float hitx, float hity){
|
||||||
Effects.shake(3f, 3f, b);
|
Effects.shake(3f, 3f, b);
|
||||||
|
|
||||||
Effects.effect(Fx.blastsmoke, b);
|
Effects.effect(BlockFx.blastsmoke, b);
|
||||||
Effects.effect(Fx.blastexplosion, b);
|
Effects.effect(BulletFx.blastexplosion, b);
|
||||||
|
|
||||||
//TODO remove translation() usage
|
//TODO remove translation() usage
|
||||||
Angles.circleVectors(30, 6f, (nx, ny) -> {
|
Angles.circleVectors(30, 6f, (nx, ny) -> {
|
||||||
@@ -368,7 +370,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
public void hit(Bullet b, float hitx, float hity){
|
public void hit(Bullet b, float hitx, float hity){
|
||||||
Effects.shake(1.5f, 1.5f, b);
|
Effects.shake(1.5f, 1.5f, b);
|
||||||
|
|
||||||
Effects.effect(Fx.clusterbomb, b);
|
Effects.effect(BulletFx.clusterbomb, b);
|
||||||
|
|
||||||
DamageArea.damage(b.team, b.x, b.y, 35f, damage);
|
DamageArea.damage(b.team, b.x, b.y, 35f, damage);
|
||||||
}
|
}
|
||||||
@@ -391,7 +393,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
|
|
||||||
public void update(Bullet b){
|
public void update(Bullet b){
|
||||||
if(b.timer.get(0, 4)){
|
if(b.timer.get(0, 4)){
|
||||||
Effects.effect(Fx.chainsmoke, b.x, b.y);
|
Effects.effect(BulletFx.chainsmoke, b.x, b.y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -449,7 +451,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void init(Bullet b) {
|
public void init(Bullet b) {
|
||||||
DamageArea.damageLine(b.team, Fx.beamhit, b.x, b.y, b.angle(), length, damage);
|
DamageArea.damageLine(b.team, BulletFx.beamhit, b.x, b.y, b.angle(), length, damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(Bullet b) {
|
public void draw(Bullet b) {
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import io.anuke.mindustry.content.Mechs;
|
|||||||
import io.anuke.mindustry.content.Weapons;
|
import io.anuke.mindustry.content.Weapons;
|
||||||
import io.anuke.mindustry.content.blocks.Blocks;
|
import io.anuke.mindustry.content.blocks.Blocks;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.ExplosionFx;
|
||||||
|
import io.anuke.mindustry.graphics.fx.Fx;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
import io.anuke.mindustry.net.NetEvents;
|
import io.anuke.mindustry.net.NetEvents;
|
||||||
import io.anuke.mindustry.resource.Mech;
|
import io.anuke.mindustry.resource.Mech;
|
||||||
@@ -109,7 +110,7 @@ public class Player extends Unit{
|
|||||||
NetEvents.handleUnitDeath(this);
|
NetEvents.handleUnitDeath(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Effects.effect(Fx.explosion, this);
|
Effects.effect(ExplosionFx.explosion, this);
|
||||||
Effects.shake(4f, 5f, this);
|
Effects.shake(4f, 5f, this);
|
||||||
Effects.sound("die", this);
|
Effects.sound("die", this);
|
||||||
|
|
||||||
@@ -120,7 +121,7 @@ public class Player extends Unit{
|
|||||||
@Override
|
@Override
|
||||||
public void onRemoteDeath(){
|
public void onRemoteDeath(){
|
||||||
dead = true;
|
dead = true;
|
||||||
Effects.effect(Fx.explosion, this);
|
Effects.effect(ExplosionFx.explosion, this);
|
||||||
Effects.shake(4f, 5f, this);
|
Effects.shake(4f, 5f, this);
|
||||||
Effects.sound("die", this);
|
Effects.sound("die", this);
|
||||||
|
|
||||||
@@ -245,7 +246,7 @@ public class Player extends Unit{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(dashing && timer.get(timerDash, 3) && movement.len() > 0){
|
if(dashing && timer.get(timerDash, 3) && movement.len() > 0){
|
||||||
Effects.effect(Fx.dashsmoke, x + Angles.trnsx(rotation + 180f, 3f), y + Angles.trnsy(rotation + 180f, 3f));
|
Effects.effect(Fx.dash, x + Angles.trnsx(rotation + 180f, 3f), y + Angles.trnsy(rotation + 180f, 3f));
|
||||||
}
|
}
|
||||||
|
|
||||||
movement.limit(speed);
|
movement.limit(speed);
|
||||||
@@ -357,11 +358,11 @@ public class Player extends Unit{
|
|||||||
float ty = y + Angles.trnsy(rotation + 180f, 4f);
|
float ty = y + Angles.trnsy(rotation + 180f, 4f);
|
||||||
|
|
||||||
if(mech.flying && i.target.dst(i.last) > 2f && timer.get(timerDash, 1)){
|
if(mech.flying && i.target.dst(i.last) > 2f && timer.get(timerDash, 1)){
|
||||||
Effects.effect(Fx.dashsmoke, tx, ty);
|
Effects.effect(Fx.dash, tx, ty);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dashing && !dead && timer.get(timerDash, 3) && i.target.dst(i.last) > 1f){
|
if(dashing && !dead && timer.get(timerDash, 3) && i.target.dst(i.last) > 1f){
|
||||||
Effects.effect(Fx.dashsmoke, tx, ty);
|
Effects.effect(Fx.dash, tx, ty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package io.anuke.mindustry.entities;
|
package io.anuke.mindustry.entities;
|
||||||
|
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.Fx;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
import io.anuke.mindustry.net.NetEvents;
|
import io.anuke.mindustry.net.NetEvents;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package io.anuke.mindustry.entities.effect;
|
|||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import com.badlogic.gdx.math.Vector2;
|
import com.badlogic.gdx.math.Vector2;
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
import io.anuke.ucore.entities.TimedEntity;
|
import io.anuke.ucore.entities.TimedEntity;
|
||||||
@@ -61,7 +61,7 @@ public class EMP extends TimedEntity{
|
|||||||
if(tile == null) continue;
|
if(tile == null) continue;
|
||||||
|
|
||||||
//entity may be null here, after the block is dead!
|
//entity may be null here, after the block is dead!
|
||||||
Effects.effect(Fx.empspark, tile.worldx(), tile.worldy());
|
Effects.effect(BulletFx.empspark, tile.worldx(), tile.worldy());
|
||||||
if(tile.entity != null) tile.entity.damage(damage);
|
if(tile.entity != null) tile.entity.damage(damage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.badlogic.gdx.utils.ObjectSet;
|
|||||||
import io.anuke.mindustry.entities.Units;
|
import io.anuke.mindustry.entities.Units;
|
||||||
import io.anuke.mindustry.entities.units.BaseUnit;
|
import io.anuke.mindustry.entities.units.BaseUnit;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
import io.anuke.ucore.entities.Entity;
|
import io.anuke.ucore.entities.Entity;
|
||||||
@@ -70,7 +70,7 @@ public class TeslaOrb extends Entity{
|
|||||||
|
|
||||||
void damageEnemy(BaseUnit enemy){
|
void damageEnemy(BaseUnit enemy){
|
||||||
enemy.damage(damage);
|
enemy.damage(damage);
|
||||||
Effects.effect(Fx.laserhit, enemy.x + Mathf.range(2f), enemy.y + Mathf.range(2f));
|
Effects.effect(BulletFx.laserhit, enemy.x + Mathf.range(2f), enemy.y + Mathf.range(2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.utils.ObjectSet;
|
|||||||
import io.anuke.mindustry.entities.BulletType;
|
import io.anuke.mindustry.entities.BulletType;
|
||||||
import io.anuke.mindustry.entities.Unit;
|
import io.anuke.mindustry.entities.Unit;
|
||||||
import io.anuke.mindustry.game.TeamInfo.TeamData;
|
import io.anuke.mindustry.game.TeamInfo.TeamData;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.Fx;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
@@ -34,7 +34,7 @@ public class FlyingUnitType extends UnitType {
|
|||||||
unit.rotation = unit.velocity.angle();
|
unit.rotation = unit.velocity.angle();
|
||||||
|
|
||||||
if(unit.velocity.len() > 0.2f && unit.timer.get(timerBoost, 2f)){
|
if(unit.velocity.len() > 0.2f && unit.timer.get(timerBoost, 2f)){
|
||||||
Effects.effect(Fx.dashsmoke, unit.x + Angles.trnsx(unit.rotation + 180f, boosterLength),
|
Effects.effect(Fx.dash, unit.x + Angles.trnsx(unit.rotation + 180f, boosterLength),
|
||||||
unit.y + Angles.trnsy(unit.rotation + 180f, boosterLength));
|
unit.y + Angles.trnsy(unit.rotation + 180f, boosterLength));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import io.anuke.mindustry.entities.Bullet;
|
|||||||
import io.anuke.mindustry.entities.BulletType;
|
import io.anuke.mindustry.entities.BulletType;
|
||||||
import io.anuke.mindustry.entities.Unit;
|
import io.anuke.mindustry.entities.Unit;
|
||||||
import io.anuke.mindustry.entities.Units;
|
import io.anuke.mindustry.entities.Units;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.ExplosionFx;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
import io.anuke.mindustry.net.NetEvents;
|
import io.anuke.mindustry.net.NetEvents;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
@@ -111,7 +111,7 @@ public abstract class UnitType {
|
|||||||
|
|
||||||
public void onDeath(BaseUnit unit){
|
public void onDeath(BaseUnit unit){
|
||||||
//TODO other things, such as enemies?
|
//TODO other things, such as enemies?
|
||||||
Effects.effect(Fx.explosion, unit);
|
Effects.effect(ExplosionFx.explosion, unit);
|
||||||
|
|
||||||
if(Net.server()){
|
if(Net.server()){
|
||||||
NetEvents.handleUnitDeath(unit);
|
NetEvents.handleUnitDeath(unit);
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package io.anuke.mindustry.graphics;
|
|
||||||
|
|
||||||
public class BlockFx {
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
@@ -30,6 +30,7 @@ public class BlockRenderer{
|
|||||||
private CacheBatch cbatch;
|
private CacheBatch cbatch;
|
||||||
|
|
||||||
private Array<BlockRequest> requests = new Array<BlockRequest>(initialRequests);
|
private Array<BlockRequest> requests = new Array<BlockRequest>(initialRequests);
|
||||||
|
private Layer lastLayer;
|
||||||
private int requestidx = 0;
|
private int requestidx = 0;
|
||||||
private int iterateidx = 0;
|
private int iterateidx = 0;
|
||||||
|
|
||||||
@@ -57,6 +58,7 @@ public class BlockRenderer{
|
|||||||
/**Process all blocks to draw, simultaneously drawing block shadows and static blocks.*/
|
/**Process all blocks to draw, simultaneously drawing block shadows and static blocks.*/
|
||||||
public void processBlocks(){
|
public void processBlocks(){
|
||||||
requestidx = 0;
|
requestidx = 0;
|
||||||
|
lastLayer = null;
|
||||||
|
|
||||||
int crangex = (int) (camera.viewportWidth / (chunksize * tilesize)) + 1;
|
int crangex = (int) (camera.viewportWidth / (chunksize * tilesize)) + 1;
|
||||||
int crangey = (int) (camera.viewportHeight / (chunksize * tilesize)) + 1;
|
int crangey = (int) (camera.viewportHeight / (chunksize * tilesize)) + 1;
|
||||||
@@ -131,6 +133,11 @@ public class BlockRenderer{
|
|||||||
BlockRequest req = requests.get(iterateidx);
|
BlockRequest req = requests.get(iterateidx);
|
||||||
Block block = req.tile.block();
|
Block block = req.tile.block();
|
||||||
|
|
||||||
|
if(req.layer != lastLayer){
|
||||||
|
if(lastLayer != null) layerEnds(lastLayer);
|
||||||
|
layerBegins(req.layer);
|
||||||
|
}
|
||||||
|
|
||||||
if(req.layer == Layer.block){
|
if(req.layer == Layer.block){
|
||||||
block.draw(req.tile);
|
block.draw(req.tile);
|
||||||
}else if(req.layer == block.layer){
|
}else if(req.layer == block.layer){
|
||||||
@@ -138,6 +145,8 @@ public class BlockRenderer{
|
|||||||
}else if(req.layer == block.layer2){
|
}else if(req.layer == block.layer2){
|
||||||
block.drawLayer2(req.tile);
|
block.drawLayer2(req.tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastLayer = req.layer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +179,11 @@ public class BlockRenderer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void layerBegins(Layer layer){}
|
||||||
|
|
||||||
|
private void layerEnds(Layer layer){}
|
||||||
|
|
||||||
private void addRequest(Tile tile, Layer layer){
|
private void addRequest(Tile tile, Layer layer){
|
||||||
if(requestidx >= requests.size){
|
if(requestidx >= requests.size){
|
||||||
requests.add(new BlockRequest());
|
requests.add(new BlockRequest());
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package io.anuke.mindustry.graphics;
|
|
||||||
|
|
||||||
public class ExplosionFx {
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
@@ -1,608 +0,0 @@
|
|||||||
package io.anuke.mindustry.graphics;
|
|
||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color;
|
|
||||||
import com.badlogic.gdx.graphics.Colors;
|
|
||||||
import io.anuke.ucore.core.Effects.Effect;
|
|
||||||
import io.anuke.ucore.graphics.*;
|
|
||||||
import io.anuke.ucore.util.Angles;
|
|
||||||
import io.anuke.ucore.util.Mathf;
|
|
||||||
|
|
||||||
import static io.anuke.mindustry.Vars.respawnduration;
|
|
||||||
import static io.anuke.mindustry.Vars.tilesize;
|
|
||||||
|
|
||||||
public class Fx{
|
|
||||||
public static Color lightRed = Hue.mix(Color.WHITE, Color.FIREBRICK, 0.1f);
|
|
||||||
public static Color lightOrange = Color.valueOf("f68021");
|
|
||||||
public static Color lighterOrange = Color.valueOf("f6e096");
|
|
||||||
public static Color whiteOrange = Hue.mix(lightOrange, Color.WHITE, 0.6f);
|
|
||||||
public static Color whiteYellow = Hue.mix(Color.YELLOW, Color.WHITE, 0.6f);
|
|
||||||
public static Color lightGray = Color.valueOf("b0b0b0");
|
|
||||||
public static Color glowy = Color.valueOf("fdc056");
|
|
||||||
public static Color beam = Color.valueOf("9bffbe");
|
|
||||||
public static Color beamLight = Color.valueOf("ddffe9");
|
|
||||||
public static Color stoneGray = Color.valueOf("8f8f8f");
|
|
||||||
|
|
||||||
public static final Effect
|
|
||||||
|
|
||||||
none = new Effect(0, 0f, e->{}),
|
|
||||||
|
|
||||||
generatorexplosion = new Effect(28, 40f, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 16, 10f + e.ifract()*8f, (x, y)->{
|
|
||||||
float size = e.fract()*12f + 1f;
|
|
||||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
|
||||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
reactorsmoke = new Effect(17, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 4, e.ifract()*8f, (x, y)->{
|
|
||||||
float size = 1f+e.fract()*5f;
|
|
||||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
|
|
||||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
nuclearsmoke = new Effect(40, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 4, e.ifract()*13f, (x, y)->{
|
|
||||||
float size = e.sfract()*4f;
|
|
||||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
|
|
||||||
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.powfract()*90f, (x, y)->{
|
|
||||||
float size = e.fract()*14f;
|
|
||||||
Draw.color(Color.LIME, Color.GRAY, e.ifract());
|
|
||||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
chainshot = new Effect(9f, e -> {
|
|
||||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*4f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*7f);
|
|
||||||
Lines.stroke(e.fract()*2f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
mortarshot = new Effect(10f, e -> {
|
|
||||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*6f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
|
|
||||||
Lines.stroke(e.fract()*5f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
|
|
||||||
Lines.stroke(e.fract()*1f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
railshot = new Effect(9f, e -> {
|
|
||||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*5f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*8f);
|
|
||||||
Lines.stroke(e.fract()*4f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
|
|
||||||
Lines.stroke(e.fract()*1f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
titanshot = new Effect(12f, e -> {
|
|
||||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*7f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
|
|
||||||
Lines.stroke(e.fract()*4f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
|
|
||||||
Lines.stroke(e.fract()*2f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*18f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
largeCannonShot = new Effect(11f, e -> {
|
|
||||||
Draw.color(Color.WHITE, whiteYellow, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*6f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
|
|
||||||
Lines.stroke(e.fract()*3f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
|
|
||||||
Lines.stroke(e.fract()*1f);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*18f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
shockwave = new Effect(10f, 80f, e -> {
|
|
||||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*2f + 0.2f);
|
|
||||||
Lines.circle(e.x, e.y, e.ifract()*28f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
nuclearShockwave = new Effect(10f, 200f, e -> {
|
|
||||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*3f + 0.2f);
|
|
||||||
Lines.poly(e.x, e.y, 40, e.ifract()*140f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
shockwaveSmall = new Effect(10f, e -> {
|
|
||||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*2f + 0.1f);
|
|
||||||
Lines.circle(e.x, e.y, e.ifract()*15f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
empshockwave = new Effect(7f, e -> {
|
|
||||||
Draw.color(Color.WHITE, Color.SKY, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*2f);
|
|
||||||
Lines.circle(e.x, e.y, e.ifract()*40f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
empspark = new Effect(13, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 7, 1f + e.ifract()*12f, (x, y)->{
|
|
||||||
float len = 1f+e.fract()*6f;
|
|
||||||
Draw.color(Color.SKY);
|
|
||||||
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
redgeneratespark = new Effect(18, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 5, e.ifract()*8f, (x, y)->{
|
|
||||||
float len = e.fract()*4f;
|
|
||||||
Draw.color(Color.valueOf("fbb97f"), Color.GRAY, e.ifract());
|
|
||||||
//Draw.alpha(e.fract());
|
|
||||||
Draw.rect("circle", e.x + x, e.y + y, len, len);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
generatespark = new Effect(18, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 5, e.ifract()*8f, (x, y)->{
|
|
||||||
float len = e.fract()*4f;
|
|
||||||
Draw.color(Color.valueOf("d2b29c"), Color.GRAY, e.ifract());
|
|
||||||
Draw.rect("circle", e.x + x, e.y + y, len, len);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
fuelburn = new Effect(23, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 5, e.ifract()*9f, (x, y)->{
|
|
||||||
float len = e.fract()*4f;
|
|
||||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
|
|
||||||
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.ifract()*5f, (x, y)->{
|
|
||||||
Draw.color(Color.valueOf("e9ead3"), Color.GRAY, e.ifract());
|
|
||||||
Fill.circle(e.x + x, e.y + y, e.fract()*1f);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
pulverize = new Effect(40, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*8f, (x, y)->{
|
|
||||||
Draw.color(stoneGray);
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f + 0.5f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
pulverizeRed = new Effect(40, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*8f, (x, y)->{
|
|
||||||
Draw.color(Color.valueOf("ffa480"), stoneGray, e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f + 0.5f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
pulverizeRedder = new Effect(40, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*9f, (x, y)->{
|
|
||||||
Draw.color(Color.valueOf("ff7b69"), stoneGray, e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2.5f + 0.5f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
pulverizeSmall = new Effect(30, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 3, e.ifract()*5f, (x, y)->{
|
|
||||||
Draw.color(stoneGray);
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 1f + 0.5f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
pulverizeMedium = new Effect(30, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*8f, (x, y)->{
|
|
||||||
Draw.color(stoneGray);
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 1f + 0.5f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
laserspark = new Effect(14, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 8, 1f + e.ifract()*11f, (x, y)->{
|
|
||||||
float len = 1f+e.fract()*5f;
|
|
||||||
Draw.color(Color.WHITE, Color.CORAL, e.ifract());
|
|
||||||
Draw.alpha(e.ifract()/1.3f);
|
|
||||||
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
shellsmoke = new Effect(20, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 8, 3f + e.ifract()*17f, (x, y)->{
|
|
||||||
float size = 2f+e.fract()*5f;
|
|
||||||
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
|
|
||||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
producesmoke = new Effect(12, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 8, 4f + e.ifract()*18f, (x, y)->{
|
|
||||||
Draw.color(Color.WHITE, Colors.get("accent"), e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, 1f+e.fract()*3f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
smeltsmoke = new Effect(15, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 6, 4f + e.ifract()*5f, (x, y)->{
|
|
||||||
Draw.color(Color.WHITE, e.color, e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, 0.5f+e.fract()*2f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
formsmoke = new Effect(40, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 6, 5f + e.ifract()*8f, (x, y)->{
|
|
||||||
Draw.color(Color.valueOf("f1e479"), Color.LIGHT_GRAY, e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, 0.2f+e.fract()*2f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
blastsmoke = new Effect(26, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 12, 1f + e.ifract()*23f, (x, y)->{
|
|
||||||
float size = 2f+e.fract()*6f;
|
|
||||||
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
|
|
||||||
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.ifract()*10f, (x, y)->{
|
|
||||||
float size = e.sfract()*4f;
|
|
||||||
Draw.color(Color.ORANGE, Color.GRAY, e.ifract());
|
|
||||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
lavabubble = new Effect(45f, e -> {
|
|
||||||
Draw.color(Color.ORANGE);
|
|
||||||
float scl = 0.35f;
|
|
||||||
Lines.stroke(1f - Mathf.clamp(e.ifract() - (1f-scl)) * (1f/scl));
|
|
||||||
Lines.circle(e.x, e.y, e.ifract()*4f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
oilbubble = new Effect(64f, e -> {
|
|
||||||
Draw.color(Color.DARK_GRAY);
|
|
||||||
float scl = 0.25f;
|
|
||||||
Lines.stroke(1f - Mathf.clamp(e.ifract() - (1f-scl)) * (1f/scl));
|
|
||||||
Lines.circle(e.x, e.y, e.ifract()*3f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
shellexplosion = new Effect(9, e -> {
|
|
||||||
Lines.stroke(2f - e.ifract()*1.7f);
|
|
||||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
|
||||||
Lines.circle(e.x, e.y, 3f + e.ifract() * 9f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
blastexplosion = new Effect(14, e -> {
|
|
||||||
Lines.stroke(1.2f - e.ifract());
|
|
||||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
|
||||||
Lines.circle(e.x, e.y, 1.5f + e.ifract() * 9f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
place = new Effect(16, e -> {
|
|
||||||
Lines.stroke(3f - e.ifract() * 2f);
|
|
||||||
Lines.square(e.x, e.y, tilesize / 2f + e.ifract() * 3f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
dooropen = new Effect(10, e -> {
|
|
||||||
Lines.stroke(e.fract() * 1.6f);
|
|
||||||
Lines.square(e.x, e.y, tilesize / 2f + e.ifract() * 2f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
doorclose= new Effect(10, e -> {
|
|
||||||
Lines.stroke(e.fract() * 1.6f);
|
|
||||||
Lines.square(e.x, e.y, tilesize / 2f + e.fract() * 2f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
dooropenlarge = new Effect(10, e -> {
|
|
||||||
Lines.stroke(e.fract() * 1.6f);
|
|
||||||
Lines.square(e.x, e.y, tilesize + e.ifract() * 2f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
doorcloselarge = new Effect(10, e -> {
|
|
||||||
Lines.stroke(e.fract() * 1.6f);
|
|
||||||
Lines.square(e.x, e.y, tilesize + e.fract() * 2f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
purify = new Effect(10, e -> {
|
|
||||||
Draw.color(Color.ROYAL, Color.GRAY, e.ifract());
|
|
||||||
Lines.stroke(2f);
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
purifyoil = new Effect(10, e -> {
|
|
||||||
Draw.color(Color.BLACK, Color.GRAY, e.ifract());
|
|
||||||
Lines.stroke(2f);
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
purifystone = new Effect(10, e -> {
|
|
||||||
Draw.color(Color.ORANGE, Color.GRAY, e.ifract());
|
|
||||||
Lines.stroke(2f);
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
generate = new Effect(11, e -> {
|
|
||||||
Draw.color(Color.ORANGE, Color.YELLOW, e.ifract());
|
|
||||||
Lines.stroke(1f);
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
spark = new Effect(10, e -> {
|
|
||||||
Lines.stroke(1f);
|
|
||||||
Draw.color(Color.WHITE, Color.GRAY, e.ifract());
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
mine = new Effect(20, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 6, 3f + e.ifract()*6f, (x, y)->{
|
|
||||||
Draw.color(e.color, Color.LIGHT_GRAY, e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
mineBig = new Effect(30, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 6, 4f + e.ifract()*8f, (x, y)->{
|
|
||||||
Draw.color(e.color, Color.LIGHT_GRAY, e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f + 0.2f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
mineHuge = new Effect(40, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 8, 5f + e.ifract()*10f, (x, y)->{
|
|
||||||
Draw.color(e.color, Color.LIGHT_GRAY, e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f + 0.5f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
mineMassive = new Effect(50, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 8, 5f + e.ifract()*14f, (x, y)->{
|
|
||||||
Draw.color(e.color, Color.LIGHT_GRAY, e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2.5f + 0.5f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
sparkbig = new Effect(11, e -> {
|
|
||||||
Lines.stroke(1f);
|
|
||||||
Draw.color(lightRed, Color.GRAY, e.ifract());
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2.3f, 8);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
smelt = new Effect(20, e -> {
|
|
||||||
Angles.randLenVectors(e.id, 6, 2f + e.ifract()*5f, (x, y)->{
|
|
||||||
Draw.color(Color.WHITE, e.color, e.ifract());
|
|
||||||
Fill.poly(e.x + x, e.y + y, 4, 0.5f+e.fract()*2f, 45);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
|
|
||||||
breakBlock = new Effect(12, e -> {
|
|
||||||
Lines.stroke(2f);
|
|
||||||
Draw.color(Color.WHITE, Colors.get("break"), e.ifract());
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 6f, 2, 5, 90);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
hit = new Effect(10, e -> {
|
|
||||||
Lines.stroke(1f);
|
|
||||||
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 3f, 2, 8);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
laserhit = new Effect(10, e -> {
|
|
||||||
Lines.stroke(1f);
|
|
||||||
Draw.color(Color.WHITE, Color.SKY, e.ifract());
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 2f, 2, 6);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
shieldhit = new Effect(9, e -> {
|
|
||||||
Lines.stroke(1f);
|
|
||||||
Draw.color(Color.WHITE, Color.SKY, e.ifract());
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 6);
|
|
||||||
Lines.stroke(4f*e.fract());
|
|
||||||
Lines.circle(e.x, e.y, e.ifract()*14f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
laserShoot = new Effect(8, e -> {
|
|
||||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
|
||||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 6f, 2f, 0.8f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
spreadShoot = new Effect(12, e -> {
|
|
||||||
Draw.color(Color.WHITE, Color.PURPLE, e.ifract());
|
|
||||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 9f, 3.5f, 0.8f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
clusterShoot = new Effect(12, e -> {
|
|
||||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
|
||||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2.5f, 0.7f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
vulcanShoot = new Effect(8, e -> {
|
|
||||||
Draw.color(lighterOrange, lightOrange, e.ifract());
|
|
||||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2f, 0.7f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
shockShoot = new Effect(8, e -> {
|
|
||||||
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
|
|
||||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 14f, 4f, 0.8f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
beamShoot = new Effect(8, e -> {
|
|
||||||
Draw.color(beamLight, beam, e.ifract());
|
|
||||||
Shapes.lineShot(e.x, e.y, e.rotation - 70, 3, e.fract(), 12f, 1f, 0.5f);
|
|
||||||
Shapes.lineShot(e.x, e.y, e.rotation + 70, 3, e.fract(), 12f, 1f, 0.5f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
beamhit = new Effect(8, e -> {
|
|
||||||
Draw.color(beamLight, beam, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*3f+0.5f);
|
|
||||||
Lines.circle(e.x, e.y, e.ifract()*8f);
|
|
||||||
Lines.spikes(e.x, e.y, e.ifract()*6f, 2f, 4, 45);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
explosion = new Effect(11, e -> {
|
|
||||||
Lines.stroke(2f*e.fract()+0.5f);
|
|
||||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract());
|
|
||||||
Lines.circle(e.x, e.y, 5f + e.powfract() * 6f);
|
|
||||||
|
|
||||||
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
|
|
||||||
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
|
|
||||||
Fill.circle(e.x + x, e.y + y, e.fract()*5f + 2.5f);
|
|
||||||
});
|
|
||||||
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
|
|
||||||
blockexplosion = new Effect(13, e -> {
|
|
||||||
Angles.randLenVectors(e.id+1, 8, 5f + e.ifract()*11f, (x, y)->{
|
|
||||||
float size = 2f+e.fract()*8f;
|
|
||||||
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
|
|
||||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
|
|
||||||
Lines.stroke(2f*e.fract()+0.4f);
|
|
||||||
Draw.color(Color.WHITE, Color.ORANGE, e.powfract());
|
|
||||||
Lines.circle(e.x, e.y, 2f + e.powfract() * 9f);
|
|
||||||
|
|
||||||
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
|
|
||||||
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
|
|
||||||
Fill.circle(e.x + x, e.y + y, e.fract()*5f + 1f);
|
|
||||||
});
|
|
||||||
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
clusterbomb = new Effect(10f, e -> {
|
|
||||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
|
||||||
Lines.stroke(e.fract()*1.5f);
|
|
||||||
Lines.poly(e.x, e.y, 4, e.fract()*8f);
|
|
||||||
Lines.circle(e.x, e.y, e.ifract()*14f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
coreexplosion = new Effect(13, e -> {
|
|
||||||
Lines.stroke(3f-e.ifract()*2f);
|
|
||||||
Draw.color(Color.ORANGE, Color.WHITE, e.ifract());
|
|
||||||
Lines.spikes(e.x, e.y, 5f + e.ifract() * 40f, 6, 6);
|
|
||||||
Lines.circle(e.x, e.y, 4f + e.ifract() * 40f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
smoke = new Effect(100, e -> {
|
|
||||||
Draw.color(Color.GRAY, new Color(0.3f, 0.3f, 0.3f, 1f), e.ifract());
|
|
||||||
float size = 7f-e.ifract()*7f;
|
|
||||||
Draw.rect("circle", e.x, e.y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
railsmoke = new Effect(30, e -> {
|
|
||||||
Draw.color(Color.LIGHT_GRAY, Color.WHITE, e.ifract());
|
|
||||||
float size = e.fract()*4f;
|
|
||||||
Draw.rect("circle", e.x, e.y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
chainsmoke = new Effect(30, e -> {
|
|
||||||
Draw.color(lightGray);
|
|
||||||
float size = e.fract()*4f;
|
|
||||||
Draw.rect("circle", e.x, e.y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
dashsmoke = new Effect(30, e -> {
|
|
||||||
Draw.color(Color.CORAL, Color.GRAY, e.ifract());
|
|
||||||
float size = e.fract()*4f;
|
|
||||||
Draw.rect("circle", e.x, e.y, size, size);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
spawn = new Effect(23, e -> {
|
|
||||||
Lines.stroke(2f);
|
|
||||||
Draw.color(Color.DARK_GRAY, Color.SCARLET, e.ifract());
|
|
||||||
Lines.circle(e.x, e.y, 7f - e.ifract() * 6f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
respawn = new Effect(respawnduration, e -> {
|
|
||||||
Draw.tcolor(Color.SCARLET);
|
|
||||||
Draw.tscl(0.25f);
|
|
||||||
Draw.text("Respawning in " + (int)((e.lifetime-e.time)/60), e.x, e.y);
|
|
||||||
Draw.tscl(0.5f);
|
|
||||||
Draw.reset();
|
|
||||||
}),
|
|
||||||
|
|
||||||
transfer = new Effect(20, e -> {
|
|
||||||
Draw.color(Color.SCARLET, Color.CLEAR, e.fract());
|
|
||||||
Lines.square(e.x, e.y, 4);
|
|
||||||
Lines.lineAngle(e.x, e.y, e.rotation, 5f);
|
|
||||||
Draw.reset();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package io.anuke.mindustry.graphics;
|
|
||||||
|
|
||||||
public class TurretFx {
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
216
core/src/io/anuke/mindustry/graphics/fx/BlockFx.java
Normal file
216
core/src/io/anuke/mindustry/graphics/fx/BlockFx.java
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
package io.anuke.mindustry.graphics.fx;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.graphics.Color;
|
||||||
|
import com.badlogic.gdx.graphics.Colors;
|
||||||
|
import io.anuke.ucore.core.Effects.Effect;
|
||||||
|
import io.anuke.ucore.graphics.Draw;
|
||||||
|
import io.anuke.ucore.graphics.Fill;
|
||||||
|
import io.anuke.ucore.graphics.Lines;
|
||||||
|
import io.anuke.ucore.util.Angles;
|
||||||
|
|
||||||
|
import static io.anuke.mindustry.Vars.tilesize;
|
||||||
|
|
||||||
|
public class BlockFx {
|
||||||
|
public static final Effect
|
||||||
|
|
||||||
|
reactorsmoke = new Effect(17, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 4, e.ifract()*8f, (x, y)->{
|
||||||
|
float size = 1f+e.fract()*5f;
|
||||||
|
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
|
||||||
|
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
nuclearsmoke = new Effect(40, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 4, e.ifract()*13f, (x, y)->{
|
||||||
|
float size = e.sfract()*4f;
|
||||||
|
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
|
||||||
|
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.powfract()*90f, (x, y)->{
|
||||||
|
float size = e.fract()*14f;
|
||||||
|
Draw.color(Color.LIME, Color.GRAY, e.ifract());
|
||||||
|
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
redgeneratespark = new Effect(18, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 5, e.ifract()*8f, (x, y)->{
|
||||||
|
float len = e.fract()*4f;
|
||||||
|
Draw.color(Color.valueOf("fbb97f"), Color.GRAY, e.ifract());
|
||||||
|
//Draw.alpha(e.fract());
|
||||||
|
Draw.rect("circle", e.x + x, e.y + y, len, len);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
generatespark = new Effect(18, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 5, e.ifract()*8f, (x, y)->{
|
||||||
|
float len = e.fract()*4f;
|
||||||
|
Draw.color(Color.valueOf("d2b29c"), Color.GRAY, e.ifract());
|
||||||
|
Draw.rect("circle", e.x + x, e.y + y, len, len);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
fuelburn = new Effect(23, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 5, e.ifract()*9f, (x, y)->{
|
||||||
|
float len = e.fract()*4f;
|
||||||
|
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
|
||||||
|
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.ifract()*5f, (x, y)->{
|
||||||
|
Draw.color(Color.valueOf("e9ead3"), Color.GRAY, e.ifract());
|
||||||
|
Fill.circle(e.x + x, e.y + y, e.fract()*1f);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
pulverize = new Effect(40, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*8f, (x, y)->{
|
||||||
|
Draw.color(Fx.stoneGray);
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f + 0.5f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
pulverizeRed = new Effect(40, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*8f, (x, y)->{
|
||||||
|
Draw.color(Color.valueOf("ffa480"), Fx.stoneGray, e.ifract());
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f + 0.5f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
pulverizeRedder = new Effect(40, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*9f, (x, y)->{
|
||||||
|
Draw.color(Color.valueOf("ff7b69"), Fx.stoneGray, e.ifract());
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2.5f + 0.5f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
pulverizeSmall = new Effect(30, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 3, e.ifract()*5f, (x, y)->{
|
||||||
|
Draw.color(Fx.stoneGray);
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 1f + 0.5f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
pulverizeMedium = new Effect(30, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 5, 3f + e.ifract()*8f, (x, y)->{
|
||||||
|
Draw.color(Fx.stoneGray);
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 1f + 0.5f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
producesmoke = new Effect(12, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 8, 4f + e.ifract()*18f, (x, y)->{
|
||||||
|
Draw.color(Color.WHITE, Colors.get("accent"), e.ifract());
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, 1f+e.fract()*3f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
smeltsmoke = new Effect(15, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 6, 4f + e.ifract()*5f, (x, y)->{
|
||||||
|
Draw.color(Color.WHITE, e.color, e.ifract());
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, 0.5f+e.fract()*2f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
formsmoke = new Effect(40, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 6, 5f + e.ifract()*8f, (x, y)->{
|
||||||
|
Draw.color(Color.valueOf("f1e479"), Color.LIGHT_GRAY, e.ifract());
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, 0.2f+e.fract()*2f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
blastsmoke = new Effect(26, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 12, 1f + e.ifract()*23f, (x, y)->{
|
||||||
|
float size = 2f+e.fract()*6f;
|
||||||
|
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
|
||||||
|
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.ifract()*10f, (x, y)->{
|
||||||
|
float size = e.sfract()*4f;
|
||||||
|
Draw.color(Color.ORANGE, Color.GRAY, e.ifract());
|
||||||
|
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
dooropen = new Effect(10, e -> {
|
||||||
|
Lines.stroke(e.fract() * 1.6f);
|
||||||
|
Lines.square(e.x, e.y, tilesize / 2f + e.ifract() * 2f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
doorclose= new Effect(10, e -> {
|
||||||
|
Lines.stroke(e.fract() * 1.6f);
|
||||||
|
Lines.square(e.x, e.y, tilesize / 2f + e.fract() * 2f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
dooropenlarge = new Effect(10, e -> {
|
||||||
|
Lines.stroke(e.fract() * 1.6f);
|
||||||
|
Lines.square(e.x, e.y, tilesize + e.ifract() * 2f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
doorcloselarge = new Effect(10, e -> {
|
||||||
|
Lines.stroke(e.fract() * 1.6f);
|
||||||
|
Lines.square(e.x, e.y, tilesize + e.fract() * 2f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
purify = new Effect(10, e -> {
|
||||||
|
Draw.color(Color.ROYAL, Color.GRAY, e.ifract());
|
||||||
|
Lines.stroke(2f);
|
||||||
|
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
purifyoil = new Effect(10, e -> {
|
||||||
|
Draw.color(Color.BLACK, Color.GRAY, e.ifract());
|
||||||
|
Lines.stroke(2f);
|
||||||
|
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
purifystone = new Effect(10, e -> {
|
||||||
|
Draw.color(Color.ORANGE, Color.GRAY, e.ifract());
|
||||||
|
Lines.stroke(2f);
|
||||||
|
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
generate = new Effect(11, e -> {
|
||||||
|
Draw.color(Color.ORANGE, Color.YELLOW, e.ifract());
|
||||||
|
Lines.stroke(1f);
|
||||||
|
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
mine = new Effect(20, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 6, 3f + e.ifract()*6f, (x, y)->{
|
||||||
|
Draw.color(e.color, Color.LIGHT_GRAY, e.ifract());
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
mineBig = new Effect(30, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 6, 4f + e.ifract()*8f, (x, y)->{
|
||||||
|
Draw.color(e.color, Color.LIGHT_GRAY, e.ifract());
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f + 0.2f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
mineHuge = new Effect(40, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 8, 5f + e.ifract()*10f, (x, y)->{
|
||||||
|
Draw.color(e.color, Color.LIGHT_GRAY, e.ifract());
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, e.fract() * 2f + 0.5f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
smelt = new Effect(20, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 6, 2f + e.ifract()*5f, (x, y)->{
|
||||||
|
Draw.color(Color.WHITE, e.color, e.ifract());
|
||||||
|
Fill.poly(e.x + x, e.y + y, 4, 0.5f+e.fract()*2f, 45);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
183
core/src/io/anuke/mindustry/graphics/fx/BulletFx.java
Normal file
183
core/src/io/anuke/mindustry/graphics/fx/BulletFx.java
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
package io.anuke.mindustry.graphics.fx;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.graphics.Color;
|
||||||
|
import io.anuke.ucore.core.Effects.Effect;
|
||||||
|
import io.anuke.ucore.graphics.Draw;
|
||||||
|
import io.anuke.ucore.graphics.Fill;
|
||||||
|
import io.anuke.ucore.graphics.Lines;
|
||||||
|
import io.anuke.ucore.graphics.Shapes;
|
||||||
|
import io.anuke.ucore.util.Angles;
|
||||||
|
import io.anuke.ucore.util.Mathf;
|
||||||
|
|
||||||
|
public class BulletFx {
|
||||||
|
public static final Effect
|
||||||
|
|
||||||
|
chainshot = new Effect(9f, e -> {
|
||||||
|
Draw.color(Color.WHITE, Fx.lightOrange, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*4f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*7f);
|
||||||
|
Lines.stroke(e.fract()*2f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
mortarshot = new Effect(10f, e -> {
|
||||||
|
Draw.color(Color.WHITE, Color.DARK_GRAY, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*6f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
|
||||||
|
Lines.stroke(e.fract()*5f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
|
||||||
|
Lines.stroke(e.fract()*1f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
railshot = new Effect(9f, e -> {
|
||||||
|
Draw.color(Color.WHITE, Color.DARK_GRAY, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*5f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*8f);
|
||||||
|
Lines.stroke(e.fract()*4f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
|
||||||
|
Lines.stroke(e.fract()*1f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
titanshot = new Effect(12f, e -> {
|
||||||
|
Draw.color(Color.WHITE, Fx.lightOrange, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*7f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
|
||||||
|
Lines.stroke(e.fract()*4f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
|
||||||
|
Lines.stroke(e.fract()*2f);
|
||||||
|
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*18f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
shockwaveSmall = new Effect(10f, e -> {
|
||||||
|
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*2f + 0.1f);
|
||||||
|
Lines.circle(e.x, e.y, e.ifract()*15f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
empshockwave = new Effect(7f, e -> {
|
||||||
|
Draw.color(Color.WHITE, Color.SKY, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*2f);
|
||||||
|
Lines.circle(e.x, e.y, e.ifract()*40f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
empspark = new Effect(13, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 7, 1f + e.ifract()*12f, (x, y)->{
|
||||||
|
float len = 1f+e.fract()*6f;
|
||||||
|
Draw.color(Color.SKY);
|
||||||
|
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
shellsmoke = new Effect(20, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 8, 3f + e.ifract()*17f, (x, y)->{
|
||||||
|
float size = 2f+e.fract()*5f;
|
||||||
|
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
|
||||||
|
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
shellexplosion = new Effect(9, e -> {
|
||||||
|
Lines.stroke(2f - e.ifract()*1.7f);
|
||||||
|
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
||||||
|
Lines.circle(e.x, e.y, 3f + e.ifract() * 9f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
blastexplosion = new Effect(14, e -> {
|
||||||
|
Lines.stroke(1.2f - e.ifract());
|
||||||
|
Draw.color(Color.WHITE, Fx.lightOrange, e.ifract());
|
||||||
|
Lines.circle(e.x, e.y, 1.5f + e.ifract() * 9f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
laserhit = new Effect(10, e -> {
|
||||||
|
Lines.stroke(1f);
|
||||||
|
Draw.color(Color.WHITE, Color.SKY, e.ifract());
|
||||||
|
Lines.spikes(e.x, e.y, e.ifract() * 2f, 2, 6);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
shieldhit = new Effect(9, e -> {
|
||||||
|
Lines.stroke(1f);
|
||||||
|
Draw.color(Color.WHITE, Color.SKY, e.ifract());
|
||||||
|
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 6);
|
||||||
|
Lines.stroke(4f*e.fract());
|
||||||
|
Lines.circle(e.x, e.y, e.ifract()*14f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
laserShoot = new Effect(8, e -> {
|
||||||
|
Draw.color(Color.WHITE, Fx.lightOrange, e.ifract());
|
||||||
|
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 6f, 2f, 0.8f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
spreadShoot = new Effect(12, e -> {
|
||||||
|
Draw.color(Color.WHITE, Color.PURPLE, e.ifract());
|
||||||
|
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 9f, 3.5f, 0.8f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
clusterShoot = new Effect(12, e -> {
|
||||||
|
Draw.color(Color.WHITE, Fx.lightOrange, e.ifract());
|
||||||
|
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2.5f, 0.7f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
vulcanShoot = new Effect(8, e -> {
|
||||||
|
Draw.color(Fx.lighterOrange, Fx.lightOrange, e.ifract());
|
||||||
|
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2f, 0.7f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
shockShoot = new Effect(8, e -> {
|
||||||
|
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
|
||||||
|
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 14f, 4f, 0.8f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
beamShoot = new Effect(8, e -> {
|
||||||
|
Draw.color(Fx.beamLight, Fx.beam, e.ifract());
|
||||||
|
Shapes.lineShot(e.x, e.y, e.rotation - 70, 3, e.fract(), 12f, 1f, 0.5f);
|
||||||
|
Shapes.lineShot(e.x, e.y, e.rotation + 70, 3, e.fract(), 12f, 1f, 0.5f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
beamhit = new Effect(8, e -> {
|
||||||
|
Draw.color(Fx.beamLight, Fx.beam, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*3f+0.5f);
|
||||||
|
Lines.circle(e.x, e.y, e.ifract()*8f);
|
||||||
|
Lines.spikes(e.x, e.y, e.ifract()*6f, 2f, 4, 45);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
blockexplosion = new Effect(13, e -> {
|
||||||
|
Angles.randLenVectors(e.id+1, 8, 5f + e.ifract()*11f, (x, y)->{
|
||||||
|
float size = 2f+e.fract()*8f;
|
||||||
|
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
|
||||||
|
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
|
||||||
|
Lines.stroke(2f*e.fract()+0.4f);
|
||||||
|
Draw.color(Color.WHITE, Color.ORANGE, e.powfract());
|
||||||
|
Lines.circle(e.x, e.y, 2f + e.powfract() * 9f);
|
||||||
|
|
||||||
|
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
|
||||||
|
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
|
||||||
|
Fill.circle(e.x + x, e.y + y, e.fract()*5f + 1f);
|
||||||
|
});
|
||||||
|
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
clusterbomb = new Effect(10f, e -> {
|
||||||
|
Draw.color(Color.WHITE, Fx.lightOrange, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*1.5f);
|
||||||
|
Lines.poly(e.x, e.y, 4, e.fract()*8f);
|
||||||
|
Lines.circle(e.x, e.y, e.ifract()*14f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
railsmoke = new Effect(30, e -> {
|
||||||
|
Draw.color(Color.LIGHT_GRAY, Color.WHITE, e.ifract());
|
||||||
|
float size = e.fract()*4f;
|
||||||
|
Draw.rect("circle", e.x, e.y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
chainsmoke = new Effect(30, e -> {
|
||||||
|
Draw.color(Fx.lightGray);
|
||||||
|
float size = e.fract()*4f;
|
||||||
|
Draw.rect("circle", e.x, e.y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}
|
||||||
45
core/src/io/anuke/mindustry/graphics/fx/ExplosionFx.java
Normal file
45
core/src/io/anuke/mindustry/graphics/fx/ExplosionFx.java
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package io.anuke.mindustry.graphics.fx;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.graphics.Color;
|
||||||
|
import io.anuke.ucore.core.Effects.Effect;
|
||||||
|
import io.anuke.ucore.graphics.Draw;
|
||||||
|
import io.anuke.ucore.graphics.Fill;
|
||||||
|
import io.anuke.ucore.graphics.Lines;
|
||||||
|
import io.anuke.ucore.util.Angles;
|
||||||
|
|
||||||
|
public class ExplosionFx {
|
||||||
|
public static final Effect
|
||||||
|
|
||||||
|
generatorexplosion = new Effect(28, 40f, e -> {
|
||||||
|
Angles.randLenVectors(e.id, 16, 10f + e.ifract()*8f, (x, y)->{
|
||||||
|
float size = e.fract()*12f + 1f;
|
||||||
|
Draw.color(Color.WHITE, Fx.lightOrange, e.ifract());
|
||||||
|
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
shockwave = new Effect(10f, 80f, e -> {
|
||||||
|
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*2f + 0.2f);
|
||||||
|
Lines.circle(e.x, e.y, e.ifract()*28f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
nuclearShockwave = new Effect(10f, 200f, e -> {
|
||||||
|
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
||||||
|
Lines.stroke(e.fract()*3f + 0.2f);
|
||||||
|
Lines.poly(e.x, e.y, 40, e.ifract()*140f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
explosion = new Effect(11, e -> {
|
||||||
|
Lines.stroke(2f*e.fract()+0.5f);
|
||||||
|
Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract());
|
||||||
|
Lines.circle(e.x, e.y, 5f + e.powfract() * 6f);
|
||||||
|
|
||||||
|
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
|
||||||
|
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
|
||||||
|
Fill.circle(e.x + x, e.y + y, e.fract()*5f + 2.5f);
|
||||||
|
});
|
||||||
|
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}
|
||||||
77
core/src/io/anuke/mindustry/graphics/fx/Fx.java
Normal file
77
core/src/io/anuke/mindustry/graphics/fx/Fx.java
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
package io.anuke.mindustry.graphics.fx;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.graphics.Color;
|
||||||
|
import com.badlogic.gdx.graphics.Colors;
|
||||||
|
import io.anuke.ucore.core.Effects.Effect;
|
||||||
|
import io.anuke.ucore.graphics.Draw;
|
||||||
|
import io.anuke.ucore.graphics.Hue;
|
||||||
|
import io.anuke.ucore.graphics.Lines;
|
||||||
|
|
||||||
|
import static io.anuke.mindustry.Vars.respawnduration;
|
||||||
|
import static io.anuke.mindustry.Vars.tilesize;
|
||||||
|
|
||||||
|
public class Fx{
|
||||||
|
public static Color lightRed = Hue.mix(Color.WHITE, Color.FIREBRICK, 0.1f);
|
||||||
|
public static Color lightOrange = Color.valueOf("f68021");
|
||||||
|
public static Color lighterOrange = Color.valueOf("f6e096");
|
||||||
|
public static Color whiteOrange = Hue.mix(lightOrange, Color.WHITE, 0.6f);
|
||||||
|
public static Color whiteYellow = Hue.mix(Color.YELLOW, Color.WHITE, 0.6f);
|
||||||
|
public static Color lightGray = Color.valueOf("b0b0b0");
|
||||||
|
public static Color glowy = Color.valueOf("fdc056");
|
||||||
|
public static Color beam = Color.valueOf("9bffbe");
|
||||||
|
public static Color beamLight = Color.valueOf("ddffe9");
|
||||||
|
public static Color stoneGray = Color.valueOf("8f8f8f");
|
||||||
|
|
||||||
|
public static final Effect
|
||||||
|
|
||||||
|
none = new Effect(0, 0f, e->{}),
|
||||||
|
|
||||||
|
place = new Effect(16, e -> {
|
||||||
|
Lines.stroke(3f - e.ifract() * 2f);
|
||||||
|
Lines.square(e.x, e.y, tilesize / 2f + e.ifract() * 3f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
|
||||||
|
breakBlock = new Effect(12, e -> {
|
||||||
|
Lines.stroke(2f);
|
||||||
|
Draw.color(Color.WHITE, Colors.get("break"), e.ifract());
|
||||||
|
Lines.spikes(e.x, e.y, e.ifract() * 6f, 2, 5, 90);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
|
||||||
|
hit = new Effect(10, e -> {
|
||||||
|
Lines.stroke(1f);
|
||||||
|
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
|
||||||
|
Lines.spikes(e.x, e.y, e.ifract() * 3f, 2, 8);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
|
||||||
|
smoke = new Effect(100, e -> {
|
||||||
|
Draw.color(Color.GRAY, new Color(0.3f, 0.3f, 0.3f, 1f), e.ifract());
|
||||||
|
float size = 7f-e.ifract()*7f;
|
||||||
|
Draw.rect("circle", e.x, e.y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
|
||||||
|
dash = new Effect(30, e -> {
|
||||||
|
Draw.color(Color.CORAL, Color.GRAY, e.ifract());
|
||||||
|
float size = e.fract()*4f;
|
||||||
|
Draw.rect("circle", e.x, e.y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
|
||||||
|
spawn = new Effect(23, e -> {
|
||||||
|
Lines.stroke(2f);
|
||||||
|
Draw.color(Color.DARK_GRAY, Color.SCARLET, e.ifract());
|
||||||
|
Lines.circle(e.x, e.y, 7f - e.ifract() * 6f);
|
||||||
|
Draw.reset();
|
||||||
|
}),
|
||||||
|
|
||||||
|
respawn = new Effect(respawnduration, e -> {
|
||||||
|
Draw.tcolor(Color.SCARLET);
|
||||||
|
Draw.tscl(0.25f);
|
||||||
|
Draw.text("Respawning in " + (int)((e.lifetime-e.time)/60), e.x, e.y);
|
||||||
|
Draw.tscl(0.5f);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ import com.badlogic.gdx.utils.reflect.ClassReflection;
|
|||||||
import io.anuke.mindustry.core.GameState.State;
|
import io.anuke.mindustry.core.GameState.State;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.DrawLayer;
|
import io.anuke.mindustry.graphics.DrawLayer;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||||
import io.anuke.mindustry.graphics.Layer;
|
import io.anuke.mindustry.graphics.Layer;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
import io.anuke.mindustry.net.NetEvents;
|
import io.anuke.mindustry.net.NetEvents;
|
||||||
@@ -40,7 +40,7 @@ public class Block extends BaseBlock {
|
|||||||
/**display name*/
|
/**display name*/
|
||||||
public final String formalName;
|
public final String formalName;
|
||||||
/**played on destroy*/
|
/**played on destroy*/
|
||||||
public Effect explosionEffect = Fx.blockexplosion;
|
public Effect explosionEffect = BulletFx.blockexplosion;
|
||||||
/**played on destroy*/
|
/**played on destroy*/
|
||||||
public String explosionSound = "break";
|
public String explosionSound = "break";
|
||||||
/**whether this block has a tile entity that updates*/
|
/**whether this block has a tile entity that updates*/
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import io.anuke.mindustry.content.blocks.Blocks;
|
|||||||
import io.anuke.mindustry.entities.Player;
|
import io.anuke.mindustry.entities.Player;
|
||||||
import io.anuke.mindustry.entities.Units;
|
import io.anuke.mindustry.entities.Units;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.Fx;
|
||||||
import io.anuke.mindustry.resource.ItemStack;
|
import io.anuke.mindustry.resource.ItemStack;
|
||||||
import io.anuke.mindustry.resource.Recipe;
|
import io.anuke.mindustry.resource.Recipe;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package io.anuke.mindustry.world.blocks.types.defense;
|
|||||||
import com.badlogic.gdx.math.Rectangle;
|
import com.badlogic.gdx.math.Rectangle;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.entities.Units;
|
import io.anuke.mindustry.entities.Units;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.mindustry.world.blocks.types.Wall;
|
import io.anuke.mindustry.world.blocks.types.Wall;
|
||||||
@@ -20,8 +20,8 @@ import static io.anuke.mindustry.Vars.tilesize;
|
|||||||
public class Door extends Wall{
|
public class Door extends Wall{
|
||||||
protected final Rectangle rect = new Rectangle();
|
protected final Rectangle rect = new Rectangle();
|
||||||
|
|
||||||
protected Effect openfx = Fx.dooropen;
|
protected Effect openfx = BlockFx.dooropen;
|
||||||
protected Effect closefx = Fx.doorclose;
|
protected Effect closefx = BlockFx.doorclose;
|
||||||
|
|
||||||
public Door(String name) {
|
public Door(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package io.anuke.mindustry.world.blocks.types.defense;
|
|||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import com.badlogic.gdx.math.MathUtils;
|
import com.badlogic.gdx.math.MathUtils;
|
||||||
import io.anuke.mindustry.entities.Unit;
|
import io.anuke.mindustry.entities.Unit;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||||
import io.anuke.mindustry.graphics.Layer;
|
import io.anuke.mindustry.graphics.Layer;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
@@ -17,7 +17,7 @@ import io.anuke.ucore.util.Tmp;
|
|||||||
|
|
||||||
public class LaserTurret extends PowerTurret{
|
public class LaserTurret extends PowerTurret{
|
||||||
protected Color beamColor = Color.WHITE.cpy();
|
protected Color beamColor = Color.WHITE.cpy();
|
||||||
protected Effect hiteffect = Fx.laserhit;
|
protected Effect hiteffect = BulletFx.laserhit;
|
||||||
protected int damage = 4;
|
protected int damage = 4;
|
||||||
protected float cone = 15f;
|
protected float cone = 15f;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package io.anuke.mindustry.world.blocks.types.defense;
|
|||||||
import io.anuke.mindustry.Vars;
|
import io.anuke.mindustry.Vars;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.entities.effect.Shield;
|
import io.anuke.mindustry.entities.effect.Shield;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.mindustry.world.blocks.types.PowerBlock;
|
import io.anuke.mindustry.world.blocks.types.PowerBlock;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
@@ -75,7 +75,7 @@ public class ShieldBlock extends PowerBlock{
|
|||||||
}
|
}
|
||||||
|
|
||||||
bullet.remove();
|
bullet.remove();
|
||||||
Effects.effect(bullet.damage > 5 ? Fx.shieldhit : Fx.laserhit, bullet);
|
Effects.effect(bullet.damage > 5 ? BulletFx.shieldhit : BulletFx.laserhit, bullet);
|
||||||
if(!headless) renderer.addShieldHit(bullet.x, bullet.y);
|
if(!headless) renderer.addShieldHit(bullet.x, bullet.y);
|
||||||
|
|
||||||
entity.power.amount -= bullet.getDamage() * powerPerDamage;
|
entity.power.amount -= bullet.getDamage() * powerPerDamage;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package io.anuke.mindustry.world.blocks.types.defense;
|
|||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import io.anuke.mindustry.entities.*;
|
import io.anuke.mindustry.entities.*;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.Fx;
|
||||||
import io.anuke.mindustry.graphics.Layer;
|
import io.anuke.mindustry.graphics.Layer;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.world.*;
|
import io.anuke.mindustry.world.*;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package io.anuke.mindustry.world.blocks.types.power;
|
|||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.world.BarType;
|
import io.anuke.mindustry.world.BarType;
|
||||||
import io.anuke.mindustry.world.BlockBar;
|
import io.anuke.mindustry.world.BlockBar;
|
||||||
@@ -22,7 +22,7 @@ public class BurnerGenerator extends PowerGenerator {
|
|||||||
protected float minFlammability = 0.2f;
|
protected float minFlammability = 0.2f;
|
||||||
protected float powerOutput;
|
protected float powerOutput;
|
||||||
protected float itemDuration = 70f;
|
protected float itemDuration = 70f;
|
||||||
protected Effect generateEffect = Fx.generatespark;
|
protected Effect generateEffect = BlockFx.generatespark;
|
||||||
protected Color heatColor = Color.valueOf("ff9b59");
|
protected Color heatColor = Color.valueOf("ff9b59");
|
||||||
|
|
||||||
public BurnerGenerator(String name) {
|
public BurnerGenerator(String name) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package io.anuke.mindustry.world.blocks.types.power;
|
package io.anuke.mindustry.world.blocks.types.power;
|
||||||
|
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.resource.Liquid;
|
import io.anuke.mindustry.resource.Liquid;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.mindustry.world.blocks.types.power.BurnerGenerator.BurnerEntity;
|
import io.anuke.mindustry.world.blocks.types.power.BurnerGenerator.BurnerEntity;
|
||||||
@@ -17,7 +17,7 @@ public class LiquidBurnerGenerator extends PowerGenerator {
|
|||||||
protected float powerPerLiquid = 0.13f;
|
protected float powerPerLiquid = 0.13f;
|
||||||
/**Maximum liquid used per frame.*/
|
/**Maximum liquid used per frame.*/
|
||||||
protected float maxLiquidGenerate = 0.4f;
|
protected float maxLiquidGenerate = 0.4f;
|
||||||
protected Effect generateEffect = Fx.generatespark;
|
protected Effect generateEffect = BlockFx.generatespark;
|
||||||
|
|
||||||
public LiquidBurnerGenerator(String name) {
|
public LiquidBurnerGenerator(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import com.badlogic.gdx.graphics.Color;
|
|||||||
import io.anuke.mindustry.content.Items;
|
import io.anuke.mindustry.content.Items;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.entities.effect.DamageArea;
|
import io.anuke.mindustry.entities.effect.DamageArea;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
|
import io.anuke.mindustry.graphics.fx.ExplosionFx;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.resource.Liquid;
|
import io.anuke.mindustry.resource.Liquid;
|
||||||
import io.anuke.mindustry.world.BarType;
|
import io.anuke.mindustry.world.BarType;
|
||||||
@@ -45,7 +46,7 @@ public class NuclearReactor extends LiquidBurnerGenerator {
|
|||||||
generateItem = Items.thorium;
|
generateItem = Items.thorium;
|
||||||
itemCapacity = 30;
|
itemCapacity = 30;
|
||||||
liquidCapacity = 50;
|
liquidCapacity = 50;
|
||||||
explosionEffect = Fx.nuclearShockwave;
|
explosionEffect = ExplosionFx.nuclearShockwave;
|
||||||
powerCapacity = 80f;
|
powerCapacity = 80f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,7 +100,7 @@ public class NuclearReactor extends LiquidBurnerGenerator {
|
|||||||
if(entity.heat > smokeThreshold){
|
if(entity.heat > smokeThreshold){
|
||||||
float smoke = 1.0f + (entity.heat - smokeThreshold) / (1f - smokeThreshold); //ranges from 1.0 to 2.0
|
float smoke = 1.0f + (entity.heat - smokeThreshold) / (1f - smokeThreshold); //ranges from 1.0 to 2.0
|
||||||
if(Mathf.chance(smoke / 20.0 * Timers.delta())){
|
if(Mathf.chance(smoke / 20.0 * Timers.delta())){
|
||||||
Effects.effect(Fx.reactorsmoke, tile.worldx() + Mathf.range(size * tilesize / 2f),
|
Effects.effect(BlockFx.reactorsmoke, tile.worldx() + Mathf.range(size * tilesize / 2f),
|
||||||
tile.worldy() + Mathf.random(size * tilesize / 2f));
|
tile.worldy() + Mathf.random(size * tilesize / 2f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -132,7 +133,7 @@ public class NuclearReactor extends LiquidBurnerGenerator {
|
|||||||
Effects.effect(explosionEffect, tile.worldx(), tile.worldy());
|
Effects.effect(explosionEffect, tile.worldx(), tile.worldy());
|
||||||
for(int i = 0; i < 6; i ++){
|
for(int i = 0; i < 6; i ++){
|
||||||
Timers.run(Mathf.random(40), () -> {
|
Timers.run(Mathf.random(40), () -> {
|
||||||
Effects.effect(Fx.nuclearcloud, tile.worldx(), tile.worldy());
|
Effects.effect(BlockFx.nuclearcloud, tile.worldx(), tile.worldy());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,14 +143,14 @@ public class NuclearReactor extends LiquidBurnerGenerator {
|
|||||||
for(int i = 0; i < 20; i ++){
|
for(int i = 0; i < 20; i ++){
|
||||||
Timers.run(Mathf.random(50), ()->{
|
Timers.run(Mathf.random(50), ()->{
|
||||||
tr.rnd(Mathf.random(40f));
|
tr.rnd(Mathf.random(40f));
|
||||||
Effects.effect(Fx.explosion, tr.x + tile.worldx(), tr.y + tile.worldy());
|
Effects.effect(ExplosionFx.explosion, tr.x + tile.worldx(), tr.y + tile.worldy());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < 70; i ++){
|
for(int i = 0; i < 70; i ++){
|
||||||
Timers.run(Mathf.random(80), ()->{
|
Timers.run(Mathf.random(80), ()->{
|
||||||
tr.rnd(Mathf.random(120f));
|
tr.rnd(Mathf.random(120f));
|
||||||
Effects.effect(Fx.nuclearsmoke, tr.x + tile.worldx(), tr.y + tile.worldy());
|
Effects.effect(BlockFx.nuclearsmoke, tr.x + tile.worldx(), tr.y + tile.worldy());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package io.anuke.mindustry.world.blocks.types.power;
|
|||||||
|
|
||||||
import com.badlogic.gdx.math.GridPoint2;
|
import com.badlogic.gdx.math.GridPoint2;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
|
import io.anuke.mindustry.graphics.fx.BulletFx;
|
||||||
|
import io.anuke.mindustry.graphics.fx.ExplosionFx;
|
||||||
import io.anuke.mindustry.world.Edges;
|
import io.anuke.mindustry.world.Edges;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.mindustry.world.blocks.types.PowerBlock;
|
import io.anuke.mindustry.world.blocks.types.PowerBlock;
|
||||||
@@ -61,13 +63,13 @@ public class PowerGenerator extends PowerBlock {
|
|||||||
public void onDestroyed(Tile tile){
|
public void onDestroyed(Tile tile){
|
||||||
float x = tile.worldx(), y = tile.worldy();
|
float x = tile.worldx(), y = tile.worldy();
|
||||||
|
|
||||||
Effects.effect(Fx.shellsmoke, x, y);
|
Effects.effect(BulletFx.shellsmoke, x, y);
|
||||||
Effects.effect(Fx.blastsmoke, x, y);
|
Effects.effect(BlockFx.blastsmoke, x, y);
|
||||||
|
|
||||||
Timers.run(Mathf.random(8f + Mathf.random(6f)), () -> {
|
Timers.run(Mathf.random(8f + Mathf.random(6f)), () -> {
|
||||||
Effects.shake(6f, 8f, x, y);
|
Effects.shake(6f, 8f, x, y);
|
||||||
Effects.effect(Fx.generatorexplosion, x, y);
|
Effects.effect(ExplosionFx.generatorexplosion, x, y);
|
||||||
Effects.effect(Fx.shockwave, x, y);
|
Effects.effect(ExplosionFx.shockwave, x, y);
|
||||||
|
|
||||||
//TODO better explosion effect!
|
//TODO better explosion effect!
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package io.anuke.mindustry.world.blocks.types.production;
|
|||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.Fx;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
|||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import io.anuke.mindustry.content.Liquids;
|
import io.anuke.mindustry.content.Liquids;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.graphics.Layer;
|
import io.anuke.mindustry.graphics.Layer;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.resource.Liquid;
|
import io.anuke.mindustry.resource.Liquid;
|
||||||
@@ -45,11 +45,11 @@ public class Drill extends Block{
|
|||||||
protected float warmupSpeed = 0.02f;
|
protected float warmupSpeed = 0.02f;
|
||||||
|
|
||||||
/**Effect played when an item is produced. This is colored.*/
|
/**Effect played when an item is produced. This is colored.*/
|
||||||
protected Effect drillEffect = Fx.mine;
|
protected Effect drillEffect = BlockFx.mine;
|
||||||
/**Speed the drill bit rotates at.*/
|
/**Speed the drill bit rotates at.*/
|
||||||
protected float rotateSpeed = 2f;
|
protected float rotateSpeed = 2f;
|
||||||
/**Effect randomly played while drilling.*/
|
/**Effect randomly played while drilling.*/
|
||||||
protected Effect updateEffect = Fx.pulverizeSmall;
|
protected Effect updateEffect = BlockFx.pulverizeSmall;
|
||||||
/**Chance the update effect will appear.*/
|
/**Chance the update effect will appear.*/
|
||||||
protected float updateEffectChance = 0.02f;
|
protected float updateEffectChance = 0.02f;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ package io.anuke.mindustry.world.blocks.types.production;
|
|||||||
|
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
|
import io.anuke.mindustry.graphics.fx.Fx;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.resource.ItemStack;
|
import io.anuke.mindustry.resource.ItemStack;
|
||||||
import io.anuke.mindustry.resource.Liquid;
|
import io.anuke.mindustry.resource.Liquid;
|
||||||
@@ -29,7 +30,7 @@ public class GenericCrafter extends Block{
|
|||||||
protected float craftTime = 80;
|
protected float craftTime = 80;
|
||||||
protected float powerUse;
|
protected float powerUse;
|
||||||
protected float liquidUse;
|
protected float liquidUse;
|
||||||
protected Effect craftEffect = Fx.purify;
|
protected Effect craftEffect = BlockFx.purify;
|
||||||
protected Effect updateEffect = Fx.none;
|
protected Effect updateEffect = Fx.none;
|
||||||
protected float updateEffectChance = 0.04f;
|
protected float updateEffectChance = 0.04f;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package io.anuke.mindustry.world.blocks.types.production;
|
|||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.resource.ItemStack;
|
import io.anuke.mindustry.resource.ItemStack;
|
||||||
import io.anuke.mindustry.world.BarType;
|
import io.anuke.mindustry.world.BarType;
|
||||||
@@ -37,8 +37,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 craftTime = 20f; //time to craft one item, so max 3 items per second by default
|
||||||
protected float burnEffectChance = 0.01f;
|
protected float burnEffectChance = 0.01f;
|
||||||
protected Effect craftEffect = Fx.smelt,
|
protected Effect craftEffect = BlockFx.smelt,
|
||||||
burnEffect = Fx.fuelburn;
|
burnEffect = BlockFx.fuelburn;
|
||||||
protected Color flameColor = Color.valueOf("ffc999");
|
protected Color flameColor = Color.valueOf("ffc999");
|
||||||
|
|
||||||
protected int capacity = 20;
|
protected int capacity = 20;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package io.anuke.mindustry.world.blocks.types.production;
|
|||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.world.BarType;
|
import io.anuke.mindustry.world.BarType;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
@@ -28,7 +28,7 @@ public class Smelter extends Block{
|
|||||||
|
|
||||||
protected float craftTime = 20f; //time to craft one item, so max 3 items per second by default
|
protected float craftTime = 20f; //time to craft one item, so max 3 items per second by default
|
||||||
protected float burnDuration = 50f; //by default, the fuel will burn 45 frames, so that's 2.5 items/fuel at most
|
protected float burnDuration = 50f; //by default, the fuel will burn 45 frames, so that's 2.5 items/fuel at most
|
||||||
protected Effect craftEffect = Fx.smelt, burnEffect = Fx.fuelburn;
|
protected Effect craftEffect = BlockFx.smelt, burnEffect = BlockFx.fuelburn;
|
||||||
protected Color flameColor = Color.valueOf("ffb879");
|
protected Color flameColor = Color.valueOf("ffb879");
|
||||||
|
|
||||||
protected int capacity = 20;
|
protected int capacity = 20;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
|||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import io.anuke.mindustry.content.Liquids;
|
import io.anuke.mindustry.content.Liquids;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.Fx;
|
||||||
import io.anuke.mindustry.resource.Liquid;
|
import io.anuke.mindustry.resource.Liquid;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import io.anuke.mindustry.entities.TileEntity;
|
|||||||
import io.anuke.mindustry.entities.Units;
|
import io.anuke.mindustry.entities.Units;
|
||||||
import io.anuke.mindustry.entities.units.BaseUnit;
|
import io.anuke.mindustry.entities.units.BaseUnit;
|
||||||
import io.anuke.mindustry.entities.units.UnitType;
|
import io.anuke.mindustry.entities.units.UnitType;
|
||||||
import io.anuke.mindustry.graphics.Fx;
|
import io.anuke.mindustry.graphics.fx.BlockFx;
|
||||||
import io.anuke.mindustry.graphics.Shaders;
|
import io.anuke.mindustry.graphics.Shaders;
|
||||||
import io.anuke.mindustry.resource.Item;
|
import io.anuke.mindustry.resource.Item;
|
||||||
import io.anuke.mindustry.resource.ItemStack;
|
import io.anuke.mindustry.resource.ItemStack;
|
||||||
@@ -139,7 +139,7 @@ public class UnitFactory extends Block {
|
|||||||
Timers.run(openDuration/1.5f, () -> {
|
Timers.run(openDuration/1.5f, () -> {
|
||||||
entity.buildTime = 0f;
|
entity.buildTime = 0f;
|
||||||
Effects.shake(2f, 3f, entity);
|
Effects.shake(2f, 3f, entity);
|
||||||
Effects.effect(Fx.producesmoke, tile.drawx(), tile.drawy());
|
Effects.effect(BlockFx.producesmoke, tile.drawx(), tile.drawy());
|
||||||
|
|
||||||
BaseUnit unit = new BaseUnit(type, tile.getTeam());
|
BaseUnit unit = new BaseUnit(type, tile.getTeam());
|
||||||
unit.set(tile.drawx(), tile.drawy()).add();
|
unit.set(tile.drawx(), tile.drawy()).add();
|
||||||
|
|||||||
Reference in New Issue
Block a user