Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/effect/Effect.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/engine/BGM.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
24 changes: 8 additions & 16 deletions src/engine/DrawManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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;
Expand All @@ -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<SpriteType, boolean[][]> 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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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();
}

/**
Expand Down Expand Up @@ -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
Expand All @@ -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,
Expand Down
11 changes: 3 additions & 8 deletions src/engine/FileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
}

/**
Expand Down
9 changes: 2 additions & 7 deletions src/engine/InputManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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();
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/screen/GameScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
6 changes: 3 additions & 3 deletions src/screen/GameScreen_2P.java
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down