【踏碎凌霄提交】

dev_chengFeng
ZhangBiao 2021-04-25 15:07:36 +08:00
parent 6a0a230eb6
commit 39329ce5cc
8 changed files with 132 additions and 58 deletions

View File

@ -1038,8 +1038,7 @@ GameObject:
m_Component:
- component: {fileID: 2110059222035070430}
- component: {fileID: 9201846299448387506}
- component: {fileID: 7689363688026315277}
- component: {fileID: 2808879390703154998}
- component: {fileID: 4544510506658633581}
m_Layer: 5
m_Name: mask
m_TagString: Untagged
@ -1064,7 +1063,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 312.85, y: 10.65}
m_SizeDelta: {x: 160, y: 30}
m_SizeDelta: {x: 128, y: 40}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9201846299448387506
CanvasRenderer:
@ -1074,7 +1073,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1920427577835017147}
m_CullTransparentMesh: 0
--- !u!114 &7689363688026315277
--- !u!114 &4544510506658633581
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -1083,22 +1082,7 @@ MonoBehaviour:
m_GameObject: {fileID: 1920427577835017147}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_EffectColor: {r: 0.35686275, g: 0.15294118, b: 0.050980393, a: 1}
m_EffectDistance: {x: 1, y: -1}
m_UseGraphicAlpha: 1
--- !u!114 &2808879390703154998
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1920427577835017147}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ebfe0e44da74fbd44b1b744995de2324, type: 3}
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
@ -1109,21 +1093,15 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
m_FontSize: 44
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 4
m_MaxSize: 44
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u5DF2\u9886\u53D6"
LanguageIndex: 10004
m_Sprite: {fileID: 21300000, guid: 9121e10e065d4ec4aa3723174d0662c3, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &2141745900171562656
GameObject:
m_ObjectHideFlags: 0

View File

@ -2233,6 +2233,7 @@ BATTLE_TYPE = {
ARENA = 15, -- 竞技场
XINJIANG = 16, --新将来袭
XIAOYAOYOU = 18, --逍遥游战斗
TASUILINGXIAO = 19, --踏碎凌霄
BACK_BATTLE = 1000, -- 系统战斗回放
}
rankKingList={ [1] = { bgImage = "r_zjm_paihangbang_banner04_zh", name = Language[12096] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = true},

View File

@ -40,6 +40,7 @@ TASUILINGXIAOREQUEST_ACTIVITYID_FIELD = protobuf.FieldDescriptor();
TASUILINGXIAORESPONSE = protobuf.Descriptor();
TASUILINGXIAORESPONSE_FIGHTDATA_FIELD = protobuf.FieldDescriptor();
TASUILINGXIAORESPONSE_DROP_FIELD = protobuf.FieldDescriptor();
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD = protobuf.FieldDescriptor();
COMMITSHEJIACTIVITYITEMREQUEST_ITEMID_FIELD.name = "itemId"
COMMITSHEJIACTIVITYITEMREQUEST_ITEMID_FIELD.full_name = ".rpc.protocols.CommitShejiActivityItemRequest.itemId"
@ -353,11 +354,21 @@ TASUILINGXIAORESPONSE_DROP_FIELD.message_type = CommonProto_pb.DROP
TASUILINGXIAORESPONSE_DROP_FIELD.type = 11
TASUILINGXIAORESPONSE_DROP_FIELD.cpp_type = 10
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD.name = "damageVal"
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD.full_name = ".rpc.protocols.TasuilingxiaoResponse.damageVal"
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD.number = 3
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD.index = 2
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD.label = 1
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD.has_default_value = false
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD.default_value = 0
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD.type = 5
TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD.cpp_type = 1
TASUILINGXIAORESPONSE.name = "TasuilingxiaoResponse"
TASUILINGXIAORESPONSE.full_name = ".rpc.protocols.TasuilingxiaoResponse"
TASUILINGXIAORESPONSE.nested_types = {}
TASUILINGXIAORESPONSE.enum_types = {}
TASUILINGXIAORESPONSE.fields = {TASUILINGXIAORESPONSE_FIGHTDATA_FIELD, TASUILINGXIAORESPONSE_DROP_FIELD}
TASUILINGXIAORESPONSE.fields = {TASUILINGXIAORESPONSE_FIGHTDATA_FIELD, TASUILINGXIAORESPONSE_DROP_FIELD, TASUILINGXIAORESPONSE_DAMAGEVAL_FIELD}
TASUILINGXIAORESPONSE.is_extendable = false
TASUILINGXIAORESPONSE.extensions = {}

View File

@ -277,7 +277,7 @@ end
-- 初始化
function this.InitPanelData()
this.dmg2:SetActive(fightType == BATTLE_TYPE.XINJIANG)
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 +290,11 @@ function this.InitPanelData()
this.RefreshMyDamageShow()
end)
end
elseif fightType == BATTLE_TYPE.XINJIANG then
elseif (fightType == BATTLE_TYPE.XINJIANG) or (fightType == BATTLE_TYPE.TASUILINGXIAO) then
boxList[1]:SetActive(true)
this.myDamage = 0
this.myDamageLevel = 0
this.dmg2Text.text = "0%"
this.dmg2Text.text = fightType == BATTLE_TYPE.XINJIANG and "0%" or "0"
this.dmg2Progress.fillAmount = 0
this.RefreshMyDamageShow()
local list = RoleManager.Query(function (r) return r.camp == 1 end)
@ -488,6 +488,8 @@ function this.ShowBattleResult(result, msg)
UIManager.OpenPanel(UIName.BattleWinPopup, this, isBack, fightType, this.lastBattleResult)
end
end
elseif fightType == BATTLE_TYPE.TASUILINGXIAO then
this.ShowBattleResultByTaSuiLingXiao()
else
if result == 0 then -- 失败
local haveRecord = BattleRecordManager.isHaveRecord()
@ -590,6 +592,28 @@ function this.ShowBattleResultByMapFight()
end
end, 0.1):Start()
end
-- 踏碎凌霄结算界面特殊显示
function this.ShowBattleResultByTaSuiLingXiao()
-- 延时执行避免事件冲突
Timer.New(function()
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
if bestData then
-- 胜利显示本场比赛的表现最好的英雄
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
-- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup, CommonActPageManager.TaSuiLingXiaoMsg.drop, 1,function(isBackBattle)
LogPink("isBackBattle "..tostring(isBackBattle))
if not isBackBattle then
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
this:ClosePanel()
end
end, 7,true,true)
end)
end
end, 0.1):Start()
end
-- 战斗波次变化回调
function this.OnOrderChanged(order)
-- body
@ -660,7 +684,7 @@ function this.RefreshMyDamageShow(role)
this.damageProgress.transform.localScale = Vector3.New(rate, 1, 1)
elseif fightType == BATTLE_TYPE.XINJIANG and role then
elseif fightType == BATTLE_TYPE.XINJIANG and role then--新将来袭
local myDamage = this.myDamage-- *10
local curLevel = 0
local boxs={}
@ -696,7 +720,42 @@ function this.RefreshMyDamageShow(role)
Util.GetGameObject(boxList[i], "effect"):SetActive(true)
end
end
elseif fightType == BATTLE_TYPE.TASUILINGXIAO and role then--踏碎凌霄
local myDamage = this.myDamage-- *10
local curLevel = 0
local boxs={}
local newHeroConfig = ConfigManager.GetConfig(ConfigName.NewHeroConfig)
local bossData = role.data
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
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)
curLevel = i
break
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

