Characters moving #9
@@ -11,17 +11,16 @@ import com.badlogic.gdx.graphics.Texture;
|
|||||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||||
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
|
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
|
||||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||||
|
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import netwerkprog.game.client.game.GAMESTATE;
|
import netwerkprog.game.client.game.GAMESTATE;
|
||||||
import netwerkprog.game.client.game.characters.Agent;
|
import netwerkprog.game.client.game.characters.Agent;
|
||||||
import netwerkprog.game.client.game.characters.Hacker;
|
import netwerkprog.game.client.game.characters.Hacker;
|
||||||
import netwerkprog.game.client.game.characters.Team;
|
import netwerkprog.game.client.game.characters.Team;
|
||||||
import netwerkprog.game.client.game.characters.abilities.BodySwap;
|
import netwerkprog.game.client.game.characters.abilities.BodySwap;
|
||||||
|
import netwerkprog.game.client.game.map.GameInputProcessor;
|
||||||
import netwerkprog.game.client.game.map.GameTile;
|
import netwerkprog.game.client.game.map.GameTile;
|
||||||
import netwerkprog.game.client.game.map.Map;
|
import netwerkprog.game.client.game.map.Map;
|
||||||
import netwerkprog.game.client.game.map.MapRenderer;
|
import netwerkprog.game.client.game.map.MapRenderer;
|
||||||
import netwerkprog.game.client.game.map.GameInputProcessor;
|
|
||||||
import netwerkprog.game.util.game.Faction;
|
import netwerkprog.game.util.game.Faction;
|
||||||
import netwerkprog.game.util.game.GameCharacter;
|
import netwerkprog.game.util.game.GameCharacter;
|
||||||
import netwerkprog.game.util.graphics.FrameRate;
|
import netwerkprog.game.util.graphics.FrameRate;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package netwerkprog.game.client.game.characters;
|
package netwerkprog.game.client.game.characters;
|
||||||
|
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import netwerkprog.game.util.game.GameCharacter;
|
|
||||||
import netwerkprog.game.util.game.Faction;
|
import netwerkprog.game.util.game.Faction;
|
||||||
|
import netwerkprog.game.util.game.GameCharacter;
|
||||||
|
|
||||||
public class DevTest1 extends GameCharacter {
|
public class DevTest1 extends GameCharacter {
|
||||||
public DevTest1() {
|
public DevTest1() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package netwerkprog.game.client.game.characters;
|
package netwerkprog.game.client.game.characters;
|
||||||
|
|
||||||
import netwerkprog.game.util.game.GameCharacter;
|
|
||||||
import netwerkprog.game.util.game.Faction;
|
import netwerkprog.game.util.game.Faction;
|
||||||
|
import netwerkprog.game.util.game.GameCharacter;
|
||||||
|
|
||||||
public class DevTest2 extends GameCharacter {
|
public class DevTest2 extends GameCharacter {
|
||||||
public DevTest2() {
|
public DevTest2() {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package netwerkprog.game.client.game.characters;
|
package netwerkprog.game.client.game.characters;
|
||||||
|
|
||||||
import netwerkprog.game.util.game.GameCharacter;
|
|
||||||
import netwerkprog.game.util.game.Faction;
|
import netwerkprog.game.util.game.Faction;
|
||||||
|
import netwerkprog.game.util.game.GameCharacter;
|
||||||
|
|
||||||
public class DevTest3 extends GameCharacter {
|
public class DevTest3 extends GameCharacter {
|
||||||
public DevTest3() {
|
public DevTest3() {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package netwerkprog.game.client.game.map;
|
package netwerkprog.game.client.game.map;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map class to hold a 2d array of tiles which will specify the map
|
* Map class to hold a 2d array of tiles which will specify the map
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,14 +3,11 @@ package netwerkprog.game.client.game.map;
|
|||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||||
import com.badlogic.gdx.graphics.Texture;
|
import com.badlogic.gdx.graphics.Texture;
|
||||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
|
||||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||||
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import com.badlogic.gdx.utils.Disposable;
|
|
||||||
import netwerkprog.game.client.MainGame;
|
import netwerkprog.game.client.MainGame;
|
||||||
import netwerkprog.game.util.game.GameCharacter;
|
import netwerkprog.game.util.game.GameCharacter;
|
||||||
import netwerkprog.game.util.graphics.Renderable;
|
import netwerkprog.game.util.graphics.Renderable;
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -25,9 +22,6 @@ public class MapRenderer implements Renderable {
|
|||||||
private OrthographicCamera cam;
|
private OrthographicCamera cam;
|
||||||
private static int x = 0;
|
private static int x = 0;
|
||||||
private static int y = 0;
|
private static int y = 0;
|
||||||
private BitmapFont font;
|
|
||||||
|
|
||||||
private ShapeRenderer shapeRenderer;
|
|
||||||
|
|
||||||
private MainGame mainGame;
|
private MainGame mainGame;
|
||||||
private Texture square;
|
private Texture square;
|
||||||
@@ -57,7 +51,6 @@ public class MapRenderer implements Renderable {
|
|||||||
cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
|
cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
|
||||||
this.camera = camera;
|
this.camera = camera;
|
||||||
this.mainGame = MainGame.getInstance();
|
this.mainGame = MainGame.getInstance();
|
||||||
font = new BitmapFont();
|
|
||||||
makeTiles();
|
makeTiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +136,7 @@ public class MapRenderer implements Renderable {
|
|||||||
y = 0;
|
y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int[][] directions = new int[][]{{-1, -1}, {-1, 0}, {-1, 1}, {0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}};
|
public static int[][] directions = new int[][]{{-1, -1}, {-1, 0}, {-1, 1}, {0, 1}, {1, 1}, {1, 0}, {1, -1}, {0, -1}};
|
||||||
|
|
||||||
public List<GameTile> setSurroundedTilesOfCurrentCharacter(int x, int y) {
|
public List<GameTile> setSurroundedTilesOfCurrentCharacter(int x, int y) {
|
||||||
List<GameTile> res = new ArrayList<GameTile>();
|
List<GameTile> res = new ArrayList<GameTile>();
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
package netwerkprog.game.util.game;
|
package netwerkprog.game.util.game;
|
||||||
|
|
||||||
|
|
||||||
import com.badlogic.gdx.graphics.Texture;
|
|
||||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||||
import netwerkprog.game.client.game.map.GameTile;
|
import netwerkprog.game.client.game.map.GameTile;
|
||||||
@@ -10,7 +8,6 @@ import netwerkprog.game.client.game.map.GameTile;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package netwerkprog.game.util.tree;
|
package netwerkprog.game.util.tree;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
public class BST<E extends Comparable<E>> extends AbstractTree<E> {
|
public class BST<E extends Comparable<E>> extends AbstractTree<E> {
|
||||||
protected TreeNode<E> root;
|
protected TreeNode<E> root;
|
||||||
protected int size = 0;
|
protected int size = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user