Minor fix to how Common/Client Proxy handles init

This commit is contained in:
Stephen Seo 2018-10-04 12:07:26 +09:00
parent 6a8807d70a
commit 7532f2c506
2 changed files with 10 additions and 6 deletions

View file

@ -18,9 +18,8 @@ public class ClientProxy extends CommonProxy
private Battle localBattle = null; private Battle localBattle = null;
@Override @Override
public void initialize() protected void initializeClient()
{ {
super.initialize();
battleGui = new BattleGui(); battleGui = new BattleGui();
battleMusic = null; // will be initialized in postInit() battleMusic = null; // will be initialized in postInit()
battleMusicCount = 0; battleMusicCount = 0;
@ -84,9 +83,8 @@ public class ClientProxy extends CommonProxy
} }
@Override @Override
public void postInit() protected void postInitClient()
{ {
super.postInit();
battleMusic = new BattleMusic(getLogger()); battleMusic = new BattleMusic(getLogger());
} }

View file

@ -17,11 +17,14 @@ public class CommonProxy
private Config config = null; private Config config = null;
private Logger logger = null; private Logger logger = null;
public void initialize() public final void initialize()
{ {
attackerViaBow = new HashSet<AttackerViaBow>(); attackerViaBow = new HashSet<AttackerViaBow>();
initializeClient();
} }
protected void initializeClient() {}
public final boolean initializeBattleManager() public final boolean initializeBattleManager()
{ {
if(battleManager == null) if(battleManager == null)
@ -57,11 +60,14 @@ public class CommonProxy
public void battleEnded() {} public void battleEnded() {}
public void postInit() public final void postInit()
{ {
config = new Config(logger); config = new Config(logger);
postInitClient();
} }
protected void postInitClient() {}
public final void setLogger(Logger logger) public final void setLogger(Logger logger)
{ {
this.logger = logger; this.logger = logger;