Added a maze map
This commit is contained in:
BIN
core/assets/maps/maze.png
Normal file
BIN
core/assets/maps/maze.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -33,7 +33,7 @@ public class Vars{
|
||||
|
||||
public static float breaktime = 0;
|
||||
|
||||
public static final String[] maps = {"delta", "canyon", "pit", "test"};
|
||||
public static final String[] maps = {"delta", "canyon", "pit", "maze"};
|
||||
public static Pixmap[] mapPixmaps;
|
||||
public static Texture[] mapTextures;
|
||||
public static int worldsize = 128;
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.badlogic.gdx.utils.Array;
|
||||
|
||||
import io.anuke.mindustry.entities.Enemy;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.ucore.core.Effects;
|
||||
public class Pathfind{
|
||||
static MHueristic heuristic = new MHueristic();
|
||||
static PassTileGraph passgraph = new PassTileGraph();
|
||||
@@ -51,7 +52,7 @@ public class Pathfind{
|
||||
|
||||
static public void updatePath(){
|
||||
if(paths.size == 0){
|
||||
pathSequences = new Tile[3][0];
|
||||
pathSequences = new Tile[spawnpoints.size][0];
|
||||
for(int i = 0; i < spawnpoints.size; i ++){
|
||||
DefaultGraphPath<Tile> path = new DefaultGraphPath<>();
|
||||
paths.add(path);
|
||||
@@ -74,11 +75,12 @@ public class Pathfind{
|
||||
pathSequences[i][node] = tile;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
if(debug)
|
||||
for(Tile tile : path){
|
||||
Effects.effect("ind", tile.worldx(), tile.worldy());
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ public class DesktopLauncher {
|
||||
config.setTitle("Mindustry");
|
||||
config.setMaximized(true);
|
||||
config.useVsync(false);
|
||||
config.setWindowedMode(800, 600);
|
||||
new Lwjgl3Application(new Mindustry(), config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user