【踏碎凌霄】提交
parent
072b7713c2
commit
b0d0fab6d5
File diff suppressed because it is too large
Load Diff
|
@ -62,6 +62,12 @@ function this:InitComponent()
|
|||
this.dmg2Progress = Util.GetGameObject(this.dmg2, "progress/Fill"):GetComponent("Image")
|
||||
this.dmg2Text = Util.GetGameObject(this.dmg2, "progress/Text"):GetComponent("Text")
|
||||
this.bar = Util.GetGameObject(this.dmg2, "bar")
|
||||
|
||||
this.dmg3 = Util.GetGameObject(this.UpRoot, "dmg3")--踏碎凌霄的血条
|
||||
this.dmg3Progress = Util.GetGameObject(this.dmg3, "progress/Fill"):GetComponent("Image")
|
||||
this.dmg3Text = Util.GetGameObject(this.dmg3, "progress/Text"):GetComponent("Text")
|
||||
this.dmg3grid = Util.GetGameObject(this.dmg3, "grid")
|
||||
this.bar = Util.GetGameObject(this.dmg3, "bar")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -277,7 +283,6 @@ end
|
|||
|
||||
-- 初始化
|
||||
function this.InitPanelData()
|
||||
this.dmg2:SetActive((fightType == BATTLE_TYPE.XINJIANG) or (fightType == BATTLE_TYPE.TASUILINGXIAO))
|
||||
if fightType == BATTLE_TYPE.GUILD_BOSS and fightType == BATTLE_TYPE.GUILD_CAR_DELAY then
|
||||
this.myDamage = 0
|
||||
this.myDamageLevel = 0
|
||||
|
@ -290,11 +295,12 @@ function this.InitPanelData()
|
|||
this.RefreshMyDamageShow()
|
||||
end)
|
||||
end
|
||||
elseif (fightType == BATTLE_TYPE.XINJIANG) or (fightType == BATTLE_TYPE.TASUILINGXIAO) then
|
||||
elseif fightType == BATTLE_TYPE.XINJIANG then
|
||||
this.dmg2:SetActive(fightType == BATTLE_TYPE.XINJIANG)
|
||||
boxList[1]:SetActive(true)
|
||||
this.myDamage = 0
|
||||
this.myDamageLevel = 0
|
||||
this.dmg2Text.text = fightType == BATTLE_TYPE.XINJIANG and "0%" or "0"
|
||||
this.dmg2Text.text = "0%"
|
||||
this.dmg2Progress.fillAmount = 0
|
||||
this.RefreshMyDamageShow()
|
||||
local list = RoleManager.Query(function (r) return r.camp == 1 end)
|
||||
|
@ -305,6 +311,30 @@ function this.InitPanelData()
|
|||
this.RefreshMyDamageShow(list[1])
|
||||
end)
|
||||
end
|
||||
elseif fightType == BATTLE_TYPE.TASUILINGXIAO then--踏碎凌霄
|
||||
this.dmg3:SetActive(fightType == BATTLE_TYPE.TASUILINGXIAO)
|
||||
this.myDamage = 0
|
||||
this.myDamageLevel = 0
|
||||
this.dmg3Text.text = "0"
|
||||
this.dmg3Progress.fillAmount = 0
|
||||
|
||||
-- local actData = CommonActPageManager.GetData(ActivityTypeDef.TaSuiLingXiao)
|
||||
-- local boxs = ConfigManager.GetConfigDataByKey(ConfigName.NewHeroConfig,"Id",actData.activityId).BoxList
|
||||
-- for i = 1, 7 do
|
||||
-- boxList[i] = Util.GetGameObject(this.dmg2, "box"..i)
|
||||
-- boxList[i]:SetActive(false)
|
||||
-- local effect = Util.GetGameObject(boxList[i], "effect")
|
||||
-- effect:SetActive(false)
|
||||
-- end
|
||||
|
||||
this.RefreshMyDamageShow()
|
||||
local list = RoleManager.Query(function (r) return r.camp == 1 end)
|
||||
if list[1] then
|
||||
list[1].Event:AddEvent(BattleEventName.RoleBeDamaged, function (atkRole, damage, bCrit, finalDmg, damageType, dotType)
|
||||
this.myDamage = this.myDamage + damage
|
||||
this.RefreshMyDamageShow(list[1])
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
this.InitOption()
|
||||
|
@ -420,7 +450,8 @@ function this.BattleEnd(result)
|
|||
Util.GetGameObject(boxList[i], "effect"):SetActive(false)
|
||||
end
|
||||
end,1.3):Start()
|
||||
|
||||
elseif fightType == BATTLE_TYPE.TASUILINGXIAO then--踏碎凌霄
|
||||
this.ShowBattleResult(result)
|
||||
else
|
||||
-- 判断是否需要进行结果检测
|
||||
if this.fightResult then
|
||||
|
@ -726,19 +757,17 @@ function this.RefreshMyDamageShow(role)
|
|||
local boxs={}
|
||||
local newHeroConfig = ConfigManager.GetConfig(ConfigName.NewHeroConfig)
|
||||
local bossData = role.data
|
||||
local curBossHp = role.data:GetData(RoleDataName.Hp)
|
||||
-- local curBossHp = role.data:GetData(RoleDataName.Hp)
|
||||
local maxBossHp = role.data:GetData(RoleDataName.MaxHp)
|
||||
local curPercent = (maxBossHp-curBossHp)*100/maxBossHp
|
||||
curPercent = curPercent > 0.01 and curPercent or 0.01
|
||||
this.dmg2Text.text = maxBossHp-curBossHp--myDamage--string.format("%.2f",curPercent).."%"
|
||||
|
||||
local num = 0
|
||||
local actData = CommonActPageManager.GetData(ActivityTypeDef.TaSuiLingXiao)
|
||||
local boxs = ConfigManager.GetConfigDataByKey(ConfigName.NewHeroConfig,"Id",actData.activityId).ValueDropCell
|
||||
local boxs = ConfigManager.GetConfigDataByKey(ConfigName.NewHeroConfig,"Id",actData.activityId).BoxList
|
||||
this.dmg3Text.text = string.format("%s/%s",myDamage,maxBossHp)
|
||||
for i = 1, #boxs do
|
||||
local lastValue = boxs[i-1] and boxs[i-1][1] or 0
|
||||
if myDamage < boxs[i][1] then
|
||||
num = myDamage/(boxs[i][1] - lastValue)
|
||||
num = (myDamage - lastValue)/(boxs[i][1] - lastValue)
|
||||
curLevel = i
|
||||
break
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue