【踏碎凌霄】
parent
b0d0fab6d5
commit
31b9eb3057
|
@ -152238,7 +152238,6 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5510259970768181577}
|
||||
- component: {fileID: 5557887828650331500}
|
||||
m_Layer: 5
|
||||
m_Name: bar
|
||||
m_TagString: Untagged
|
||||
|
@ -152260,34 +152259,11 @@ RectTransform:
|
|||
m_Father: {fileID: 5251286333026968868}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0.5}
|
||||
m_AnchorMax: {x: 1, y: 0.5}
|
||||
m_AnchoredPosition: {x: -79.75012, y: -290.99997}
|
||||
m_SizeDelta: {x: 100, y: 500}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -14.700012, y: -866.4}
|
||||
m_SizeDelta: {x: 868.5, y: 305.2}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5557887828650331500
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4546522920489809414}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 1
|
||||
m_Spacing: 50
|
||||
m_ChildForceExpandWidth: 0
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 0
|
||||
m_ChildControlHeight: 0
|
||||
--- !u!1 &4556669536885542883
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -8,12 +8,14 @@ BattlePanel = Inherit(BasePanel)
|
|||
local this = BattlePanel
|
||||
local battleTimeScaleKey = "battleTimeScaleKey"
|
||||
|
||||
local ArtResourcesConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||
local timeCount
|
||||
local endFunc
|
||||
local isBack = false --是否为战斗回放
|
||||
local fightType -- 1关卡 2副本 3限时怪, 5兽潮, 6新关卡, 7公会boss
|
||||
local orginLayer
|
||||
local boxList={}--新将来袭奖励盒子
|
||||
local boxList2={}--踏碎凌霄奖励盒子
|
||||
|
||||
-- 显示跳过战斗使用
|
||||
local hadCounted = 0
|
||||
|
@ -67,7 +69,8 @@ function this:InitComponent()
|
|||
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")
|
||||
this.bar3 = Util.GetGameObject(this.dmg3, "bar")
|
||||
this.boxpre = Util.GetGameObject(this.dmg3, "boxpre")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
@ -312,20 +315,32 @@ function this.InitPanelData()
|
|||
end)
|
||||
end
|
||||
elseif fightType == BATTLE_TYPE.TASUILINGXIAO then--踏碎凌霄
|
||||
boxList2={}
|
||||
local actData = CommonActPageManager.GetData(ActivityTypeDef.TaSuiLingXiao)
|
||||
local boxs = ConfigManager.GetConfigDataByKey(ConfigName.NewHeroConfig,"Id",actData.activityId).BoxList
|
||||
local maxDmg = actData.value
|
||||
this.dmg3:SetActive(fightType == BATTLE_TYPE.TASUILINGXIAO)
|
||||
this.myDamage = 0
|
||||
this.myDamageLevel = 0
|
||||
this.dmg3Text.text = "0"
|
||||
this.dmg3Text.text = string.format("0/%s",boxs[1][1])
|
||||
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
|
||||
for i = 1, #actData.rewards do
|
||||
local index = #boxList2 + 1
|
||||
if actData.rewards[i].state == 0 then
|
||||
boxList2[index] = {}
|
||||
boxList2[index].obj = newObject(this.boxpre)
|
||||
boxList2[index].obj.transform:SetParent(this.dmg3grid.transform)
|
||||
boxList2[index].obj.transform.localScale = Vector3.one
|
||||
boxList2[index].obj.transform.localPosition = Vector3.zero
|
||||
boxList2[index].moved = false
|
||||
boxList2[index].obj:SetActive(false)
|
||||
Util.GetGameObject(boxList2[index].obj,"iconRoot/icon"):GetComponent("Image").sprite = Util.LoadSprite(ArtResourcesConfig[boxs[i][2]].Name)
|
||||
end
|
||||
end
|
||||
if #boxList2 > 0 then
|
||||
boxList2[1].obj:SetActive(true)
|
||||
end
|
||||
|
||||
this.RefreshMyDamageShow()
|
||||
local list = RoleManager.Query(function (r) return r.camp == 1 end)
|
||||
|
@ -760,31 +775,50 @@ function this.RefreshMyDamageShow(role)
|
|||
-- local curBossHp = role.data:GetData(RoleDataName.Hp)
|
||||
local maxBossHp = role.data:GetData(RoleDataName.MaxHp)
|
||||
|
||||
local num = 0
|
||||
local num1,num2 = 0,0
|
||||
local actData = CommonActPageManager.GetData(ActivityTypeDef.TaSuiLingXiao)
|
||||
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 - lastValue)/(boxs[i][1] - lastValue)
|
||||
num1 = myDamage - lastValue
|
||||
num2 = boxs[i][1] - lastValue
|
||||
curLevel = i
|
||||
break
|
||||
else
|
||||
num1 = boxs[i][1] - lastValue
|
||||
num2 = boxs[i][1] - lastValue
|
||||
end
|
||||
end
|
||||
this.dmg3Text.text = string.format("%s/%s",num1,num2)
|
||||
this.dmg3Progress.fillAmount = num1/num2
|
||||
|
||||
local list = {}
|
||||
for i = 1, #boxs do
|
||||
-- LogBlue("TaSuiLingXiaoHistoryDmg:"..tostring(CommonActPageManager.TaSuiLingXiaoHistoryDmg))
|
||||
if CommonActPageManager.TaSuiLingXiaoHistoryDmg < boxs[i][1] then
|
||||
table.insert(list,boxs[i])
|
||||
end
|
||||
end
|
||||
-- LogGreen("#list:"..tostring(#list))
|
||||
if #list > 0 then
|
||||
for i = 1, #list do
|
||||
-- LogYellow("myDamage:"..tostring(myDamage).." list[i][1]:"..tostring(list[i][1]))
|
||||
if myDamage >= list[i][1] then
|
||||
if boxList2[i+1] then
|
||||
boxList2[i+1].obj:SetActive(true)
|
||||
end
|
||||
-- LogPink("not boxList2[i].moved:"..tostring(boxList2[i].moved))
|
||||
if not boxList2[i].moved then
|
||||
boxList2[i].obj.transform:SetParent(this.bar3.transform)
|
||||
boxList2[i].obj.transform:DOLocalMove(Vector3.New(math.random(-400, 400),math.random(-100, 100),0), 1.5)
|
||||
boxList2[i].moved = true
|
||||
Util.GetGameObject(boxList2[i].obj, "effect"):SetActive(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
this.dmg2Progress.fillAmount = num
|
||||
|
||||
-- for i = 1, #boxs do
|
||||
-- if curPercent >= (boxs[i][1]/boxs[#boxs][1])*100 then
|
||||
-- if boxList[i+1] then
|
||||
-- boxList[i+1]:SetActive(true)
|
||||
-- end
|
||||
-- boxList[i].transform:SetParent(this.bar.transform)
|
||||
-- local t = i%5 == 0 and 5 or i%5
|
||||
-- boxList[i].transform:DOLocalMove(Vector3.New(math.floor(i/6)*-120,-329+t*100,0), 1.5)
|
||||
-- Util.GetGameObject(boxList[i], "effect"):SetActive(true)
|
||||
-- end
|
||||
-- end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -806,6 +840,9 @@ function this:OnClose()
|
|||
end
|
||||
--检测是否需要弹每日任务飘窗
|
||||
TaskManager.RefreshShowDailyMissionTipPanel()
|
||||
for i = 1, #boxList2 do
|
||||
destroy(boxList2[i].obj)
|
||||
end
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
|
|
|
@ -2,6 +2,7 @@ CommonActPageManager = {}
|
|||
local this = CommonActPageManager
|
||||
local dataList = {}
|
||||
this.TaSuiLingXiaoMsg = nil
|
||||
this.TaSuiLingXiaoHistoryDmg = 0
|
||||
|
||||
function this.Initialize()
|
||||
end
|
||||
|
|
|
@ -70,6 +70,7 @@ end
|
|||
|
||||
function TaSuiLingXiao:Refresh()
|
||||
self.actData = CommonActPageManager.GetData(ActivityTypeDef.TaSuiLingXiao)
|
||||
CommonActPageManager.TaSuiLingXiaoHistoryDmg = self.actData.value
|
||||
TaSuiLingXiao:ShowLive()
|
||||
TaSuiLingXiao:SetTime()
|
||||
TaSuiLingXiao:ShowSkillList()
|
||||
|
|
Loading…
Reference in New Issue