Bugfixes
This commit is contained in:
@@ -2,6 +2,7 @@ package mindustry.content;
|
||||
|
||||
import arc.*;
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.Texture.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.math.geom.*;
|
||||
@@ -158,15 +159,22 @@ public class Weathers implements ContentList{
|
||||
|
||||
sandstorm = new Weather("sandstorm"){
|
||||
TextureRegion region;
|
||||
float yspeed = 0.3f, xspeed = 6f, padding = 110f, size = 110f, invDensity = 800f;
|
||||
float yspeed = 0.3f, xspeed = 6f, size = 140f, padding = size, invDensity = 1500f;
|
||||
Vec2 force = new Vec2(0.45f, 0.01f);
|
||||
Color color = Color.valueOf("f7cba4");
|
||||
Texture noise;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
super.load();
|
||||
|
||||
region = Core.atlas.find("circle-shadow");
|
||||
noise = new Texture("sprites/noiseAlpha.png");
|
||||
noise.setWrap(TextureWrap.repeat);
|
||||
noise.setFilter(TextureFilter.linear);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose(){
|
||||
noise.dispose();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -179,6 +187,16 @@ public class Weathers implements ContentList{
|
||||
|
||||
@Override
|
||||
public void drawOver(WeatherState state){
|
||||
Draw.tint(color);
|
||||
|
||||
float scale = 1f / 2000f;
|
||||
float scroll = Time.time() * scale;
|
||||
Tmp.tr1.setTexture(noise);
|
||||
Core.camera.bounds(Tmp.r1);
|
||||
Tmp.tr1.set(Tmp.r1.x*scale, Tmp.r1.y*scale, (Tmp.r1.x + Tmp.r1.width)*scale, (Tmp.r1.y + Tmp.r1.height)*scale);
|
||||
Tmp.tr1.scroll(-xspeed * scroll, -yspeed * scroll);
|
||||
Draw.rect(Tmp.tr1, Core.camera.position.x, Core.camera.position.y, Core.camera.width, -Core.camera.height);
|
||||
|
||||
rand.setSeed(0);
|
||||
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
|
||||
Tmp.r1.grow(padding);
|
||||
@@ -206,7 +224,6 @@ public class Weathers implements ContentList{
|
||||
|
||||
if(Tmp.r3.setCentered(x, y, size * sscl).overlaps(Tmp.r2)){
|
||||
Draw.alpha(alpha * baseAlpha);
|
||||
//Fill.circle(x, y, size * sscl / 2f);
|
||||
Draw.rect(region, x, y, size * sscl, size * sscl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class PlayerListFragment extends Fragment{
|
||||
}
|
||||
};
|
||||
table.margin(8);
|
||||
table.add(new Image(user.icon()).setScaling(Scaling.none)).grow();
|
||||
table.add(new Image(user.icon()).setScaling(Scaling.bounded)).grow();
|
||||
|
||||
button.add(table).size(h);
|
||||
button.labelWrap("[#" + user.color().toString().toUpperCase() + "]" + user.name()).width(170f).pad(10);
|
||||
|
||||
Reference in New Issue
Block a user