diff --git a/lua/app/common/audio_manager.lua b/lua/app/common/audio_manager.lua index ef6800a7..96b41397 100644 --- a/lua/app/common/audio_manager.lua +++ b/lua/app/common/audio_manager.lua @@ -6,7 +6,8 @@ local MAX_EFFECT_NUM = 30 local AUDIO_CLIP = typeof(CS.UnityEngine.AudioClip) AudioManager.BGM_ID = { - MAINCITY = "assets/arts/sounds/music/bgm_main.wav", + MAINCITY = "assets/arts/sounds/music/main_city.wav", + BATTLE = "assets/arts/sounds/music/battle.wav", } AudioManager.CLICK_ID = { diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 7fa5ee57..afe3fb78 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -361,7 +361,6 @@ function BattleController:enterNextWave() if self.waveIndex == 1 then -- 第一波 self:generateBoard(true) end - self.defTeam:prepare() self:enterRoundBegin() self.isBossWave = self.defTeam:getMainUnit().unitEntity:getIsBoss() @@ -902,11 +901,28 @@ function BattleController:generateInstructions(skillEntity, elementType, lineCou ---- 技能 if skillEntity then - table.insert(self.instructions, { - name = BattleConst.INSTRUCTION_NAME.PLAY_SKILL, - skillMatch = elementType, - count = elementTypeCount, - }) + if elementType == skillEntity:getMatchType() then + table.insert(self.instructions, { + name = BattleConst.INSTRUCTION_NAME.PLAY_SKILL, + skillMatch = elementType, + count = elementTypeCount, + }) + else + if skillEntity:getSkillEffectType() ~= nil then + table.insert(self.instructions, { + name = BattleConst.INSTRUCTION_NAME.PLAY_SKILL, + skillMatch = skillEntity:getPosition(), + count = 0, + }) + end + if elementTypeCount > 0 then + table.insert(self.instructions, { + name = BattleConst.INSTRUCTION_NAME.GENERAL_ATTACK, + skillMatch = elementType, + count = elementTypeCount, + }) + end + end else ---- 普攻 if elementTypeCount > 0 then diff --git a/lua/app/ui/battle/battle_ui.lua b/lua/app/ui/battle/battle_ui.lua index a1862f39..b2ee218a 100644 --- a/lua/app/ui/battle/battle_ui.lua +++ b/lua/app/ui/battle/battle_ui.lua @@ -10,7 +10,6 @@ local BOARD_POS_UP = BF.Vector2(0, 47) local BOARD_POS_DOWN = BF.Vector2(0, -740) local BG_PATH = "assets/arts/textures/background/battle/%s.png" local CacheVector2 = CS.UnityEngine.Vector2(0, 0) -local CacheVector3 = CS.UnityEngine.Vector3(0, 0, 0) function BattleUI:getPrefabPath() return "assets/prefabs/ui/battle/battle_ui.prefab" @@ -20,6 +19,10 @@ function BattleUI:onClose() self:clear() end +function BattleUI:getBGMId() + return AudioManager.BGM_ID.BATTLE +end + function BattleUI:onLoadRootComplete() self:_display() self:_addListeners() @@ -1192,6 +1195,12 @@ function BattleUI:clear() if self.battleNode then self.battleNode:removeAllChildren() end + if self.fxNode then + self.fxNode:removeAllChildren() + end + if self.battleNumberNode then + self.battleNumberNode:removeAllChildren() + end if self.hpProgressYellowLeftSid then self:unscheduleGlobal(self.hpProgressYellowLeftSid) self.hpProgressYellowLeftSid = nil @@ -1224,9 +1233,6 @@ function BattleUI:clear() self.shakeTween:Kill() self.shakeTween = nil end - if self.battleNumberNode then - self.battleNumberNode:removeAllChildren() - end end return BattleUI \ No newline at end of file diff --git a/lua/app/ui/main_city/main_city_ui.lua b/lua/app/ui/main_city/main_city_ui.lua index 264cd8a3..35bbed94 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -21,6 +21,10 @@ function MainCityUI:getUIType() return UIManager.UI_TYPE.MAIN end +function MainCityUI:getBGMId() + return AudioManager.BGM_ID.MAINCITY +end + function MainCityUI:getCurrencyParams() if self.currencyParams == nil then self.currencyParams = { diff --git a/lua/app/userdata/battle/skill/battle_board_skill_entity.lua b/lua/app/userdata/battle/skill/battle_board_skill_entity.lua index 97faaf66..502be130 100644 --- a/lua/app/userdata/battle/skill/battle_board_skill_entity.lua +++ b/lua/app/userdata/battle/skill/battle_board_skill_entity.lua @@ -81,6 +81,13 @@ function BattleBoardSkillEntity:getSkillTypeParameter() return self.config.skill_type_parameter end +function BattleBoardSkillEntity:getSkillEffectType() + if not self.config then + return nil + end + return self.config.effect_type +end + function BattleBoardSkillEntity:getBoardRange() if not self.config or not self.config.boardrange then return