5x5 burst drill
|
After Width: | Height: | Size: 919 B |
BIN
core/assets-raw/sprites/blocks/drills/eruption-drill-arrow.png
Normal file
|
After Width: | Height: | Size: 258 B |
BIN
core/assets-raw/sprites/blocks/drills/eruption-drill-glow.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
core/assets-raw/sprites/blocks/drills/eruption-drill-item.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
core/assets-raw/sprites/blocks/drills/eruption-drill-top.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
core/assets-raw/sprites/blocks/drills/eruption-drill.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 889 B |
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -491,3 +491,4 @@
|
|||||||
63213=beryllium-wall-large|block-beryllium-wall-large-ui
|
63213=beryllium-wall-large|block-beryllium-wall-large-ui
|
||||||
63212=quell|unit-quell-ui
|
63212=quell|unit-quell-ui
|
||||||
63211=breach|block-breach-ui
|
63211=breach|block-breach-ui
|
||||||
|
63210=eruption-drill|block-eruption-drill-ui
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ public class Blocks{
|
|||||||
|
|
||||||
//production
|
//production
|
||||||
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator,
|
mechanicalDrill, pneumaticDrill, laserDrill, blastDrill, waterExtractor, oilExtractor, cultivator,
|
||||||
cliffCrusher, plasmaBore, largePlasmaBore, impactDrill,
|
cliffCrusher, plasmaBore, largePlasmaBore, impactDrill, eruptionDrill,
|
||||||
|
|
||||||
//storage
|
//storage
|
||||||
coreShard, coreFoundation, /*TODO core foundation is a bad name, rename to fragment */ coreNucleus, vault, container, unloader,
|
coreShard, coreFoundation, /*TODO core foundation is a bad name, rename to fragment */ coreNucleus, vault, container, unloader,
|
||||||
@@ -998,7 +998,7 @@ public class Blocks{
|
|||||||
|
|
||||||
//TODO better name
|
//TODO better name
|
||||||
electrolyzer = new GenericCrafter("electrolyzer"){{
|
electrolyzer = new GenericCrafter("electrolyzer"){{
|
||||||
requirements(Category.crafting, with(Items.silicon, 50, Items.graphite, 40, Items.beryllium, 40));
|
requirements(Category.crafting, with(Items.silicon, 50, Items.graphite, 40, Items.beryllium, 50));
|
||||||
size = 3;
|
size = 3;
|
||||||
|
|
||||||
craftTime = 10f;
|
craftTime = 10f;
|
||||||
@@ -1007,7 +1007,7 @@ public class Blocks{
|
|||||||
liquidCapacity = 50f;
|
liquidCapacity = 50f;
|
||||||
|
|
||||||
consumes.liquid(Liquids.water, 10f / 60f);
|
consumes.liquid(Liquids.water, 10f / 60f);
|
||||||
consumes.power(2f);
|
consumes.power(1f);
|
||||||
|
|
||||||
drawer = new DrawMulti(
|
drawer = new DrawMulti(
|
||||||
new DrawRegion("-bottom"),
|
new DrawRegion("-bottom"),
|
||||||
@@ -1036,7 +1036,7 @@ public class Blocks{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
atmosphericConcentrator = new HeatCrafter("atmospheric-concentrator"){{
|
atmosphericConcentrator = new HeatCrafter("atmospheric-concentrator"){{
|
||||||
requirements(Category.crafting, with(Items.oxide, 50, Items.beryllium, 30, Items.silicon, 40));
|
requirements(Category.crafting, with(Items.oxide, 50, Items.beryllium, 60, Items.silicon, 40));
|
||||||
size = 3;
|
size = 3;
|
||||||
craftTime = 10f;
|
craftTime = 10f;
|
||||||
hasLiquids = true;
|
hasLiquids = true;
|
||||||
@@ -1060,14 +1060,14 @@ public class Blocks{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
oxidationChamber = new HeatProducer("oxidation-chamber"){{
|
oxidationChamber = new HeatProducer("oxidation-chamber"){{
|
||||||
requirements(Category.crafting, with(Items.tungsten, 60, Items.graphite, 40, Items.silicon, 50));
|
requirements(Category.crafting, with(Items.tungsten, 60, Items.graphite, 40, Items.silicon, 50, Items.beryllium, 50));
|
||||||
size = 3;
|
size = 3;
|
||||||
|
|
||||||
outputItem = new ItemStack(Items.oxide, 1);
|
outputItem = new ItemStack(Items.oxide, 1);
|
||||||
|
|
||||||
consumes.liquid(Liquids.ozone, 2f / 60f);
|
consumes.liquid(Liquids.ozone, 2f / 60f);
|
||||||
consumes.item(Items.beryllium);
|
consumes.item(Items.beryllium);
|
||||||
consumes.power(1f);
|
consumes.power(0.5f);
|
||||||
|
|
||||||
rotateDraw = false;
|
rotateDraw = false;
|
||||||
|
|
||||||
@@ -1091,7 +1091,7 @@ public class Blocks{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
phaseHeater = new HeatProducer("phase-heater"){{
|
phaseHeater = new HeatProducer("phase-heater"){{
|
||||||
requirements(Category.crafting, with(Items.oxide, 30, Items.carbide, 30));
|
requirements(Category.crafting, with(Items.oxide, 30, Items.carbide, 30, Items.beryllium, 30));
|
||||||
|
|
||||||
drawer = new DrawMulti(new DrawHeatOutput(true));
|
drawer = new DrawMulti(new DrawHeatOutput(true));
|
||||||
drawer.iconOverride = new String[]{""};
|
drawer.iconOverride = new String[]{""};
|
||||||
@@ -1207,7 +1207,7 @@ public class Blocks{
|
|||||||
|
|
||||||
cyanogenSynthesizer = new HeatCrafter("cyanogen-synthesizer"){{
|
cyanogenSynthesizer = new HeatCrafter("cyanogen-synthesizer"){{
|
||||||
//TODO requirements
|
//TODO requirements
|
||||||
requirements(Category.crafting, with(Items.carbide, 50, Items.silicon, 80, Items.beryllium, 80));
|
requirements(Category.crafting, with(Items.carbide, 50, Items.silicon, 80, Items.beryllium, 90));
|
||||||
|
|
||||||
heatRequirement = 5f;
|
heatRequirement = 5f;
|
||||||
|
|
||||||
@@ -1238,7 +1238,7 @@ public class Blocks{
|
|||||||
|
|
||||||
//TODO bad name, and there's no use for phase yet...
|
//TODO bad name, and there's no use for phase yet...
|
||||||
phaseSynthesizer = new HeatCrafter("phase-synthesizer"){{
|
phaseSynthesizer = new HeatCrafter("phase-synthesizer"){{
|
||||||
requirements(Category.crafting, with(Items.surgeAlloy, 60, Items.carbide, 40, Items.silicon, 80, Items.thorium, 80));
|
requirements(Category.crafting, with(Items.surgeAlloy, 70, Items.carbide, 90, Items.silicon, 100, Items.thorium, 100, Items.beryllium, 200));
|
||||||
|
|
||||||
size = 3;
|
size = 3;
|
||||||
|
|
||||||
@@ -1272,7 +1272,6 @@ public class Blocks{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
heatReactor = new HeatProducer("heat-reactor"){{
|
heatReactor = new HeatProducer("heat-reactor"){{
|
||||||
//TODO gas/liquid requirement?
|
|
||||||
requirements(Category.crafting, with(Items.oxide, 70, Items.graphite, 20, Items.carbide, 10, Items.thorium, 80));
|
requirements(Category.crafting, with(Items.oxide, 70, Items.graphite, 20, Items.carbide, 10, Items.thorium, 80));
|
||||||
size = 3;
|
size = 3;
|
||||||
craftTime = 60f * 10f;
|
craftTime = 60f * 10f;
|
||||||
@@ -1549,7 +1548,7 @@ public class Blocks{
|
|||||||
//TODO green looks bad switch to orange
|
//TODO green looks bad switch to orange
|
||||||
//TODO orange also looks bad hhhh
|
//TODO orange also looks bad hhhh
|
||||||
regenProjector = new RegenProjector("regen-projector"){{
|
regenProjector = new RegenProjector("regen-projector"){{
|
||||||
requirements(Category.effect, with(Items.silicon, 60, Items.tungsten, 60, Items.oxide, 30));
|
requirements(Category.effect, with(Items.silicon, 60, Items.tungsten, 60, Items.oxide, 30, Items.beryllium, 80));
|
||||||
size = 3;
|
size = 3;
|
||||||
consumes.power(1f);
|
consumes.power(1f);
|
||||||
range = 28;
|
range = 28;
|
||||||
@@ -2303,12 +2302,12 @@ public class Blocks{
|
|||||||
|
|
||||||
//TODO should be crusher or something
|
//TODO should be crusher or something
|
||||||
impactDrill = new BurstDrill("impact-drill"){{
|
impactDrill = new BurstDrill("impact-drill"){{
|
||||||
requirements(Category.production, with(Items.silicon, 60, Items.beryllium, 90, Items.graphite, 50));
|
requirements(Category.production, with(Items.silicon, 60, Items.beryllium, 90, Items.graphite, 60));
|
||||||
drillTime = 60f * 12f;
|
drillTime = 60f * 12f;
|
||||||
size = 4;
|
size = 4;
|
||||||
hasPower = true;
|
hasPower = true;
|
||||||
tier = 6;
|
tier = 6;
|
||||||
drillEffect = new MultiEffect(Fx.mineImpact, Fx.drillSteam);
|
drillEffect = new MultiEffect(Fx.mineImpact, Fx.drillSteam, Fx.mineImpactWave.wrap(Pal.redLight, 40f));
|
||||||
shake = 4f;
|
shake = 4f;
|
||||||
itemCapacity = 40;
|
itemCapacity = 40;
|
||||||
|
|
||||||
@@ -2316,7 +2315,31 @@ public class Blocks{
|
|||||||
consumes.liquid(Liquids.water, 0.2f);
|
consumes.liquid(Liquids.water, 0.2f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO higher tier impact drill, 5x5
|
//TODO bad name
|
||||||
|
eruptionDrill = new BurstDrill("eruption-drill"){{
|
||||||
|
requirements(Category.production, with(Items.silicon, 200, Items.beryllium, 250, Items.oxide, 80, Items.carbide, 80));
|
||||||
|
drillTime = 60f * 9f;
|
||||||
|
size = 5;
|
||||||
|
hasPower = true;
|
||||||
|
tier = 7;
|
||||||
|
//TODO better effect
|
||||||
|
drillEffect = new MultiEffect(
|
||||||
|
Fx.mineImpact,
|
||||||
|
Fx.drillSteam,
|
||||||
|
Fx.dynamicSpikes.wrap(Liquids.hydrogen.color, 30f),
|
||||||
|
Fx.mineImpactWave.wrap(Liquids.hydrogen.color, 45f)
|
||||||
|
);
|
||||||
|
shake = 4f;
|
||||||
|
itemCapacity = 50;
|
||||||
|
arrowOffset = 2f;
|
||||||
|
arrowSpacing = 5f;
|
||||||
|
arrows = 2;
|
||||||
|
glowColor.a = 0.6f;
|
||||||
|
|
||||||
|
//TODO different requirements
|
||||||
|
consumes.power(6f);
|
||||||
|
consumes.liquids(LiquidStack.with(Liquids.water, 0.5f, Liquids.hydrogen, 4f / 60f));
|
||||||
|
}};
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
//region storage
|
//region storage
|
||||||
@@ -2375,7 +2398,7 @@ public class Blocks{
|
|||||||
|
|
||||||
coreCitadel = new CoreBlock("core-citadel"){{
|
coreCitadel = new CoreBlock("core-citadel"){{
|
||||||
//TODO cost
|
//TODO cost
|
||||||
requirements(Category.effect, with(Items.silicon, 5000, Items.beryllium, 7000, Items.tungsten, 5000, Items.carbide, 5000));
|
requirements(Category.effect, with(Items.silicon, 5000, Items.beryllium, 8000, Items.tungsten, 5000, Items.carbide, 5000));
|
||||||
|
|
||||||
unitType = UnitTypes.incite;
|
unitType = UnitTypes.incite;
|
||||||
health = 18000;
|
health = 18000;
|
||||||
@@ -2389,7 +2412,7 @@ public class Blocks{
|
|||||||
|
|
||||||
coreAcropolis = new CoreBlock("core-acropolis"){{
|
coreAcropolis = new CoreBlock("core-acropolis"){{
|
||||||
//TODO cost
|
//TODO cost
|
||||||
requirements(Category.effect, with(Items.beryllium, 11000, Items.silicon, 11000, Items.tungsten, 9000, Items.carbide, 10000, Items.oxide, 8000));
|
requirements(Category.effect, with(Items.beryllium, 12000, Items.silicon, 11000, Items.tungsten, 9000, Items.carbide, 10000, Items.oxide, 8000));
|
||||||
|
|
||||||
unitType = UnitTypes.emanate;
|
unitType = UnitTypes.emanate;
|
||||||
health = 30000;
|
health = 30000;
|
||||||
@@ -2423,7 +2446,7 @@ public class Blocks{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
reinforcedContainer = new StorageBlock("reinforced-container"){{
|
reinforcedContainer = new StorageBlock("reinforced-container"){{
|
||||||
requirements(Category.effect, with(Items.tungsten, 100, Items.graphite, 50));
|
requirements(Category.effect, with(Items.tungsten, 100, Items.graphite, 50, Items.beryllium, 50));
|
||||||
size = 3;
|
size = 3;
|
||||||
//TODO should it really be kept the same, at 1000?
|
//TODO should it really be kept the same, at 1000?
|
||||||
itemCapacity = 1200;
|
itemCapacity = 1200;
|
||||||
@@ -2431,7 +2454,7 @@ public class Blocks{
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
reinforcedVault = new StorageBlock("reinforced-vault"){{
|
reinforcedVault = new StorageBlock("reinforced-vault"){{
|
||||||
requirements(Category.effect, with(Items.tungsten, 250, Items.carbide, 125));
|
requirements(Category.effect, with(Items.tungsten, 250, Items.carbide, 125, Items.beryllium, 100));
|
||||||
size = 4;
|
size = 4;
|
||||||
itemCapacity = 2500;
|
itemCapacity = 2500;
|
||||||
scaledHealth = 120;
|
scaledHealth = 120;
|
||||||
@@ -2954,7 +2977,7 @@ public class Blocks{
|
|||||||
//TODO bad name
|
//TODO bad name
|
||||||
sublimate = new ContinuousTurret("sublimate"){{
|
sublimate = new ContinuousTurret("sublimate"){{
|
||||||
//TODO requirements
|
//TODO requirements
|
||||||
requirements(Category.turret, with(Items.tungsten, 150, Items.silicon, 160, Items.oxide, 50));
|
requirements(Category.turret, with(Items.tungsten, 150, Items.silicon, 160, Items.oxide, 50, Items.beryllium, 200));
|
||||||
|
|
||||||
draw = new DrawTurret("reinforced-"){{
|
draw = new DrawTurret("reinforced-"){{
|
||||||
liquidDraw = Liquids.ozone;
|
liquidDraw = Liquids.ozone;
|
||||||
|
|||||||
@@ -139,7 +139,9 @@ public class ErekirTechTree{
|
|||||||
|
|
||||||
node(impactDrill, erekirSector, () -> {
|
node(impactDrill, erekirSector, () -> {
|
||||||
node(largePlasmaBore, () -> {
|
node(largePlasmaBore, () -> {
|
||||||
|
node(eruptionDrill, () -> {
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -409,6 +409,24 @@ public class Fx{
|
|||||||
}
|
}
|
||||||
}).layer(Layer.bullet - 4f),
|
}).layer(Layer.bullet - 4f),
|
||||||
|
|
||||||
|
dynamicSpikes = new Effect(40f, 100f, e -> {
|
||||||
|
color(e.color);
|
||||||
|
stroke(e.fout() * 2f);
|
||||||
|
float circleRad = 4f + e.finpow() * e.rotation;
|
||||||
|
Lines.circle(e.x, e.y, circleRad);
|
||||||
|
|
||||||
|
for(int i = 0; i < 4; i++){
|
||||||
|
Drawf.tri(e.x, e.y, 6f, e.rotation * 1.5f * e.fout(), i*90);
|
||||||
|
}
|
||||||
|
|
||||||
|
color();
|
||||||
|
for(int i = 0; i < 4; i++){
|
||||||
|
Drawf.tri(e.x, e.y, 3f, e.rotation * 1.45f / 3f * e.fout(), i*90);
|
||||||
|
}
|
||||||
|
|
||||||
|
Drawf.light(e.x, e.y, circleRad * 1.6f, Pal.heal, e.fout());
|
||||||
|
}),
|
||||||
|
|
||||||
greenBomb = new Effect(40f, 100f, e -> {
|
greenBomb = new Effect(40f, 100f, e -> {
|
||||||
color(Pal.heal);
|
color(Pal.heal);
|
||||||
stroke(e.fout() * 2f);
|
stroke(e.fout() * 2f);
|
||||||
@@ -2073,22 +2091,21 @@ public class Fx{
|
|||||||
randLenVectors(e.id, 12, 5f + e.finpow() * 22f, (x, y) -> {
|
randLenVectors(e.id, 12, 5f + e.finpow() * 22f, (x, y) -> {
|
||||||
Fill.square(e.x + x, e.y + y, e.fout() * 2.5f + 0.5f, 45);
|
Fill.square(e.x + x, e.y + y, e.fout() * 2.5f + 0.5f, 45);
|
||||||
});
|
});
|
||||||
|
}),
|
||||||
|
|
||||||
color(Pal.redLight);
|
mineImpactWave = new Effect(50f, e -> {
|
||||||
|
color(e.color);
|
||||||
|
|
||||||
e.scaled(50f, b -> {
|
stroke(e.fout() * 1.5f);
|
||||||
stroke(b.fout() * 1.5f);
|
|
||||||
|
|
||||||
randLenVectors(e.id, 12, 4f + b.finpow() * 40f, (x, y) -> {
|
randLenVectors(e.id, 12, 4f + e.finpow() * e.rotation, (x, y) -> {
|
||||||
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), b.fout() * 5 + 1f);
|
lineAngle(e.x + x, e.y + y, Mathf.angle(x, y), e.fout() * 5 + 1f);
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
e.scaled(30f, b -> {
|
e.scaled(30f, b -> {
|
||||||
Lines.stroke(5f * b.fout());
|
Lines.stroke(5f * b.fout());
|
||||||
Lines.circle(e.x, e.y, b.finpow() * 28f);
|
Lines.circle(e.x, e.y, b.finpow() * 28f);
|
||||||
});
|
});
|
||||||
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
payloadReceive = new Effect(30, e -> {
|
payloadReceive = new Effect(30, e -> {
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ import mindustry.game.Objectives.*;
|
|||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
/** Class for storing a list of TechNodes with some utility tree builder methods; context dependent. See {@link SerpuloTechTree#load} source for example usage. */
|
/** Class for storing a list of TechNodes with some utility tree builder methods; context dependent. See {@link SerpuloTechTree#load} source for example usage. */
|
||||||
public class TechTree{
|
public class TechTree{
|
||||||
private static TechNode context = null;
|
private static TechNode context = null;
|
||||||
@@ -126,8 +124,6 @@ public class TechTree{
|
|||||||
for(ItemStack requirement : requirements){
|
for(ItemStack requirement : requirements){
|
||||||
requirement.amount = (int)(requirement.amount * researchCostMultipliers.get(requirement.item, 1));
|
requirement.amount = (int)(requirement.amount * researchCostMultipliers.get(requirement.item, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.info("@ = @", content, Arrays.toString(requirements));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setupRequirements(requirements);
|
setupRequirements(requirements);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import arc.struct.*;
|
|||||||
import arc.util.*;
|
import arc.util.*;
|
||||||
import mindustry.*;
|
import mindustry.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
|
import mindustry.entities.effect.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
@@ -93,6 +94,14 @@ public class Effect{
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public WrapEffect wrap(Color color){
|
||||||
|
return new WrapEffect(this, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WrapEffect wrap(Color color, float rotation){
|
||||||
|
return new WrapEffect(this, color, rotation);
|
||||||
|
}
|
||||||
|
|
||||||
public void at(Position pos){
|
public void at(Position pos){
|
||||||
create(this, pos.getX(), pos.getY(), 0, Color.white, null);
|
create(this, pos.getX(), pos.getY(), 0, Color.white, null);
|
||||||
}
|
}
|
||||||
|
|||||||
40
core/src/mindustry/entities/effect/WrapEffect.java
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package mindustry.entities.effect;
|
||||||
|
|
||||||
|
import arc.graphics.*;
|
||||||
|
import mindustry.entities.*;
|
||||||
|
|
||||||
|
/** Wraps an effect with some parameters. */
|
||||||
|
public class WrapEffect extends Effect{
|
||||||
|
public Effect effect;
|
||||||
|
public Color color = Color.white.cpy();
|
||||||
|
public float rotation = Float.NaN;
|
||||||
|
|
||||||
|
public WrapEffect(){
|
||||||
|
}
|
||||||
|
|
||||||
|
public WrapEffect(Effect effect, Color color){
|
||||||
|
this.effect = effect;
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WrapEffect(Effect effect, Color color, float rotation){
|
||||||
|
this.effect = effect;
|
||||||
|
this.color = color;
|
||||||
|
this.rotation = rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(){
|
||||||
|
effect.init();
|
||||||
|
clip = effect.clip;
|
||||||
|
lifetime = effect.lifetime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(EffectContainer e){
|
||||||
|
e.color = color;
|
||||||
|
if(!Float.isNaN(rotation)) e.rotation = rotation;
|
||||||
|
effect.render(e);
|
||||||
|
clip = Math.max(clip, effect.clip);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -95,6 +95,10 @@ public class Drawf{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void additive(TextureRegion region, Color color, float x, float y){
|
||||||
|
additive(region, color, x, y, 0f, Layer.blockAdditive);
|
||||||
|
}
|
||||||
|
|
||||||
public static void additive(TextureRegion region, Color color, float x, float y, float rotation){
|
public static void additive(TextureRegion region, Color color, float x, float y, float rotation){
|
||||||
additive(region, color, x, y, rotation, Layer.blockAdditive);
|
additive(region, color, x, y, rotation, Layer.blockAdditive);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,12 +14,15 @@ public class BurstDrill extends Drill{
|
|||||||
public Interp speedCurve = Interp.pow2In;
|
public Interp speedCurve = Interp.pow2In;
|
||||||
|
|
||||||
public @Load("@-top-invert") TextureRegion topInvertRegion;
|
public @Load("@-top-invert") TextureRegion topInvertRegion;
|
||||||
|
public @Load("@-glow") TextureRegion glowRegion;
|
||||||
public @Load("@-arrow") TextureRegion arrowRegion;
|
public @Load("@-arrow") TextureRegion arrowRegion;
|
||||||
public @Load("@-arrow-blur") TextureRegion arrowBlurRegion;
|
public @Load("@-arrow-blur") TextureRegion arrowBlurRegion;
|
||||||
|
|
||||||
public float invertedTime = 200f;
|
public float invertedTime = 200f;
|
||||||
public float arrowSpacing = 4f;
|
public float arrowSpacing = 4f, arrowOffset = 0f;
|
||||||
|
public int arrows = 3;
|
||||||
public Color arrowColor = Color.valueOf("feb380"), baseArrowColor = Color.valueOf("6e7080");
|
public Color arrowColor = Color.valueOf("feb380"), baseArrowColor = Color.valueOf("6e7080");
|
||||||
|
public Color glowColor = arrowColor.cpy();
|
||||||
|
|
||||||
public BurstDrill(String name){
|
public BurstDrill(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -93,7 +96,7 @@ public class BurstDrill extends Drill{
|
|||||||
drawDefaultCracks();
|
drawDefaultCracks();
|
||||||
|
|
||||||
Draw.rect(topRegion, x, y);
|
Draw.rect(topRegion, x, y);
|
||||||
if(invertTime > 0){
|
if(invertTime > 0 && topInvertRegion.found()){
|
||||||
Draw.alpha(Interp.pow3Out.apply(invertTime));
|
Draw.alpha(Interp.pow3Out.apply(invertTime));
|
||||||
Draw.rect(topInvertRegion, x, y);
|
Draw.rect(topInvertRegion, x, y);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
@@ -106,13 +109,12 @@ public class BurstDrill extends Drill{
|
|||||||
}
|
}
|
||||||
|
|
||||||
float fract = smoothProgress;
|
float fract = smoothProgress;
|
||||||
int arrows = 3;
|
|
||||||
Draw.color(arrowColor);
|
Draw.color(arrowColor);
|
||||||
for(int i = 0; i < 4; i++){
|
for(int i = 0; i < 4; i++){
|
||||||
for(int j = 0; j < arrows; j++){
|
for(int j = 0; j < arrows; j++){
|
||||||
float arrowFract = (arrows - 1 - j);
|
float arrowFract = (arrows - 1 - j);
|
||||||
float a = Mathf.clamp(fract * arrows - arrowFract);
|
float a = Mathf.clamp(fract * arrows - arrowFract);
|
||||||
Tmp.v1.trns(i * 90 + 45, j * arrowSpacing);
|
Tmp.v1.trns(i * 90 + 45, j * arrowSpacing + arrowOffset);
|
||||||
|
|
||||||
//TODO maybe just use arrow alpha and draw gray on the base?
|
//TODO maybe just use arrow alpha and draw gray on the base?
|
||||||
Draw.z(Layer.block);
|
Draw.z(Layer.block);
|
||||||
@@ -121,14 +123,20 @@ public class BurstDrill extends Drill{
|
|||||||
|
|
||||||
Draw.color(arrowColor);
|
Draw.color(arrowColor);
|
||||||
|
|
||||||
Draw.z(Layer.blockAdditive);
|
if(arrowBlurRegion.found()){
|
||||||
Draw.blend(Blending.additive);
|
Draw.z(Layer.blockAdditive);
|
||||||
Draw.alpha(Mathf.pow(a, 10f));
|
Draw.blend(Blending.additive);
|
||||||
Draw.rect(arrowBlurRegion, x + Tmp.v1.x, y + Tmp.v1.y, i * 90);
|
Draw.alpha(Mathf.pow(a, 10f));
|
||||||
Draw.blend();
|
Draw.rect(arrowBlurRegion, x + Tmp.v1.x, y + Tmp.v1.y, i * 90);
|
||||||
|
Draw.blend();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Draw.color();
|
Draw.color();
|
||||||
|
|
||||||
|
if(glowRegion.found()){
|
||||||
|
Drawf.additive(glowRegion, Tmp.c2.set(glowColor).a(Mathf.pow(fract, 3f) * glowColor.a), x, y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||