mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Legger til manglende kommentar for konstruktør
This commit is contained in:
parent
88102327a0
commit
136235d86b
@ -37,6 +37,10 @@ public class BoardActiveScreen extends AbstractScreen implements InputProcessor
|
|||||||
private final int viewPortHeight = 12 * tileDimensions;
|
private final int viewPortHeight = 12 * tileDimensions;
|
||||||
private final Viewport viewport;
|
private final Viewport viewport;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new board active screen
|
||||||
|
* @param roboRallyWrapper The Robo Rally wrapper which is parent of this screen
|
||||||
|
*/
|
||||||
public BoardActiveScreen(final RoboRallyWrapper roboRallyWrapper) {
|
public BoardActiveScreen(final RoboRallyWrapper roboRallyWrapper) {
|
||||||
this.roboRallyWrapper = roboRallyWrapper;
|
this.roboRallyWrapper = roboRallyWrapper;
|
||||||
|
|
||||||
|
@ -46,8 +46,8 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
|
|||||||
private final Stage stage;
|
private final Stage stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes a new card choice screen
|
* Instantiates a new card choice screen
|
||||||
* @param roboRallyWrapper The robo rally wrapper which is its parent
|
* @param roboRallyWrapper The Robo Rally wrapper which is parent of this screen
|
||||||
*/
|
*/
|
||||||
public CardChoiceScreen(final RoboRallyWrapper roboRallyWrapper) {
|
public CardChoiceScreen(final RoboRallyWrapper roboRallyWrapper) {
|
||||||
this.roboRallyWrapper = roboRallyWrapper;
|
this.roboRallyWrapper = roboRallyWrapper;
|
||||||
@ -243,9 +243,14 @@ public class CardChoiceScreen extends InputAdapter implements Screen {
|
|||||||
*/
|
*/
|
||||||
class CardRectangle {
|
class CardRectangle {
|
||||||
final Rectangle rectangle;
|
final Rectangle rectangle;
|
||||||
boolean selected = false;
|
|
||||||
final ProgrammingCard card;
|
final ProgrammingCard card;
|
||||||
|
boolean selected = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new card rectangle
|
||||||
|
* @param rectangle The rectangle of this card rectangle
|
||||||
|
* @param card The card of this card rectangle
|
||||||
|
*/
|
||||||
CardRectangle(Rectangle rectangle, ProgrammingCard card) {
|
CardRectangle(Rectangle rectangle, ProgrammingCard card) {
|
||||||
this.rectangle = rectangle;
|
this.rectangle = rectangle;
|
||||||
this.card = card;
|
this.card = card;
|
||||||
|
@ -17,6 +17,9 @@ import inf112.fiasko.roborally.utility.IOUtil;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This screen allows the host to wait for players to join
|
||||||
|
*/
|
||||||
public class LobbyScreen extends AbstractScreen {
|
public class LobbyScreen extends AbstractScreen {
|
||||||
private final RoboRallyWrapper roboRallyWrapper;
|
private final RoboRallyWrapper roboRallyWrapper;
|
||||||
|
|
||||||
@ -24,6 +27,10 @@ public class LobbyScreen extends AbstractScreen {
|
|||||||
private final Viewport viewport;
|
private final Viewport viewport;
|
||||||
private final Stage stage;
|
private final Stage stage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new lobby screen
|
||||||
|
* @param roboRallyWrapper The Robo Rally wrapper which is parent of this screen
|
||||||
|
*/
|
||||||
public LobbyScreen(final RoboRallyWrapper roboRallyWrapper) {
|
public LobbyScreen(final RoboRallyWrapper roboRallyWrapper) {
|
||||||
camera = new OrthographicCamera();
|
camera = new OrthographicCamera();
|
||||||
viewport = new FitViewport(applicationWidth, applicationHeight, camera);
|
viewport = new FitViewport(applicationWidth, applicationHeight, camera);
|
||||||
@ -56,6 +63,10 @@ public class LobbyScreen extends AbstractScreen {
|
|||||||
roboRallyWrapper.batch.setProjectionMatrix(camera.combined);
|
roboRallyWrapper.batch.setProjectionMatrix(camera.combined);
|
||||||
|
|
||||||
roboRallyWrapper.batch.begin();
|
roboRallyWrapper.batch.begin();
|
||||||
|
roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Joined players: " +
|
||||||
|
roboRallyWrapper.server.getPlayerNames().values().toString(),
|
||||||
|
applicationWidth / 2f - 380 / 2f,applicationHeight / 2f + 350,380, 1,
|
||||||
|
true);
|
||||||
roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Click the button to start game",
|
roboRallyWrapper.font.draw(roboRallyWrapper.batch, "Click the button to start game",
|
||||||
applicationWidth / 2f - 380 / 2f,applicationHeight / 2f + 100,380, 1,
|
applicationWidth / 2f - 380 / 2f,applicationHeight / 2f + 100,380, 1,
|
||||||
true);
|
true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user