diff --git a/src/engine/DrawManager.java b/src/engine/DrawManager.java index 0f0fe483..12e6729c 100644 --- a/src/engine/DrawManager.java +++ b/src/engine/DrawManager.java @@ -350,20 +350,41 @@ public void drawLives2(final Screen screen, final int lives2) { public void drawItems(final Screen screen, Item[] ItemQ, final int inventory) { backBufferGraphics.setFont(fontRegular); backBufferGraphics.setColor(Color.WHITE); - backBufferGraphics.drawString(Integer.toString(inventory), 20, screen.getHeight() + 25); + backBufferGraphics.drawString("ITM: ", 100, screen.getHeight() + 25); for (int i = 0; i < inventory; i++) - drawEntity(ItemQ[i], 40 + 35 * i, screen.getHeight() + 25); + drawEntity(ItemQ[i], 140 + 25 * i, screen.getHeight() + 17); } public void drawItems2(final Screen screen, Item[] ItemQ, final int inventory) { backBufferGraphics.setFont(fontRegular); backBufferGraphics.setColor(Color.WHITE); - backBufferGraphics.drawString(Integer.toString(inventory), 120, screen.getHeight() + 25); + backBufferGraphics.drawString("ITM: ", 314, screen.getHeight() + 25); for (int i = 0; i < inventory; i++) - drawEntity(ItemQ[i], 140 + 35 * i, screen.getHeight() + 25); + drawEntity(ItemQ[i], 354 + 25 * i, screen.getHeight() + 17); } + /** + * Draws number of items currently in inventory on screen. + * + * @param magazine + * Number of remaining magazines + * @param bullet_count + * Number of bullets fired + * @param screen + * Screen to draw on. + */ + public void drawAmmo(final Screen screen, final int magazine, final int bullet_count) { + backBufferGraphics.setFont(fontRegular); + backBufferGraphics.setColor(Color.WHITE); + backBufferGraphics.drawString("BUL: " + Integer.toString(10-bullet_count) + "/" + Integer.toString(magazine), 10, screen.getHeight() + 25); + } + public void drawAmmo2(final Screen screen, final int magazine2, final int bullet_count2) { + backBufferGraphics.setFont(fontRegular); + backBufferGraphics.setColor(Color.WHITE); + backBufferGraphics.drawString("BUL: " + Integer.toString(10-bullet_count2) + "/" + Integer.toString(magazine2), 224, screen.getHeight() + 25); + } + /** * Draws a thick line from side to side of the screen. * diff --git a/src/screen/GameScreen.java b/src/screen/GameScreen.java index bc72b063..b0ce7a88 100644 --- a/src/screen/GameScreen.java +++ b/src/screen/GameScreen.java @@ -687,6 +687,15 @@ else if (this.enemyShipSpecialExplosionCooldown.checkFinished()) { private void draw() { drawManager.initDrawing(this); + if (SelectScreen.skillModeOn) { + drawManager.drawAmmo(this, this.magazine, this.bullet_count); + + if (this.gameState.getMode() == 2) { + drawManager.drawAmmo2(this, this.magazine2, this.bullet_count2); + } + } + + if (this.gameState.getMode() == 1) { if (this.lives > 0) { drawManager.drawEntity(this.ship, this.ship.getPositionX(),