View File

@ -1,6 +1,7 @@
CommonActPageManager = {}
local this = CommonActPageManager
local dataList = {}
this.TaSuiLingXiaoMsg = nil
function this.Initialize()
end
@ -88,10 +89,9 @@ local TypeUpdateFunc = {
for i = 1, #curData.rewards do
for j = 1, #configData do
if curData.rewards[i].missionId == configData[j].Id then
table.insert(curData.rewards[i].otherData,configData[j])
-- curData.rewards[i].otherData.Values = configData[j].Values
-- curData.rewards[i].otherData.Reward = configData[j].Reward
-- curData.rewards[i].otherData.Sort = configData[j].Sort
curData.rewards[i].otherData.Values = configData[j].Values
curData.rewards[i].otherData.Reward = configData[j].Reward
curData.rewards[i].otherData.Sort = configData[j].Sort
end
end
end

View File

@ -124,7 +124,6 @@ end
--func 回调
function RewardItemPopup:OnOpen(...)
--LogGreen("isBackBattle = false")
isBackBattle = false
isPlayerAniEnd = true
isOpenGeiSSRAvtivity = 0
@ -148,7 +147,7 @@ function RewardItemPopup:OnOpen(...)
this.btnBattleBack:SetActive(haveRecord and args[5] and BattleManager.GetLastBattleType() ~= BATTLE_TYPE.MAP_FIGHT and not GuideManager.IsInMainGuide() and not MapManager.Mapping)
this.btnResultMax:SetActive(haveRecord and args[5])
this.expeditionGo:SetActive(compShowType == 5)
this.guildDeathPos:SetActive(compShowType == 4)
this.guildDeathPos:SetActive((compShowType == 4) or (compShowType == 7))--十绝阵和踏碎凌霄
this.guildTranscript:SetActive(compShowType == 6)
this.guildCarDelay:SetActive(compShowType == 3)
-- 设置背景遮罩的显隐
@ -156,7 +155,7 @@ function RewardItemPopup:OnOpen(...)
this.btnBack:GetComponent("Image").color = Color.New(0, 0, 0, isHideBG and 0 or 0.8)
this.btnGoOn:SetActive(not isHideBG)
if not drop then
if compShowType == 3 and not drop then
this.GuildCarDelayShow()
this.guildCarDelay:SetActive(compShowType == 3)
for i = 1, #itemListPrefab do
@ -170,6 +169,15 @@ function RewardItemPopup:OnOpen(...)
if compShowType == 6 then
this.GuildTranscriptShow()
end
if compShowType == 7 then--踏碎凌霄
this.TaSuiLingXiaoShow()
if #drop.itemlist < 1 then
for i = 1, #itemListPrefab do
itemListPrefab[i].gameObject:SetActive(false)
end
return
end
end
local starItemDataList=BagManager.GetItemListFromTempBag(drop)
-- LogError("获取宝物的数量:".. LengthOfTable(starItemDataList))
--做装备叠加特殊组拼数据
@ -245,6 +253,24 @@ function this.GuildDeathPosShow()
end
end
end
--踏碎凌霄 挑战奖励掉落弹窗表现
function this.TaSuiLingXiaoShow()
if CommonActPageManager.TaSuiLingXiaoMsg then
local curDmg = CommonActPageManager.TaSuiLingXiaoMsg.damageVal
local maxDmg = CommonActPageManager.GetData(ActivityTypeDef.TaSuiLingXiao).value
this.guildDeathPos_CurScore.text = curDmg
this.guildDeathPos_MaxScore.text = maxDmg
local b = curDmg > maxDmg or curDmg < maxDmg
this.guildDeathPos_State.gameObject:SetActive(b)
this.guildDeathPos:GetComponent("RectTransform").localPosition = Vector3.zero
if curDmg > maxDmg then
this.guildDeathPos_State.sprite=Util.LoadSprite("r_hero_zhanlishangsheng_png")
elseif curDmg < maxDmg then
this.guildDeathPos_State.sprite=Util.LoadSprite("r_hero_zhanlixiajiang_png")
end
end
end
--公会副本
function this.GuildTranscriptShow()
if GuildTranscriptManager.damage then

View File

@ -16,8 +16,8 @@ function TrialRewardPopup:InitComponent()
this.scroll=Util.GetGameObject(this.panel,"Scroll")
pres[1]=Util.GetGameObject(this.panel,"Scroll/Pre")
pres[2]=Util.GetGameObject(this.panel,"Scroll/Pre3")
scrollView=SubUIManager.Open(SubUIConfig.ScrollCycleView,this.scroll.transform,pres[MonsterCampManager.preType], nil,
pres[4]=Util.GetGameObject(this.panel,"Scroll/Pre4")
scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView,this.scroll.transform,pres[MonsterCampManager.preType], nil,
Vector2.New(this.scroll.transform.rect.width,this.scroll.transform.rect.height),1,1,Vector2.New(0,5))
scrollView.gameObject:GetComponent("RectTransform").anchoredPosition= Vector2.New(0,0)
scrollView.gameObject:GetComponent("RectTransform").anchorMin = Vector2.New(0.5, 0.5)
@ -153,11 +153,11 @@ function this.SetScrollPre(root,data)
end
--设置每条数据
function this.SetScrollPre(root,data)
function this.SetScrollPre2(root,data)
local info=Util.GetGameObject(root,"Title/Info"):GetComponent("Text")
local grid=Util.GetGameObject(root,"Grid")
local mask=Util.GetGameObject(root,"mask")
info.text=data.info
info.text = string.format("单场战斗伤害到达%s",data.otherData.Values[1][1])
if not itemList[root] then
itemList[root] = {}
@ -170,7 +170,7 @@ function this.SetScrollPre(root,data)
itemList[root][i] = SubUIManager.Open(SubUIConfig.ItemView,grid.transform)
itemList[root][i].gameObject:SetActive(false)
end
itemList[root][i]:OnOpen(false, data.BoxReward[i], 0.9,false,false,false,sortingOrder)
itemList[root][i]:OnOpen(false, data.otherData.Reward[i], 0.9,false,false,false,sortingOrder)
itemList[root][i].gameObject:SetActive(true)
end
mask:SetActive(true)

View File

@ -29,11 +29,10 @@ function TaSuiLingXiao:BindEvent()
Util.AddClick(self.btnFight,function()
--开始战斗
NetManager.TasuilingxiaoRequest(self.actData.activityId,function(msg)
CommonActPageManager.TaSuiLingXiaoMsg = msg
local fightData = BattleManager.GetBattleServerData(msg,0)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.XINJIANG,function ()
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1,function ()
self:Refresh()
end)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.TASUILINGXIAO,function ()
self:Refresh()
end)
end)
end)
@ -41,7 +40,8 @@ function TaSuiLingXiao:BindEvent()
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.SAVE_FORMATION)
end)
Util.AddClick(self.btnReward, function()
UIManager.OpenPanel(UIName.TrialRewardPopup,self.actData.otherData,nil,4)
MonsterCampManager.preType = 4
UIManager.OpenPanel(UIName.TrialRewardPopup,self.actData.rewards,nil,4)
end)
Util.AddClick(self.btnBack, function()
self:ClosePanel()
@ -115,7 +115,6 @@ function TaSuiLingXiao:ShowSkillList()
ForceRebuildLayout(self.scrollItem.transform)
local curSkillData = {}
curSkillData.skillConfig = skillData
LogPink(self.itemList[i].gameObject:GetComponent("RectTransform").localPosition.y)
local pos = Vector2.New(0,self.itemList[i].gameObject:GetComponent("RectTransform").localPosition.y + self.scrollItem:GetComponent("RectTransform").localPosition.y)
Util.AddOnceClick(self.itemList[i], function()
local maxLv= HeroManager.GetHeroSkillMaxLevel(self.configData.HeroId,skillData.Type)