Skip to content
Snippets Groups Projects
Commit 7f71bc1c authored by Leonard's avatar Leonard
Browse files

added more things

parent 970fe04e
No related branches found
No related tags found
No related merge requests found
Showing
with 568 additions and 73 deletions
......@@ -9,7 +9,6 @@ public class Server {
* Start the server
*/
public static void main(String[] args) {
}
/**
......
......@@ -3,31 +3,53 @@ package com.galaxytrucker.galaxytruckerreloaded;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
public class Main extends Game {
SpriteBatch batch;
Texture img;
@Override
public void create () {
batch = new SpriteBatch();
img = new Texture("badlogic.jpg");
}
@Override
public void render () {
Gdx.gl.glClearColor(1, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
batch.draw(img, 0, 0);
batch.end();
}
@Override
public void dispose () {
batch.dispose();
img.dispose();
}
/**
* Sprite batch
*/
private SpriteBatch batch;
/**
* Orthographic camera
*/
private OrthographicCamera camera;
@Override
public void create() {
this.batch = new SpriteBatch();
this.camera = new OrthographicCamera();
}
@Override
public void render() {
Gdx.gl.glClearColor(1, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
}
@Override
public void dispose() {
}
/**
* Get the sprite batch
*
* @return the sprite batch
*/
public SpriteBatch getBatch() {
return this.batch;
}
/**
* Get the orthographic camera
*
* @return the orthographic camera
*/
public OrthographicCamera getCamera() {
return this.camera;
}
}
......@@ -7,6 +7,8 @@ import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.galaxytrucker.galaxytruckerreloaded.Main;
import com.galaxytrucker.galaxytruckerreloaded.View.UI.Map.MapUI;
import com.sun.tools.jdi.Packet;
/**
* Main game screen
......@@ -28,11 +30,6 @@ public class GamePlay implements Screen {
*/
private Texture background;
/**
* Main class for spriteBatch
*/
private Main mainClass;
/**
* Looping music
*/
......@@ -43,6 +40,16 @@ public class GamePlay implements Screen {
*/
private Sound clickSound;
/**
* MultiPlayer active
*/
private boolean multiPlayer;
/**
* Current map
*/
private MapUI gameMap;
@Override
public void show() {
......@@ -89,7 +96,22 @@ public class GamePlay implements Screen {
/**
* Constructor
*
* @param main - main class
*/
public GamePlay(Main main) {
}
/**
* Send data to server
*/
private void sendData(Packet data) {
}
/**
* Receive data from server
*/
private Packet receiveData() {
return null;
}
}
......@@ -41,9 +41,9 @@ public class LoginScreen implements Screen {
private ImageButton loginButton;
/**
* Main class for spriteBatch
* Login button texture
*/
private Main mainClass;
private Texture loginButtonTexture;
/**
* Looping music track
......@@ -90,6 +90,11 @@ public class LoginScreen implements Screen {
}
/** Constructor */
public LoginScreen(Main main){}
/**
* Constructor
*
* @param main - main class
*/
public LoginScreen(Main main) {
}
}
......@@ -32,22 +32,22 @@ public class MainMenu implements Screen {
/**
* SinglePlayer button
*/
private ImageButton singleplayerButton;
private ImageButton singlePlayerButton;
/**
* SinglePlayer button texture
*/
private Texture singleplayerButtonTexture;
private Texture singlePlayerButtonTexture;
/**
* MultiPlayer button
*/
private ImageButton multiplayerButton;
private ImageButton multiPlayerButton;
/**
* MultiPlayer button texture
*/
private Texture multiplayerButtonTexture;
private Texture multiPlayerButtonTexture;
/**
* Options button
......@@ -69,11 +69,6 @@ public class MainMenu implements Screen {
*/
private ImageButton quitButtonTexture;
/**
* Main class for accessing SpriteBatch
*/
private Main mainClass;
/**
* Looping music track
*/
......@@ -119,6 +114,7 @@ public class MainMenu implements Screen {
}
/** Constructor */
/** Constructor
* @param main - main class */
public MainMenu(Main main){}
}
package com.galaxytrucker.galaxytruckerreloaded.View.Screen;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.galaxytrucker.galaxytruckerreloaded.Main;
/**
* Pause menu screen
*/
public class PauseMenu implements Screen {
/**
* Sptire batch
*/
private SpriteBatch batch;
/**
* Orthographic camera
*/
private OrthographicCamera camera;
/**
* Game paused texture
*/
private Texture pausedTexture;
@Override
public void show() {
}
@Override
public void render(float delta) {
}
@Override
public void resize(int width, int height) {
}
@Override
public void pause() {
}
@Override
public void resume() {
}
@Override
public void hide() {
}
@Override
public void dispose() {
}
/** Constructor
* @param main - main class */
public PauseMenu(Main main) {
}
}
......@@ -73,6 +73,7 @@ public class ShipSelector implements Screen {
}
/** Constructor */
/** Constructor
* @param main - main class */
public ShipSelector(Main main){}
}
package com.galaxytrucker.galaxytruckerreloaded.View.UI.Events;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.galaxytrucker.galaxytruckerreloaded.Main;
public class GameOver {
/**
* Game over texture
*/
private Texture gameOverTexture;
/**
* Main menu button
*/
private ImageButton mainMenuButton;
/**
* Main menu button texture
*/
private Texture mainMenuButtonTexture;
/**
* Setup called after initialisation
*/
private void setup() {
}
/**
* show the ui
*/
public void showGameOverUI() {
}
/**
* hide the ui
*/
public void hideGameOverUI() {
}
/**
* Dispose of the ui
*/
public void disposeGameoverUI() {
}
/**
* Constructor
*
* @param main - main class
*/
public GameOver(Main main) {
}
}
package com.galaxytrucker.galaxytruckerreloaded.View.UI.Inventory;
import com.galaxytrucker.galaxytruckerreloaded.Main;
public class InventorySlot {
/** Constructor */
public InventorySlot(Main main){}
}
package com.galaxytrucker.galaxytruckerreloaded.View.UI.Inventory;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.galaxytrucker.galaxytruckerreloaded.Main;
public class InventorySlotUI {
/**
* Sprite batch for rendering
*/
private SpriteBatch batch;
/**
* Orthographic camera
*/
private OrthographicCamera camera;
/**
* Inventory slot position x
*/
private float posX;
/**
* Inventory slot position y
*/
private float posY;
/**
* Inventory slot background
*/
private Texture inventorySlotTexture;
/**
* Setup called after initialisation
*/
private void setup() {
}
/**
* show the ui
*/
public void showInventorySlotUI() {
}
/**
* Hide inventory slot ui
*/
public void hideInventorySlotUI() {
}
/**
* Dispose inventory slot ui
*/
public void disposeInventorySlotUI() {
}
/**
* Constructor
*
* @param main - main class
*/
public InventorySlotUI(Main main) {
}
}
package com.galaxytrucker.galaxytruckerreloaded.View.UI.Inventory;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.badlogic.gdx.scenes.scene2d.ui.List;
import com.galaxytrucker.galaxytruckerreloaded.Main;
public class InventoryUI {
/**
* Sprite batch
*/
private SpriteBatch batch;
/**
* Orthographic camera
*/
private OrthographicCamera camera;
/**
* Inventory background texture
*/
private Texture inventoryBackground;
/**
* Inventory slots
*/
private List<InventorySlotUI> slots;
/**
* Close inventory button
*/
private ImageButton closeInventoryButton;
/**
* Close inventory button texture
*/
private Texture closeInventoryButtonTexture;
/**
* setup called after initialisation
*/
private void setup() {
}
/**
* show the inventory
*/
public void showInventoryUI() {
}
/**
* hide the inventory
*/
public void hideInventoryUI() {
}
/**
* Dispose of inventory
*/
public void disposeInventoryUI() {
}
/**
* Constructor
*
* @param main - main class
*/
public InventoryUI(Main main) {
}
}
package com.galaxytrucker.galaxytruckerreloaded.View.UI;
import com.galaxytrucker.galaxytruckerreloaded.Main;
public class InventoryUI {
/** Constructor */
public InventoryUI(Main main){}
}
package com.galaxytrucker.galaxytruckerreloaded.View.UI.Map;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.galaxytrucker.galaxytruckerreloaded.Main;
public class MapUI {
/**
* Sprite batch
*/
private SpriteBatch batch;
/**
* Map texture
*/
private Texture mapTexture;
/**
* Setup called after initialisation
*/
private void setup() {
}
/**
* show the ui
*/
public void showMapUI() {
}
/**
* hide the ui
*/
public void hideMapUI() {
}
/**
* Dispose of ui
*/
public void disposeMapUI() {
}
/**
* Constructor
*
* @param main - main class
*/
public MapUI(Main main) {
}
}
......@@ -21,6 +21,11 @@ public class OptionsUI {
*/
private OrthographicCamera camera;
/**
* Options ui background
*/
private Texture optionsBackgroundTexture;
/**
* Continue button
*/
......@@ -51,11 +56,6 @@ public class OptionsUI {
*/
private Texture quitButtonTexture;
/**
* Main class for sprite batch
*/
private Main mainClass;
/**
* Setup called after initialisation
*/
......@@ -65,17 +65,25 @@ public class OptionsUI {
/**
* Open the options menu
*/
public void openOptions() {
public void showOptionsUI() {
}
/**
* Close the options menu
*/
public void closeOptions() {
public void hideOptionsUI() {
}
/**
* Dispose of options ui
*/
public void disposeOptionsUI() {
}
/**
* Constructor
*
* @param main - main class
*/
public OptionsUI(Main main) {
setup();
......
package com.galaxytrucker.galaxytruckerreloaded.View.UI.ShipInformation;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.ui.List;
......@@ -16,17 +17,48 @@ public class HullUI {
private SpriteBatch batch;
/**
* Textures
* Orthographic camera
*/
private OrthographicCamera camera;
/**
* HullUI background texture
*/
private Texture HullBackgroundTexture;
/**
* Change amount of hull integrity based on hp
*/
private List<Texture> hullTextures;
/**
* Main class for sprite batch
* setup called after initialisation
*/
private void setup() {
}
/**
* show ui
*/
private Main mainClass;
public void showHullUI() {
}
/**
* hide ui
*/
public void hideHullUI() {
}
/**
* dispose
*/
public void disposeHullUI() {
}
/**
* Constructor
*
* @param main - main class
*/
public HullUI(Main main) {
}
......
package com.galaxytrucker.galaxytruckerreloaded.View.UI.ShipInformation;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.galaxytrucker.galaxytruckerreloaded.Main;
public class ScrapUI {
/**
* Sprite batch
*/
private SpriteBatch batch;
/**
* Orthographic Camera
*/
private OrthographicCamera camera;
/**
* Scrap UI background
*/
private Texture scrapBackground;
/**
* setup called after initialisation
*/
private void setup() {
}
/**
* show the ui
*/
public void showScrapUI() {
}
/**
* hide the ui
*/
public void hideScrapUI() {
}
/**
* Dispose of ui
*/
public void disposeScrapUI() {
}
/**
* Constructor
*
* @param main - main class used for sprite batch and camera
*/
public ScrapUI(Main main) {
}
}
package com.galaxytrucker.galaxytruckerreloaded.View.UI.ShipInformation;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.ui.List;
import com.galaxytrucker.galaxytruckerreloaded.Main;
public class ShieldUI {
/**
* Sprite batch
*/
private SpriteBatch batch;
/** Orthographic camera */
private OrthographicCamera camera;
/**
* Shield screen background texture
*/
private Texture background;
/**
* Shield textures
*/
private List<Texture> shieldTextures;
/**
* Setup called after initialisation
*/
private void setup() {
}
/**
* Show shield ui
*/
public void showShieldUI() {
}
/**
* hide the shield ui
*/
public void hideShieldUI() {
}
/**
* Dispose of shield ui
*/
public void disposeShieldUI() {
}
/**
* Constructor
*
* @param main - the main class
*/
public ShieldUI(Main main) {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment