optimize imports
This commit is contained in:
@@ -11,17 +11,16 @@ import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import netwerkprog.game.client.game.GAMESTATE;
|
||||
import netwerkprog.game.client.game.characters.Agent;
|
||||
import netwerkprog.game.client.game.characters.Hacker;
|
||||
import netwerkprog.game.client.game.characters.Team;
|
||||
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.Map;
|
||||
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.GameCharacter;
|
||||
import netwerkprog.game.util.graphics.FrameRate;
|
||||
@@ -109,14 +108,14 @@ public class MainGame extends ApplicationAdapter {
|
||||
}
|
||||
|
||||
public void initCharacters() {
|
||||
assets.load("core/assets/characters.png",Texture.class);
|
||||
assets.load("core/assets/characters.png", Texture.class);
|
||||
assets.finishLoading();
|
||||
Texture texture = assets.get("core/assets/characters.png");
|
||||
TextureRegion[][] characters = TextureRegion.split(texture, 32, 32);
|
||||
this.team = new Team();
|
||||
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
GameCharacter temp =new Hacker("hacker" + i, characters[5][0], new BodySwap("test"));
|
||||
GameCharacter temp = new Hacker("hacker" + i, characters[5][0], new BodySwap("test"));
|
||||
mapRenderer.getGameTiles()[1][i].visit(temp);
|
||||
if (chosenFaction == Faction.HACKER) {
|
||||
this.team.addMember(temp);
|
||||
@@ -124,7 +123,7 @@ public class MainGame extends ApplicationAdapter {
|
||||
}
|
||||
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
GameCharacter temp = new Agent("Agent" + i,characters[11][0],new BodySwap("Test"));
|
||||
GameCharacter temp = new Agent("Agent" + i, characters[11][0], new BodySwap("Test"));
|
||||
mapRenderer.getGameTiles()[3][i].visit(temp);
|
||||
if (chosenFaction == Faction.MEGACORPORATION) {
|
||||
this.team.addMember(temp);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package netwerkprog.game.client.game.characters;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import netwerkprog.game.util.game.GameCharacter;
|
||||
import netwerkprog.game.util.game.Faction;
|
||||
import netwerkprog.game.util.game.GameCharacter;
|
||||
|
||||
public class DevTest1 extends GameCharacter {
|
||||
public DevTest1() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package netwerkprog.game.client.game.characters;
|
||||
|
||||
import netwerkprog.game.util.game.GameCharacter;
|
||||
import netwerkprog.game.util.game.Faction;
|
||||
import netwerkprog.game.util.game.GameCharacter;
|
||||
|
||||
public class DevTest2 extends GameCharacter {
|
||||
public DevTest2() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package netwerkprog.game.client.game.characters;
|
||||
|
||||
import netwerkprog.game.util.game.GameCharacter;
|
||||
import netwerkprog.game.util.game.Faction;
|
||||
import netwerkprog.game.util.game.GameCharacter;
|
||||
|
||||
public class DevTest3 extends GameCharacter {
|
||||
public DevTest3() {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package netwerkprog.game.client.game.map;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 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.graphics.OrthographicCamera;
|
||||
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.glutils.ShapeRenderer;
|
||||
import com.badlogic.gdx.utils.Disposable;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import netwerkprog.game.client.MainGame;
|
||||
import netwerkprog.game.util.game.GameCharacter;
|
||||
import netwerkprog.game.util.graphics.Renderable;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
@@ -25,9 +22,6 @@ public class MapRenderer implements Renderable {
|
||||
private OrthographicCamera cam;
|
||||
private static int x = 0;
|
||||
private static int y = 0;
|
||||
private BitmapFont font;
|
||||
|
||||
private ShapeRenderer shapeRenderer;
|
||||
|
||||
private MainGame mainGame;
|
||||
private Texture square;
|
||||
@@ -57,7 +51,6 @@ public class MapRenderer implements Renderable {
|
||||
cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
|
||||
this.camera = camera;
|
||||
this.mainGame = MainGame.getInstance();
|
||||
font = new BitmapFont();
|
||||
makeTiles();
|
||||
}
|
||||
|
||||
@@ -143,7 +136,7 @@ public class MapRenderer implements Renderable {
|
||||
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) {
|
||||
List<GameTile> res = new ArrayList<GameTile>();
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
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.scenes.scene2d.Actor;
|
||||
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.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package netwerkprog.game.util.tree;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class BST<E extends Comparable<E>> extends AbstractTree<E> {
|
||||
protected TreeNode<E> root;
|
||||
protected int size = 0;
|
||||
|
||||
Reference in New Issue
Block a user