Re-added shadows
This commit is contained in:
@@ -187,7 +187,8 @@ public class Renderer extends RendererModule{
|
|||||||
drawAndInterpolate(groundEffectGroup, e -> !(e instanceof BelowLiquidTrait));
|
drawAndInterpolate(groundEffectGroup, e -> !(e instanceof BelowLiquidTrait));
|
||||||
|
|
||||||
blocks.processBlocks();
|
blocks.processBlocks();
|
||||||
//blocks.drawShadows();
|
blocks.drawShadows();
|
||||||
|
|
||||||
for(Team team : Team.all){
|
for(Team team : Team.all){
|
||||||
if(blocks.isTeamShown(team)){
|
if(blocks.isTeamShown(team)){
|
||||||
boolean outline = team != players[0].getTeam() && team != Team.none;
|
boolean outline = team != players[0].getTeam() && team != Team.none;
|
||||||
@@ -218,7 +219,7 @@ public class Renderer extends RendererModule{
|
|||||||
blocks.skipLayer(Layer.turret);
|
blocks.skipLayer(Layer.turret);
|
||||||
blocks.drawBlocks(Layer.laser);
|
blocks.drawBlocks(Layer.laser);
|
||||||
|
|
||||||
//drawFlyerShadows();
|
drawFlyerShadows();
|
||||||
|
|
||||||
drawAllTeams(true);
|
drawAllTeams(true);
|
||||||
|
|
||||||
@@ -261,6 +262,7 @@ public class Renderer extends RendererModule{
|
|||||||
private void drawFlyerShadows(){
|
private void drawFlyerShadows(){
|
||||||
Graphics.surface(effectSurface, true, false);
|
Graphics.surface(effectSurface, true, false);
|
||||||
|
|
||||||
|
|
||||||
float trnsX = -12, trnsY = -13;
|
float trnsX = -12, trnsY = -13;
|
||||||
|
|
||||||
for(EntityGroup<? extends BaseUnit> group : unitGroups){
|
for(EntityGroup<? extends BaseUnit> group : unitGroups){
|
||||||
|
|||||||
@@ -376,10 +376,10 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
|||||||
drawBuilding(this);
|
drawBuilding(this);
|
||||||
|
|
||||||
if(mech.flying || boostHeat > 0.001f){
|
if(mech.flying || boostHeat > 0.001f){
|
||||||
float wobblyness = 0.6f;
|
float wobblyness = 0f;
|
||||||
if(!state.isPaused()) trail.update(x + Angles.trnsx(rotation + 180f, 5f) + Mathf.range(wobblyness),
|
if(!state.isPaused()) trail.update(x + Angles.trnsx(rotation + 180f, 5f) + Mathf.range(wobblyness),
|
||||||
y + Angles.trnsy(rotation + 180f, 5f) + Mathf.range(wobblyness));
|
y + Angles.trnsy(rotation + 180f, 5f) + Mathf.range(wobblyness));
|
||||||
trail.draw(Hue.mix(mech.trailColor, mech.trailColorTo, mech.flying ? 0f : boostHeat, Tmp.c1), 5f * (isFlying() ? 1f : boostHeat));
|
trail.draw(Hue.mix(mech.trailColor, mech.trailColorTo, mech.flying ? 0f : boostHeat, Tmp.c1), 5f * (isFlying() ? 1f : boostHeat) * Mathf.clamp(velocity.len(), 0f, 2f) / 2f);
|
||||||
}else{
|
}else{
|
||||||
trail.clear();
|
trail.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import static io.anuke.mindustry.Vars.world;
|
|||||||
|
|
||||||
public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
||||||
protected static Translator vec = new Translator();
|
protected static Translator vec = new Translator();
|
||||||
protected static float wobblyness = 0.6f;
|
protected static float wobblyness = 0f;
|
||||||
|
|
||||||
protected Trail trail = new Trail(8);
|
protected Trail trail = new Trail(8);
|
||||||
protected CarriableTrait carrying;
|
protected CarriableTrait carrying;
|
||||||
@@ -171,7 +171,7 @@ public abstract class FlyingUnit extends BaseUnit implements CarryTrait{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawOver(){
|
public void drawOver(){
|
||||||
trail.draw(type.trailColor, 5f);
|
trail.draw(type.trailColor, 5f * Mathf.clamp(velocity.len(), 0f, 2f) / 2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ public class Drone extends FlyingUnit implements BuilderTrait{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawOver(){
|
public void drawOver(){
|
||||||
trail.draw(Palette.lightTrail, 3f);
|
trail.draw(Palette.lightTrail, 3f * Mathf.clamp(velocity.len(), 0, 1f) / 1f);
|
||||||
|
|
||||||
TargetTrait entity = target;
|
TargetTrait entity = target;
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class Trail{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(points.size >= 2){
|
if(points.size >= 2){
|
||||||
Fill.circle(points.get(points.size - 2), points.get(points.size - 1), stroke / 2f);
|
Fill.circle(points.get(points.size - 2), points.get(points.size - 1), stroke / 2f * (points.size - 3f) / points.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
Draw.reset();
|
Draw.reset();
|
||||||
|
|||||||
Reference in New Issue
Block a user