From d1caeb341a477bb26b222ef1ef4ba3a6f29b19e3 Mon Sep 17 00:00:00 2001 From: JJTCM Date: Tue, 2 Dec 2014 13:46:38 +0100 Subject: [PATCH] Added DEBUG Code for the NUKE Fix Boss Spawn at the End of the Level --- res/levels/test.level | 2 +- src/de/teamteamteam/spacescooter/control/Keyboard.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/res/levels/test.level b/res/levels/test.level index a62365b..2d2d832 100644 --- a/res/levels/test.level +++ b/res/levels/test.level @@ -25,4 +25,4 @@ spawn:EnemyTwo,1,10,60 spawn:EnemyThree,2,4,33 spawn:EnemyTwo,5,6,10 [25-30] -spawn:EnemyBoss,1,1,100 +spawn:EnemyBoss,1,1,50 diff --git a/src/de/teamteamteam/spacescooter/control/Keyboard.java b/src/de/teamteamteam/spacescooter/control/Keyboard.java index 8fe5d1f..104a756 100644 --- a/src/de/teamteamteam/spacescooter/control/Keyboard.java +++ b/src/de/teamteamteam/spacescooter/control/Keyboard.java @@ -10,6 +10,7 @@ import de.teamteamteam.spacescooter.entity.enemy.EnemyFour; import de.teamteamteam.spacescooter.entity.enemy.EnemyOne; import de.teamteamteam.spacescooter.entity.enemy.EnemyThree; import de.teamteamteam.spacescooter.entity.enemy.EnemyTwo; +import de.teamteamteam.spacescooter.entity.item.ItemNuke; /** * This is our main control input source. @@ -102,7 +103,8 @@ public class Keyboard implements KeyListener { Keyboard.activeKeys.add((Integer) e.getKeyCode()); for(KeyboardListener kl : Keyboard.listener) kl.keyPressed(e); - //Debug Spawn Enemy on Press + //Debug Spawn Enemy on Press or Items + //TODO: Remove the Code when game is ready if(e.getKeyCode() == KeyEvent.VK_1) { new EnemyOne(400,400); } @@ -118,6 +120,9 @@ public class Keyboard implements KeyListener { points.add(new Point(10,300)); new EnemyFour(700,51,points); } + if(e.getKeyCode() == KeyEvent.VK_9) { + new ItemNuke(400,400); + } if(e.getKeyCode() == KeyEvent.VK_0) { new EnemyBoss(400,400); }