Merge branch 'dev' of http://git.juzugame.com/b6-client/b6-lua into dev
This commit is contained in:
commit
ac9bea5776
@ -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 = {
|
||||
|
||||
@ -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
|
||||
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
|
||||
|
||||
@ -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
|
||||
@ -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 = {
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user