Added new 'space' tile with shader / Added additional teleporter FX
This commit is contained in:
@@ -43,6 +43,17 @@ public enum DrawLayer {
|
||||
endShader(batch, Shaders.oil);
|
||||
}
|
||||
},
|
||||
space{
|
||||
@Override
|
||||
public void begin(CacheBatch batch){
|
||||
beginShader(batch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void end(CacheBatch batch){
|
||||
endShader(batch, Shaders.space);
|
||||
}
|
||||
},
|
||||
normal,
|
||||
walls;
|
||||
|
||||
|
||||
@@ -19,4 +19,8 @@ public class Palette {
|
||||
public static final Color lancerLaser = Color.valueOf("a9d8ff");
|
||||
|
||||
public static final Color stoneGray = Color.valueOf("8f8f8f");
|
||||
|
||||
public static final Color portalLight = Color.valueOf("9054ea");
|
||||
public static final Color portal = Color.valueOf("6344d7");
|
||||
public static final Color portalDark = Color.valueOf("3f3dac");
|
||||
}
|
||||
|
||||
@@ -10,17 +10,34 @@ import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.graphics.Shader;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
|
||||
import static io.anuke.mindustry.Vars.tilesize;
|
||||
import static io.anuke.mindustry.Vars.world;
|
||||
|
||||
public class Shaders{
|
||||
public static final Outline outline = new Outline();
|
||||
public static final Shield shield = new Shield();
|
||||
public static final SurfaceShader water = new SurfaceShader("water");
|
||||
public static final SurfaceShader lava = new SurfaceShader("lava");
|
||||
public static final SurfaceShader oil = new SurfaceShader("oil");
|
||||
public static final Space space = new Space();
|
||||
public static final UnitBuild build = new UnitBuild();
|
||||
public static final Shader hit = new Shader("hit", "default");
|
||||
|
||||
private static final Vector2 vec = new Vector2();
|
||||
|
||||
public static class Space extends SurfaceShader{
|
||||
|
||||
public Space(){
|
||||
super("space2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
super.apply();
|
||||
shader.setUniformf("u_center", world.width() * tilesize/2f, world.height() * tilesize/2f);
|
||||
}
|
||||
}
|
||||
|
||||
public static class UnitBuild extends Shader{
|
||||
public float progress, time;
|
||||
public Color color = new Color();
|
||||
|
||||
Reference in New Issue
Block a user