mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-10 12:49:37 +07:00
Fixed lighting not rendering / Fixed engine colors
This commit is contained in:
parent
6217ae78e3
commit
6ea90ea828
@ -386,7 +386,7 @@ public class Blocks implements ContentList{
|
||||
craftEffect = Fx.smeltsmoke;
|
||||
output = Items.surgealloy;
|
||||
craftTime = 75f;
|
||||
size = 2;
|
||||
size = 3;
|
||||
|
||||
consumes.power(4f);
|
||||
consumes.items(new ItemStack(Items.titanium, 2), new ItemStack(Items.lead, 4), new ItemStack(Items.silicon, 3), new ItemStack(Items.copper, 3));
|
||||
|
@ -35,7 +35,7 @@ public class Mechs implements ContentList{
|
||||
mass = 1.2f;
|
||||
speed = 0.5f;
|
||||
boostSpeed = 0.85f;
|
||||
trailColorTo = Color.valueOf("ffd37f");
|
||||
engineColor = Color.valueOf("ffd37f");
|
||||
health = 250f;
|
||||
|
||||
weapon = new Weapon("blaster"){{
|
||||
@ -65,7 +65,7 @@ public class Mechs implements ContentList{
|
||||
health = 220f;
|
||||
weaponOffsetX = -1;
|
||||
weaponOffsetY = -1;
|
||||
trailColorTo = Color.valueOf("d3ddff");
|
||||
engineColor = Color.valueOf("d3ddff");
|
||||
|
||||
weapon = new Weapon("shockgun"){{
|
||||
length = 1f;
|
||||
@ -110,7 +110,7 @@ public class Mechs implements ContentList{
|
||||
boostSpeed = 0.8f;
|
||||
canHeal = true;
|
||||
health = 200f;
|
||||
trailColorTo = Palette.heal;
|
||||
engineColor = Palette.heal;
|
||||
|
||||
weapon = new Weapon("heal-blaster"){{
|
||||
length = 1.5f;
|
||||
@ -159,7 +159,7 @@ public class Mechs implements ContentList{
|
||||
shake = 4f;
|
||||
weaponOffsetX = 1;
|
||||
weaponOffsetY = 0;
|
||||
trailColorTo = Color.valueOf("feb380");
|
||||
engineColor = Color.valueOf("feb380");
|
||||
health = 300f;
|
||||
weapon = new Weapon("swarmer"){{
|
||||
length = 1.5f;
|
||||
@ -228,7 +228,7 @@ public class Mechs implements ContentList{
|
||||
health = 180f;
|
||||
weaponOffsetX = -1;
|
||||
weaponOffsetY = -1;
|
||||
trailColor = Palette.lightTrail;
|
||||
engineColor = Palette.lightTrail;
|
||||
cellTrnsY = 1f;
|
||||
weapon = new Weapon("blaster"){{
|
||||
length = 1.5f;
|
||||
@ -255,7 +255,7 @@ public class Mechs implements ContentList{
|
||||
drag = 0.01f;
|
||||
mass = 2f;
|
||||
health = 170f;
|
||||
trailColor = Color.valueOf("d3ddff");
|
||||
engineColor = Color.valueOf("d3ddff");
|
||||
cellTrnsY = 1f;
|
||||
weapon = new Weapon("missiles"){{
|
||||
length = 1.5f;
|
||||
@ -321,7 +321,7 @@ public class Mechs implements ContentList{
|
||||
turnCursor = false;
|
||||
health = 220f;
|
||||
itemCapacity = 30;
|
||||
trailColor = Color.valueOf("84f491");
|
||||
engineColor = Color.valueOf("84f491");
|
||||
cellTrnsY = 1f;
|
||||
weapon = new Weapon("bomber"){{
|
||||
length = 0f;
|
||||
@ -352,7 +352,7 @@ public class Mechs implements ContentList{
|
||||
mass = 3f;
|
||||
health = 240f;
|
||||
itemCapacity = 60;
|
||||
trailColor = Color.valueOf("feb380");
|
||||
engineColor = Color.valueOf("feb380");
|
||||
cellTrnsY = 1f;
|
||||
|
||||
weapon = new Weapon("bomber"){{
|
||||
|
@ -4,6 +4,8 @@ import io.anuke.annotations.Annotations.Loc;
|
||||
import io.anuke.annotations.Annotations.Remote;
|
||||
import io.anuke.arc.collection.Array;
|
||||
import io.anuke.arc.collection.IntSet;
|
||||
import io.anuke.arc.graphics.g2d.Fill;
|
||||
import io.anuke.arc.graphics.g2d.Lines;
|
||||
import io.anuke.mindustry.entities.EntityGroup;
|
||||
import io.anuke.mindustry.entities.impl.TimedEntity;
|
||||
import io.anuke.mindustry.entities.traits.DrawTrait;
|
||||
@ -129,31 +131,22 @@ public class Lightning extends TimedEntity implements DrawTrait, SyncTrait, Time
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
float lx = x, ly = y;
|
||||
Lines.stroke(2f * fout());
|
||||
Draw.color(color, Color.WHITE, fin());
|
||||
//TODO this is really, really bad rendering
|
||||
/*
|
||||
for(int i = 0; i < lines.size; i++){
|
||||
Position v = lines.get(i);
|
||||
Lines.beginLine();
|
||||
|
||||
float f = (float) i / lines.size;
|
||||
Lines.linePoint(x, y);
|
||||
for(Position p : lines){
|
||||
Lines.linePoint(p.getX(), p.getY());
|
||||
}
|
||||
Lines.endLine();
|
||||
|
||||
Lines.stroke(fout() * 3f * (1.5f - f));
|
||||
int i = 0;
|
||||
|
||||
Lines.stroke(Lines.getStroke() * 4f);
|
||||
Draw.alpha(0.3f);
|
||||
Lines.line(lx, ly, v.getX(), v.getY());
|
||||
|
||||
Lines.stroke(Lines.getStroke()/4f);
|
||||
Draw.alpha(1f);
|
||||
Lines.line(lx, ly, v.getX(), v.getY());
|
||||
|
||||
Lines.stroke(3f * fout() * (1f - f));
|
||||
|
||||
lx = v.getX();
|
||||
ly = v.getY();
|
||||
}*/
|
||||
Draw.color();
|
||||
for(Position p : lines){
|
||||
Fill.square(p.getX(), p.getY(), (4f - (float)i++/lines.size*2f) * fout(), 45);
|
||||
}
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -371,7 +371,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
||||
public void drawUnder(){
|
||||
float size = mech.engineSize * (mech.flying ? 1f : boostHeat);
|
||||
|
||||
Draw.color(mech.trailColorTo);
|
||||
Draw.color(mech.engineColor);
|
||||
Fill.circle(x + Angles.trnsx(rotation + 180, mech.engineOffset), y + Angles.trnsy(rotation + 180, mech.engineOffset),
|
||||
size + Mathf.absin(Time.time(), 2f, size/4f));
|
||||
|
||||
|
@ -27,8 +27,7 @@ public class Mech extends UnlockableContent{
|
||||
public float mineSpeed = 1f;
|
||||
public int drillPower = -1;
|
||||
public float buildPower = 1f;
|
||||
public Color trailColor = Palette.boostFrom;
|
||||
public Color trailColorTo = Palette.boostTo;
|
||||
public Color engineColor = Palette.boostTo;
|
||||
public int itemCapacity = 30;
|
||||
public boolean turnCursor = true;
|
||||
public boolean canHeal = false;
|
||||
|
Loading…
Reference in New Issue
Block a user