override public void init() { base.init(); mMap = new CTileMap(); CGame.inst().setMap(mMap); setState(CLevelState.IN_PROGRESS); //mBackground = new CBackground(); //mBackground.setXY(0, 0); mOverworldPlayer = new COverWorldPlayer(); mOverworldPlayer.setXY(CGameConstants.SCREEN_WIDTH / 2, CGameConstants.SCREEN_HEIGHT / 2); mOverworldPlayer.setXY(300, 300); mOverworldNPC = new COverWorldNPC(); mOverworldNPC.setXY(CGameConstants.SCREEN_WIDTH - 100, CGameConstants.SCREEN_HEIGHT / 2); mOverworldNPC.setXY(500, 300); /*CGame.inst().setPlayer(mPlayer);*/ mBackgroundFloor = new CBackgroundFloor(); mBackgroundFloor.setXY(0, 0); mBackgroundFloor.setSortingLayerName("Background"); DialogManager.init(); }
override public void destroy() { base.destroy(); DialogManager.destroy(); mMap.destroy(); mMap = null; mBackgroundFloor.destroy(); mBackgroundFloor = null; mOverworldPlayer.destroy(); mOverworldPlayer = null; mOverworldNPC.destroy(); mOverworldNPC = null; }