progress
This commit is contained in:
@@ -188,6 +188,8 @@ public class Renderer implements ApplicationListener{
|
|||||||
|
|
||||||
Draw.proj(camera);
|
Draw.proj(camera);
|
||||||
|
|
||||||
|
Draw.sort(true);
|
||||||
|
|
||||||
//beginFx();
|
//beginFx();
|
||||||
|
|
||||||
drawBackground();
|
drawBackground();
|
||||||
@@ -206,7 +208,7 @@ public class Renderer implements ApplicationListener{
|
|||||||
blocks.floor.drawLayer(CacheLayer.walls);
|
blocks.floor.drawLayer(CacheLayer.walls);
|
||||||
blocks.floor.endDraw();
|
blocks.floor.endDraw();
|
||||||
|
|
||||||
Draw.sort(true);
|
|
||||||
|
|
||||||
blocks.drawBlocks();
|
blocks.drawBlocks();
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import mindustry.game.Teams.*;
|
|||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
import mindustry.world.*;
|
import mindustry.world.*;
|
||||||
|
import mindustry.world.blocks.power.*;
|
||||||
|
|
||||||
import static arc.Core.camera;
|
import static arc.Core.camera;
|
||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
@@ -202,7 +203,7 @@ public class BlockRenderer implements Disposable{
|
|||||||
|
|
||||||
if(tile.entity != null && tile.entity.power() != null && tile.entity.power().links.size > 0){
|
if(tile.entity != null && tile.entity.power() != null && tile.entity.power().links.size > 0){
|
||||||
for(Tilec other : tile.entity.getPowerConnections(outArray2)){
|
for(Tilec other : tile.entity.getPowerConnections(outArray2)){
|
||||||
if(other.block().layer == Layer.power){
|
if(other.block() instanceof PowerNode){ //TODO need a generic way to render connections!
|
||||||
requests.add(other.tile());
|
requests.add(other.tile());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,63 @@
|
|||||||
package mindustry.graphics;
|
package mindustry.graphics;
|
||||||
|
|
||||||
public enum Layer{
|
/** Stores constants for sorting layers. Values should be stored in increments of 10. */
|
||||||
/** Base block layer. */
|
public class Layer{
|
||||||
block,
|
|
||||||
/** for placement */
|
public static final float
|
||||||
placement,
|
|
||||||
/** First overlay. Stuff like conveyor items. */
|
//background, which may be planets or an image or nothing at all
|
||||||
overlay,
|
background = -10,
|
||||||
/** "High" blocks, like turrets. */
|
|
||||||
turret,
|
//floor tiles
|
||||||
/** Power lasers. */
|
floor = 0,
|
||||||
power,
|
|
||||||
/** Extra layer that's always on top.*/
|
//scorch marks on the floor
|
||||||
lights
|
scorch = 10,
|
||||||
|
|
||||||
|
//things such as spent casings or rubble
|
||||||
|
debris = 20,
|
||||||
|
|
||||||
|
//base block layer - most blocks go here
|
||||||
|
block = 30,
|
||||||
|
|
||||||
|
//blocks currently in progress *shaders used* TODO perhaps put shaders into their own category
|
||||||
|
blockBuilding = 40,
|
||||||
|
|
||||||
|
//ground units
|
||||||
|
groundUnit = 50,
|
||||||
|
|
||||||
|
//turrets
|
||||||
|
turret = 60,
|
||||||
|
|
||||||
|
//power lines
|
||||||
|
power = 70,
|
||||||
|
|
||||||
|
//building plans
|
||||||
|
plans = 80,
|
||||||
|
|
||||||
|
//flying units
|
||||||
|
flyingUnit = 90,
|
||||||
|
|
||||||
|
//bullets *bloom begin*
|
||||||
|
bullet = 100,
|
||||||
|
|
||||||
|
//effects *bloom end*
|
||||||
|
effect = 110,
|
||||||
|
|
||||||
|
//overlaied UI, like block config guides
|
||||||
|
overlayUI = 120,
|
||||||
|
|
||||||
|
//weather effects, e.g. rain and snow TODO draw before overlay UI?
|
||||||
|
weather = 130,
|
||||||
|
|
||||||
|
//light rendering *shaders used*
|
||||||
|
light = 140,
|
||||||
|
|
||||||
|
//names of players in the game
|
||||||
|
playerName = 150,
|
||||||
|
|
||||||
|
//space effects, currently only the land and launch effects
|
||||||
|
space = 160
|
||||||
|
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ package mindustry.world.blocks.legacy;
|
|||||||
|
|
||||||
import arc.util.io.*;
|
import arc.util.io.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.world.*;
|
|
||||||
|
|
||||||
public class LegacyCommandCenter extends Block{
|
public class LegacyCommandCenter extends LegacyBlock{
|
||||||
|
|
||||||
public LegacyCommandCenter(String name){
|
public LegacyCommandCenter(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ package mindustry.world.blocks.legacy;
|
|||||||
|
|
||||||
import arc.util.io.*;
|
import arc.util.io.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.world.*;
|
|
||||||
|
|
||||||
public class LegacyUnitFactory extends Block{
|
public class LegacyUnitFactory extends LegacyBlock{
|
||||||
|
|
||||||
public LegacyUnitFactory(String name){
|
public LegacyUnitFactory(String name){
|
||||||
super(name);
|
super(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user