Re-made all maps, added block smoke effects
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 200 B |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -83,6 +83,13 @@ public class EffectLoader{
|
|||||||
Draw.reset();
|
Draw.reset();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Effect.create("smoke", 100, e -> {
|
||||||
|
Draw.color(Color.GRAY, new Color(0.3f, 0.3f, 0.3f, 1f), e.ifract());
|
||||||
|
float size = 7f-e.ifract()*7f;
|
||||||
|
Draw.rect("circle", e.x, e.y, size, size);
|
||||||
|
Draw.reset();
|
||||||
|
});
|
||||||
|
|
||||||
Effect.create("spawn", 23, e -> {
|
Effect.create("spawn", 23, e -> {
|
||||||
Draw.thickness(2f);
|
Draw.thickness(2f);
|
||||||
Draw.color(Hue.mix(Color.DARK_GRAY, Color.SCARLET, e.ifract()));
|
Draw.color(Hue.mix(Color.DARK_GRAY, Color.SCARLET, e.ifract()));
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ public class PassTileGraph implements IndexedGraph<Tile>{
|
|||||||
public Array<Connection<Tile>> getConnections(Tile fromNode){
|
public Array<Connection<Tile>> getConnections(Tile fromNode){
|
||||||
tempConnections.clear();
|
tempConnections.clear();
|
||||||
|
|
||||||
if(fromNode.block().solid && !fromNode.block().update)
|
if(!fromNode.passable())
|
||||||
return tempConnections;
|
return tempConnections;
|
||||||
|
|
||||||
for(Tile tile : fromNode.getNearby()){
|
for(Tile tile : fromNode.getNearby()){
|
||||||
if(tile != null && (!tile.block().solid || tile.block().update))
|
if(tile != null && (tile.passable()))
|
||||||
tempConnections.add(new TileConnection(fromNode, tile));
|
tempConnections.add(new TileConnection(fromNode, tile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import io.anuke.mindustry.world.blocks.Blocks;
|
|||||||
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
import io.anuke.mindustry.world.blocks.ProductionBlocks;
|
||||||
import io.anuke.ucore.core.Effects;
|
import io.anuke.ucore.core.Effects;
|
||||||
import io.anuke.ucore.entities.Entity;
|
import io.anuke.ucore.entities.Entity;
|
||||||
|
import io.anuke.ucore.util.Mathf;
|
||||||
|
|
||||||
public class TileEntity extends Entity{
|
public class TileEntity extends Entity{
|
||||||
public Tile tile;
|
public Tile tile;
|
||||||
@@ -54,6 +55,12 @@ public class TileEntity extends Entity{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
|
if(health != 0 && !tile.block().name().contains("block") &&
|
||||||
|
Mathf.chance(0.009f*delta*(1f-(float)health/maxhealth))){
|
||||||
|
|
||||||
|
Effects.effect("smoke", x+Mathf.range(4), y+Mathf.range(4));
|
||||||
|
}
|
||||||
|
|
||||||
tile.block().update(tile);
|
tile.block().update(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class LevelDialog extends Dialog{
|
|||||||
image.clicked(()->{
|
image.clicked(()->{
|
||||||
selectedMap = index;
|
selectedMap = index;
|
||||||
});
|
});
|
||||||
image.getImageCell().size(150, 150);
|
image.getImageCell().size(164);
|
||||||
content().add(image).size(180);
|
content().add(image).size(180);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class Generator{
|
|||||||
Hue.rgb(80, 110, 180), Blocks.water,
|
Hue.rgb(80, 110, 180), Blocks.water,
|
||||||
Hue.rgb(70, 90, 150), Blocks.deepwater,
|
Hue.rgb(70, 90, 150), Blocks.deepwater,
|
||||||
Hue.rgb(110, 80, 30), Blocks.dirt,
|
Hue.rgb(110, 80, 30), Blocks.dirt,
|
||||||
|
Hue.rgb(160, 120, 70), Blocks.dirtblock,
|
||||||
Hue.rgb(100, 100, 100), Blocks.stoneblock
|
Hue.rgb(100, 100, 100), Blocks.stoneblock
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@ public class Generator{
|
|||||||
core = tiles[x][y];
|
core = tiles[x][y];
|
||||||
}else if(color == spawn){
|
}else if(color == spawn){
|
||||||
spawnpoints.add(tiles[x][y]);
|
spawnpoints.add(tiles[x][y]);
|
||||||
|
floor = Blocks.dirt;
|
||||||
}else{
|
}else{
|
||||||
if(Mathf.chance(0.02)){
|
if(Mathf.chance(0.02)){
|
||||||
block = Mathf.choose(Blocks.rock, Blocks.rock2);
|
block = Mathf.choose(Blocks.rock, Blocks.rock2);
|
||||||
|
|||||||
@@ -64,6 +64,14 @@ public class Tile{
|
|||||||
this.floor = type;
|
this.floor = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean passable(){
|
||||||
|
return !(floor.solid || (block.solid && !block.update));
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean solid(){
|
||||||
|
return block.solid || floor.solid;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean breakable(){
|
public boolean breakable(){
|
||||||
return block.update || block.breakable;
|
return block.update || block.breakable;
|
||||||
}
|
}
|
||||||
|
|||||||