UnitType docs

This commit is contained in:
Anuken
2022-05-01 23:50:49 -04:00
parent 5e7428f034
commit 1d249f233f
16 changed files with 456 additions and 282 deletions

View File

@@ -33,7 +33,7 @@ abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
t.length = type.trailLength;
int sign = i == 0 ? -1 : 1;
float cx = Angles.trnsx(rotation - 90, type.trailX * sign, type.trailY) + x, cy = Angles.trnsy(rotation - 90, type.trailX * sign, type.trailY) + y;
float cx = Angles.trnsx(rotation - 90, type.waveTrailX * sign, type.waveTrailY) + x, cy = Angles.trnsy(rotation - 90, type.waveTrailX * sign, type.waveTrailY) + y;
t.update(cx, cy, world.floorWorld(cx, cy).isLiquid && !flying ? 1 : 0);
}
}
@@ -67,8 +67,8 @@ abstract class WaterMoveComp implements Posc, Velc, Hitboxc, Flyingc, Unitc{
Color color = Tmp.c1.set(floor.mapColor.equals(Color.black) ? Blocks.water.mapColor : floor.mapColor).mul(1.5f);
trailColor.lerp(color, Mathf.clamp(Time.delta * 0.04f));
tleft.draw(trailColor, type.trailScl);
tright.draw(trailColor, type.trailScl);
tleft.draw(trailColor, type.tailScl);
tright.draw(trailColor, type.tailScl);
Draw.z(z);
}