progress
This commit is contained in:
@@ -313,10 +313,10 @@ public class Fx{
|
||||
Lines.poly(e.x, e.y, 4, 13f * e.fout());
|
||||
}).layer(Layer.debris),
|
||||
|
||||
crawlDust = new Effect(30, e -> {
|
||||
color(Tmp.c1.set(e.color).mul(1.1f));
|
||||
crawlDust = new Effect(35, e -> {
|
||||
color(Tmp.c1.set(e.color).mul(1.6f));
|
||||
randLenVectors(e.id, 2, 10f * e.finpow(), (x, y) -> {
|
||||
Fill.circle(e.x + x, e.y + y, e.fslope() * 3f + 0.3f);
|
||||
Fill.circle(e.x + x, e.y + y, e.fslope() * 4f + 0.3f);
|
||||
});
|
||||
}).layer(Layer.debris),
|
||||
|
||||
|
||||
@@ -2412,12 +2412,14 @@ public class UnitTypes implements ContentList{
|
||||
//region neoplasm
|
||||
|
||||
scuttler = new UnitType("scuttler"){{
|
||||
hitSize = 44f;
|
||||
outlineColor = Pal.neoplasmOutline;
|
||||
hitSize = 40f;
|
||||
omniMovement = false;
|
||||
rotateSpeed = 2f;
|
||||
rotateSpeed = 1.7f;
|
||||
drawCell = false;
|
||||
segments = 4;
|
||||
drawBody = false;
|
||||
crawlDamage = 2f;
|
||||
|
||||
segmentScl = 4f;
|
||||
segmentPhase = 5f;
|
||||
|
||||
@@ -2,12 +2,14 @@ package mindustry.entities.comp;
|
||||
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
import arc.util.*;
|
||||
import mindustry.*;
|
||||
import mindustry.ai.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.entities.EntityCollisions.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
@@ -20,6 +22,7 @@ import static mindustry.Vars.*;
|
||||
abstract class CrawlComp implements Posc, Rotc, Hitboxc, Unitc{
|
||||
@Import float x, y, speedMultiplier, rotation, hitSize;
|
||||
@Import UnitType type;
|
||||
@Import Team team;
|
||||
@Import Vec2 vel;
|
||||
|
||||
//TODO segments
|
||||
@@ -72,6 +75,10 @@ abstract class CrawlComp implements Posc, Rotc, Hitboxc, Unitc{
|
||||
solids ++;
|
||||
}
|
||||
|
||||
if(t.build != null && t.build.team != team){
|
||||
t.build.damage(team, type.crawlDamage * Time.delta);
|
||||
}
|
||||
|
||||
if(Mathf.chanceDelta(0.04)){
|
||||
Fx.crawlDust.at(t.worldx(), t.worldy(), t.floor().mapColor);
|
||||
}
|
||||
|
||||
@@ -103,6 +103,8 @@ public class Pal{
|
||||
|
||||
adminChat = Color.valueOf("ff4000"),
|
||||
|
||||
neoplasmOutline = Color.valueOf("2e191d"),
|
||||
|
||||
logicBlocks = Color.valueOf("d4816b"),
|
||||
logicControl = Color.valueOf("6bb2b2"),
|
||||
logicOperations = Color.valueOf("877bad"),
|
||||
|
||||
@@ -132,8 +132,9 @@ public class UnitType extends UnlockableContent{
|
||||
public float segmentSpacing = 2f;
|
||||
public float segmentScl = 4f, segmentPhase = 5f;
|
||||
public float segmentRotSpeed = 1f, segmentMaxRot = 30f;
|
||||
public float crawlSlowdown = 0.45f;
|
||||
public float crawlSlowdownFrac = 0.4f;
|
||||
public float crawlSlowdown = 0.5f;
|
||||
public float crawlDamage = 0.5f;
|
||||
public float crawlSlowdownFrac = 0.55f;
|
||||
|
||||
public ObjectSet<StatusEffect> immunities = new ObjectSet<>();
|
||||
public Sound deathSound = Sounds.bang;
|
||||
@@ -897,7 +898,8 @@ public class UnitType extends UnlockableContent{
|
||||
Unit unit = (Unit)crawl;
|
||||
applyColor(unit);
|
||||
|
||||
for(int p = 0; p < 2; p++){
|
||||
//change to 2 TODO
|
||||
for(int p = 0; p < 1; p++){
|
||||
TextureRegion[] regions = p == 0 ? segmentOutlineRegions : segmentRegions;
|
||||
|
||||
for(int i = 0; i < segments; i++){
|
||||
@@ -907,6 +909,14 @@ public class UnitType extends UnlockableContent{
|
||||
float rot = Mathf.slerp(crawl.segmentRot(), unit.rotation, i / (float)(segments - 1));
|
||||
float tx = Angles.trnsx(rot, trns), ty = Angles.trnsy(rot, trns);
|
||||
|
||||
|
||||
//shadow
|
||||
Draw.color(0f, 0f, 0f, 0.2f);
|
||||
Draw.rect(regions[i], unit.x + tx + 2f, unit.y + ty - 2f, rot - 90);
|
||||
|
||||
applyColor(unit);
|
||||
|
||||
|
||||
//TODO merge outlines?
|
||||
Draw.rect(regions[i], unit.x + tx, unit.y + ty, rot - 90);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user