sublimate progress
This commit is contained in:
@@ -2726,7 +2726,9 @@ public class Blocks implements ContentList{
|
||||
|
||||
range = 170f;
|
||||
|
||||
//TODO unfinished, needs damage + proper mechanics
|
||||
shootType = new ContinuousFlameBulletType(){{
|
||||
damage = 4f;
|
||||
length = range;
|
||||
}};
|
||||
shootLength = 7f;
|
||||
|
||||
@@ -549,6 +549,14 @@ public class Fx{
|
||||
});
|
||||
}),
|
||||
|
||||
hitFlameBeam = new Effect(19, e -> {
|
||||
color(e.color);
|
||||
|
||||
randLenVectors(e.id, 7, e.finpow() * 11f, (x, y) -> {
|
||||
Fill.circle(e.x + x, e.y + y, e.fout() * 2 + 0.5f);
|
||||
});
|
||||
}),
|
||||
|
||||
hitMeltdown = new Effect(12, e -> {
|
||||
color(Pal.meltdownHit);
|
||||
stroke(e.fout() * 2f);
|
||||
|
||||
@@ -10,6 +10,7 @@ public class ContinuousBulletType extends BulletType{
|
||||
public float shake = 0f;
|
||||
public float damageInterval = 5f;
|
||||
public boolean largeHit = false;
|
||||
public boolean laserAbsorb = true;
|
||||
|
||||
{
|
||||
speed = 0f;
|
||||
@@ -53,7 +54,7 @@ public class ContinuousBulletType extends BulletType{
|
||||
|
||||
//damage every 5 ticks
|
||||
if(b.timer(1, damageInterval)){
|
||||
Damage.collideLine(b, b.team, hitEffect, b.x, b.y, b.rotation(), length, largeHit);
|
||||
Damage.collideLine(b, b.team, hitEffect, b.x, b.y, b.rotation(), currentLength(b), largeHit, laserAbsorb);
|
||||
}
|
||||
|
||||
if(shake > 0){
|
||||
@@ -61,4 +62,8 @@ public class ContinuousBulletType extends BulletType{
|
||||
}
|
||||
}
|
||||
|
||||
public float currentLength(Bullet b){
|
||||
return length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
|
||||
@@ -42,19 +41,20 @@ public class ContinuousFlameBulletType extends ContinuousBulletType{
|
||||
{
|
||||
optimalLifeFract = 0.5f;
|
||||
length = 120f;
|
||||
hitEffect = Fx.hitBeam;
|
||||
hitEffect = Fx.hitFlameBeam;
|
||||
hitSize = 4;
|
||||
drawSize = 420f;
|
||||
lifetime = 16f;
|
||||
hitColor = colors[3];
|
||||
lightColor = colors[3];
|
||||
hitColor = colors[1].cpy().a(1f);
|
||||
lightColor = hitColor;
|
||||
//TODO what if, instead of piercing, it stopped at the first target regardless? or maybe 2?
|
||||
laserAbsorb = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bullet b){
|
||||
float mult = b.fslope();
|
||||
float maxLength = length * mult;
|
||||
float realLength = Damage.findLaserLength(b, maxLength);
|
||||
float realLength = length * mult;
|
||||
|
||||
float sin = Mathf.sin(Time.time, oscScl, oscMag);
|
||||
|
||||
@@ -88,6 +88,11 @@ public class ContinuousFlameBulletType extends ContinuousBulletType{
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float currentLength(Bullet b){
|
||||
return length * b.fslope();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawLight(Bullet b){
|
||||
//no light drawn here
|
||||
|
||||
Reference in New Issue
Block a user