diff --git a/src/effect/Effect.java b/src/effect/Effect.java index 1d911cec..da788809 100644 --- a/src/effect/Effect.java +++ b/src/effect/Effect.java @@ -7,15 +7,15 @@ public class Effect { /** Cooltime in tripleshot */ - protected Cooldown tripleshotEffectCooldown; + protected final Cooldown tripleshotEffectCooldown; /** Cooltime in buffSplashEffect */ - static protected Cooldown buffSplashEffectCooldown; + protected final Cooldown buffSplashEffectCooldown; /** Cooltime in attakSpeedEffect*/ - protected Cooldown attackSpeedEffectCooldown; + protected final Cooldown attackSpeedEffectCooldown; /** Cooltime in DebuffEffectCooldown */ - protected Cooldown DebuffEffectCooldown; + protected final Cooldown DebuffEffectCooldown; /** Cooltime in debuffSturnEffect*/ - protected Cooldown debuffSturnEffect; + protected final Cooldown debuffSturnEffect; /** boolean in shieldState**/ protected boolean shieldState = false; /** boolean in bomb diff --git a/src/engine/BGM.java b/src/engine/BGM.java index 7a73a6b6..8c25989c 100644 --- a/src/engine/BGM.java +++ b/src/engine/BGM.java @@ -5,11 +5,11 @@ public class BGM { /** Add variable of bgmClip - OutGame*/ - static Clip OutGame_bgmCLip; + private Clip OutGame_bgmCLip; /** Add variable of bgmClip - inGame*/ - static Clip InGame_bgmCLip; + private Clip InGame_bgmCLip; /** Add variable of bgmClip - enemy Ship*/ - static Clip enemyShipSpecialbgmCLip; + private Clip enemyShipSpecialbgmCLip; /** Add variable of original volume*/ private float originalVolume; diff --git a/src/engine/DrawManager.java b/src/engine/DrawManager.java index e7b3c55d..1847ec66 100644 --- a/src/engine/DrawManager.java +++ b/src/engine/DrawManager.java @@ -46,9 +46,6 @@ * */ public final class DrawManager { - - /** Singleton instance of the class. */ - private static DrawManager instance; /** Current frame. */ private static Frame frame; /** FileManager instance. */ @@ -75,7 +72,6 @@ public final class DrawManager { /** Big sized font properties. */ private static FontMetrics fontBigMetrics; - private static Font fontVeryBig; public Cooldown endTimer = new Cooldown(3000); public long ghostTImer; public int ghostPostionX; @@ -92,15 +88,12 @@ public final class DrawManager { private Cooldown bgTimer_init = new Cooldown(3000); // For white fade in at game start private Cooldown bgTimer_lines = new Cooldown(100); // For bg line animation private int lineConstant = 0; // For bg line animation - private Coin coin; /** Sprite types mapped to their images. */ private static Map spriteMap; private boolean initialSound = true; public boolean initialSound2 = true; private boolean isAfterLoading = false; - - private CountUpTimer timer; public int timercount = 0; public String rewardTypeString; public GameScreen gamescreen; @@ -347,7 +340,6 @@ else if (Trash_enemyA == 1){ fontRegular = fileManager.loadFont(14f); fontBig = fileManager.loadFont(24f); fontBig_2p = fileManager.loadFont(20f); - fontVeryBig = fileManager.loadFont(40f); logger.info("Finished loading the fonts."); } catch (IOException e) { @@ -369,9 +361,7 @@ public void stopTimer(CountUpTimer timer) { * @return Shared instance of DrawManager. */ protected static DrawManager getInstance() { - if (instance == null) - instance = new DrawManager(); - return instance; + return new DrawManager(); } /** @@ -2377,10 +2367,10 @@ public void drawEnhanceSprite(final Screen screen, * Screen to draw on. * @param option * Option selected. - * @param valEnhanceArea - * Current Value of Enhanced Area Range. - * @param valEnhanceDamage - * Current Value of Enhanced Damage. + * @param numEnhanceArea + * Current Value of Enhanced Area Range. //수정 필요 + * @param numEnhanceDamage + * Current Value of Enhanced Damage. //수정 필요 * @param lvEnhanceArea * Current Level of Enhanced Area Range. * @param lvEnhanceDamage @@ -2391,8 +2381,10 @@ public void drawEnhanceSprite(final Screen screen, * Value to be added of Attack Damage. * @param requiredNumEnhanceAttackStone * Required Number of Enhance Attack Stone. + * @param requiredNumEnhanceAreaStone + * Required Number of Enhance Attack Stone. //수정 필요 */ - public void drawEnhanceMenu(final Screen screen, final int option, + public void drawEnhanceMenu(final Screen screen, final int option, final int numEnhanceArea, final int numEnhanceDamage, final int lvEnhanceArea, final int lvEnhanceDamage, final int attackDamage, final int addedValAttackDamage, diff --git a/src/engine/FileManager.java b/src/engine/FileManager.java index 48021bfc..57464f2e 100644 --- a/src/engine/FileManager.java +++ b/src/engine/FileManager.java @@ -30,11 +30,8 @@ * */ public final class FileManager { - - /** Singleton instance of the class. */ - private static FileManager instance; /** Application logger. */ - private static Logger logger; + private Logger logger; /** Max number of high scores. */ private static final int MAX_SCORES = 7; @@ -50,10 +47,8 @@ private FileManager() { * * @return Shared instance of FileManager. */ - protected static FileManager getInstance() { - if (instance == null) - instance = new FileManager(); - return instance; + protected static final FileManager getInstance() { + return new FileManager(); } /** diff --git a/src/engine/InputManager.java b/src/engine/InputManager.java index 20845c7a..80d9920d 100644 --- a/src/engine/InputManager.java +++ b/src/engine/InputManager.java @@ -16,8 +16,6 @@ public final class InputManager implements KeyListener { /** Array with the jeys marked as pressed or not. */ private static boolean[] keys; private static boolean[] keyPressedOnce; - /** Singleton instance of the class. */ - private static InputManager instance; /** * Private constructor. @@ -32,11 +30,8 @@ private InputManager() { * * @return Shared instance of InputManager. */ - protected static InputManager getInstance() { - if (instance == null) { - instance = new InputManager(); - } - return instance; + public static InputManager getInstance() { + return new InputManager(); } /** diff --git a/src/screen/GameScreen.java b/src/screen/GameScreen.java index 473c48d1..72ef6f59 100644 --- a/src/screen/GameScreen.java +++ b/src/screen/GameScreen.java @@ -55,11 +55,11 @@ public class GameScreen extends Screen { /** Minimum time between bonus ship's appearances. */ private static final int BONUS_SHIP_EXPLOSION = 1500; /** Maximum variance in the time between laser's appearances. */ - private static int LASER_INTERVAL = 5000; + private int LASER_INTERVAL = 5000; /** Maximum variance in the time between Laser's appearances. */ - private static int LASER_VARIANCE = 1000; + private int LASER_VARIANCE = 1000; /** Maximum variance in the time between Laser's appearances. */ - private static int LASER_LOAD = 2000; + private int LASER_LOAD = 2000; /** Time until laser disappears. */ private static final int LASER_ACTIVATE = 1000; /** Time from finishing the level to screen change. */ diff --git a/src/screen/GameScreen_2P.java b/src/screen/GameScreen_2P.java index 185293c8..f9ae4a8b 100644 --- a/src/screen/GameScreen_2P.java +++ b/src/screen/GameScreen_2P.java @@ -29,11 +29,11 @@ public class GameScreen_2P extends Screen { /** Time until bonus ship explosion disappears. */ private static final int BONUS_SHIP_EXPLOSION = 500; /** Maximum variance in the time between laser's appearances. */ - private static int LASER_INTERVAL = 5000; + private int LASER_INTERVAL = 5000; /** Maximum variance in the time between Laser's appearances. */ - private static int LASER_VARIANCE = 1000; + private int LASER_VARIANCE = 1000; /** Maximum variance in the time between Laser's appearances. */ - private static int LASER_LOAD = 2000; + private int LASER_LOAD = 2000; /** Time until laser disappears. */ private static final int LASER_ACTIVATE = 1000; /** Time from finishing the level to screen change. */