Added a maze map

This commit is contained in:
Anuken
2017-05-03 12:09:59 -04:00
parent 0719223146
commit ccdd23fe6c
4 changed files with 7 additions and 4 deletions

BIN
core/assets/maps/maze.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -33,7 +33,7 @@ public class Vars{
public static float breaktime = 0; 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 Pixmap[] mapPixmaps;
public static Texture[] mapTextures; public static Texture[] mapTextures;
public static int worldsize = 128; public static int worldsize = 128;

View File

@@ -9,6 +9,7 @@ import com.badlogic.gdx.utils.Array;
import io.anuke.mindustry.entities.Enemy; import io.anuke.mindustry.entities.Enemy;
import io.anuke.mindustry.world.Tile; import io.anuke.mindustry.world.Tile;
import io.anuke.ucore.core.Effects;
public class Pathfind{ public class Pathfind{
static MHueristic heuristic = new MHueristic(); static MHueristic heuristic = new MHueristic();
static PassTileGraph passgraph = new PassTileGraph(); static PassTileGraph passgraph = new PassTileGraph();
@@ -51,7 +52,7 @@ public class Pathfind{
static public void updatePath(){ static public void updatePath(){
if(paths.size == 0){ if(paths.size == 0){
pathSequences = new Tile[3][0]; pathSequences = new Tile[spawnpoints.size][0];
for(int i = 0; i < spawnpoints.size; i ++){ for(int i = 0; i < spawnpoints.size; i ++){
DefaultGraphPath<Tile> path = new DefaultGraphPath<>(); DefaultGraphPath<Tile> path = new DefaultGraphPath<>();
paths.add(path); paths.add(path);
@@ -74,11 +75,12 @@ public class Pathfind{
pathSequences[i][node] = tile; pathSequences[i][node] = tile;
} }
/*
if(debug)
for(Tile tile : path){ for(Tile tile : path){
Effects.effect("ind", tile.worldx(), tile.worldy()); Effects.effect("ind", tile.worldx(), tile.worldy());
} }
*/
} }
} }

View File

@@ -11,6 +11,7 @@ public class DesktopLauncher {
config.setTitle("Mindustry"); config.setTitle("Mindustry");
config.setMaximized(true); config.setMaximized(true);
config.useVsync(false); config.useVsync(false);
config.setWindowedMode(800, 600);
new Lwjgl3Application(new Mindustry(), config); new Lwjgl3Application(new Mindustry(), config);
} }
} }