Merge branch 'china/dev' into 0功能/命格
# Conflicts: # Assets/ManagedResources/~Lua/Data/UIData.luadev_chengFeng
commit
be16abf79a
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b31d31f5f43a097469b2772dabc937bd
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -58436,6 +58436,10 @@ MonoBehaviour:
|
||||||
extension: .prefab
|
extension: .prefab
|
||||||
resPathIndex: 695
|
resPathIndex: 695
|
||||||
resAbNameIndex: 3150
|
resAbNameIndex: 3150
|
||||||
|
- resName: ArenaTrialPanel
|
||||||
|
extension: .prefab
|
||||||
|
resPathIndex: 696
|
||||||
|
resAbNameIndex: 3151
|
||||||
- resName: FightLevelChapterPanel
|
- resName: FightLevelChapterPanel
|
||||||
extension: .prefab
|
extension: .prefab
|
||||||
resPathIndex: 696
|
resPathIndex: 696
|
||||||
|
|
|
@ -1372,6 +1372,7 @@ ActivityTypeDef = {
|
||||||
ContinueGift = 85, -- 连续礼包
|
ContinueGift = 85, -- 连续礼包
|
||||||
ContinuePackage = 87, -- 连购礼包
|
ContinuePackage = 87, -- 连购礼包
|
||||||
Incarnation = 86,--抽卡变身卡
|
Incarnation = 86,--抽卡变身卡
|
||||||
|
jingjishilian = 88,
|
||||||
}
|
}
|
||||||
--活动结束需要处理面板关闭类型
|
--活动结束需要处理面板关闭类型
|
||||||
ActivityTypePanel = {
|
ActivityTypePanel = {
|
||||||
|
@ -1830,6 +1831,7 @@ HELP_TYPE = {
|
||||||
tailsmainSoul = 117,
|
tailsmainSoul = 117,
|
||||||
Incarnation = 118,
|
Incarnation = 118,
|
||||||
LingMaiMiJing = 116,--灵脉秘境
|
LingMaiMiJing = 116,--灵脉秘境
|
||||||
|
jingjishilian = 122,
|
||||||
}
|
}
|
||||||
|
|
||||||
NumToComplexFont = {
|
NumToComplexFont = {
|
||||||
|
|
|
@ -436,6 +436,7 @@ UIName = {
|
||||||
ContinuePackagePanel = 442, -- 连购礼包new
|
ContinuePackagePanel = 442, -- 连购礼包new
|
||||||
GemPanel = 443, --命格界面
|
GemPanel = 443, --命格界面
|
||||||
RewardGemSingleShowPopup = 444,--命石信息界面
|
RewardGemSingleShowPopup = 444,--命石信息界面
|
||||||
|
ArenaTrialPanel = 445,
|
||||||
}
|
}
|
||||||
|
|
||||||
SubUIConfig = {
|
SubUIConfig = {
|
||||||
|
|
|
@ -5684,6 +5684,7 @@ local passivityList = {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if skill and skill.owner==role and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra) and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
if skill and skill.owner==role and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra) and target:IsDead() and not BattleUtil.CheckIsNoDead(target) then
|
||||||
|
BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime,function()
|
||||||
local dmg= floor(BattleUtil.ErrorCorrection((damage-finalDmg)*f1))
|
local dmg= floor(BattleUtil.ErrorCorrection((damage-finalDmg)*f1))
|
||||||
local list = RoleManager.Query(function(v) return v.camp ~= role.camp end)
|
local list = RoleManager.Query(function(v) return v.camp ~= role.camp end)
|
||||||
list = BattleUtil.SortByHpFactor(list,0)
|
list = BattleUtil.SortByHpFactor(list,0)
|
||||||
|
@ -5692,6 +5693,9 @@ local passivityList = {
|
||||||
if not point then
|
if not point then
|
||||||
point=list[1]
|
point=list[1]
|
||||||
end
|
end
|
||||||
|
if point==nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
BattleUtil.FinalDamage(nil,role,point,dmg)
|
BattleUtil.FinalDamage(nil,role,point,dmg)
|
||||||
if curNum>=maxNum then
|
if curNum>=maxNum then
|
||||||
return
|
return
|
||||||
|
@ -5701,6 +5705,7 @@ local passivityList = {
|
||||||
curNum=curNum+num
|
curNum=curNum+num
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role)
|
role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role)
|
||||||
|
@ -10163,6 +10168,7 @@ local passivityList = {
|
||||||
end
|
end
|
||||||
|
|
||||||
role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffStart,nil,nil,role)
|
role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffStart,nil,nil,role)
|
||||||
end
|
end,
|
||||||
|
|
||||||
}
|
}
|
||||||
return passivityList
|
return passivityList
|
|
@ -27,6 +27,9 @@ end
|
||||||
-- 记录承受伤害
|
-- 记录承受伤害
|
||||||
function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect)
|
function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect)
|
||||||
if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) and atkRole.camp~=self.target.camp then
|
if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) and atkRole.camp~=self.target.camp then
|
||||||
|
if self.changePro==nil then
|
||||||
|
self.changePro=0.1
|
||||||
|
end
|
||||||
self.recordDamage=self.recordDamage+math.floor(damage*self.changePro)
|
self.recordDamage=self.recordDamage+math.floor(damage*self.changePro)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -65,6 +68,9 @@ function NoDead:OnEnd()
|
||||||
self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self)
|
self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self)
|
||||||
end
|
end
|
||||||
--self.target.Event
|
--self.target.Event
|
||||||
|
if self.pro==nil then
|
||||||
|
self.pro=0
|
||||||
|
end
|
||||||
local isRand=BattleUtil.RandomAction(self.pro,function()
|
local isRand=BattleUtil.RandomAction(self.pro,function()
|
||||||
RoleManager.RemoveDeadRole(self.target)
|
RoleManager.RemoveDeadRole(self.target)
|
||||||
self.target.isDead=false
|
self.target.isDead=false
|
||||||
|
|
|
@ -56,7 +56,7 @@ function SkillSetView:Show(camp, pos, BattleView)
|
||||||
self.rt.text = self.roleView.SkillCaster.actionTime*1000
|
self.rt.text = self.roleView.SkillCaster.actionTime*1000
|
||||||
self.rt2.text = self.roleView.SkillCaster.soundTime*1000
|
self.rt2.text = self.roleView.SkillCaster.soundTime*1000
|
||||||
|
|
||||||
local nCId = BattleManager.GetCombatIdBySkin(nSkillId, 0)
|
local nCId = BattleManager.GetCombatIdBySkin(nSkillId, self.role.roleData.skinId)
|
||||||
local nCombat = BattleManager.GetSkillCombat(nCId)
|
local nCombat = BattleManager.GetSkillCombat(nCId)
|
||||||
self.nt1.text = nCombat.BeforeEffectDelay
|
self.nt1.text = nCombat.BeforeEffectDelay
|
||||||
self.nt2.text = nCombat.KeyFrame
|
self.nt2.text = nCombat.KeyFrame
|
||||||
|
@ -65,7 +65,7 @@ function SkillSetView:Show(camp, pos, BattleView)
|
||||||
self.nt5.text = nCombat.SkillDuration
|
self.nt5.text = nCombat.SkillDuration
|
||||||
self.nt6.text = nCombat.SkillNumber
|
self.nt6.text = nCombat.SkillNumber
|
||||||
|
|
||||||
local sCId = BattleManager.GetCombatIdBySkin(sSkillId, 0)
|
local sCId = BattleManager.GetCombatIdBySkin(sSkillId, self.role.roleData.skinId)
|
||||||
local sCombat = BattleManager.GetSkillCombat(sCId)
|
local sCombat = BattleManager.GetSkillCombat(sCId)
|
||||||
self.st1.text = sCombat.BeforeEffectDelay
|
self.st1.text = sCombat.BeforeEffectDelay
|
||||||
self.st2.text = sCombat.KeyFrame
|
self.st2.text = sCombat.KeyFrame
|
||||||
|
@ -85,7 +85,7 @@ function SkillSetView:ApplyData()
|
||||||
self.roleView.SkillCaster.actionTime = (tonumber(self.rt.text)or 0)/1000
|
self.roleView.SkillCaster.actionTime = (tonumber(self.rt.text)or 0)/1000
|
||||||
self.roleView.SkillCaster.soundTime = (tonumber(self.rt2.text)or 0)/1000
|
self.roleView.SkillCaster.soundTime = (tonumber(self.rt2.text)or 0)/1000
|
||||||
|
|
||||||
local ncId = BattleManager.GetCombatIdBySkin(nSkillId, 0)
|
local ncId = BattleManager.GetCombatIdBySkin(nSkillId, self.role.roleData.skinId)
|
||||||
local nCombat = BattleManager.GetSkillCombat(ncId)
|
local nCombat = BattleManager.GetSkillCombat(ncId)
|
||||||
local nBeforeEffectDelay = tonumber(self.nt1.text) or 0
|
local nBeforeEffectDelay = tonumber(self.nt1.text) or 0
|
||||||
local nKeyFrame = tonumber(self.nt2.text) or 0
|
local nKeyFrame = tonumber(self.nt2.text) or 0
|
||||||
|
@ -98,13 +98,11 @@ function SkillSetView:ApplyData()
|
||||||
nCombat.BeforeEffectDelay = nBeforeEffectDelay
|
nCombat.BeforeEffectDelay = nBeforeEffectDelay
|
||||||
nCombat.DamageDelay = nDamageDelay
|
nCombat.DamageDelay = nDamageDelay
|
||||||
BattleManager.SetSkillCombat(ncId, nCombat)
|
BattleManager.SetSkillCombat(ncId, nCombat)
|
||||||
for i=2, #self.role.skill do
|
|
||||||
self.role.skill[2] = nKeyFrame/1000
|
self.role.skill[2] = nKeyFrame/1000
|
||||||
self.role.skill[3] = nSkillDuration/1000
|
self.role.skill[3] = nSkillDuration/1000
|
||||||
self.role.skill[4] = nSkillNumber
|
self.role.skill[4] = nSkillNumber
|
||||||
end
|
|
||||||
|
|
||||||
local scId = BattleManager.GetCombatIdBySkin(sSkillId, 0)
|
local scId = BattleManager.GetCombatIdBySkin(sSkillId, self.role.roleData.skinId)
|
||||||
local sCombat = BattleManager.GetSkillCombat(scId)
|
local sCombat = BattleManager.GetSkillCombat(scId)
|
||||||
local sBeforeEffectDelay = tonumber(self.st1.text) or 0
|
local sBeforeEffectDelay = tonumber(self.st1.text) or 0
|
||||||
local sKeyFrame = tonumber(self.st2.text) or 0
|
local sKeyFrame = tonumber(self.st2.text) or 0
|
||||||
|
@ -117,11 +115,9 @@ function SkillSetView:ApplyData()
|
||||||
sCombat.BeforeEffectDelay = sBeforeEffectDelay
|
sCombat.BeforeEffectDelay = sBeforeEffectDelay
|
||||||
sCombat.DamageDelay = sDamageDelay
|
sCombat.DamageDelay = sDamageDelay
|
||||||
BattleManager.SetSkillCombat(scId, sCombat)
|
BattleManager.SetSkillCombat(scId, sCombat)
|
||||||
for i=2, #self.role.superSkill do
|
|
||||||
self.role.superSkill[2] = sKeyFrame/1000
|
self.role.superSkill[2] = sKeyFrame/1000
|
||||||
self.role.superSkill[3] = sSkillDuration/1000
|
self.role.superSkill[3] = sSkillDuration/1000
|
||||||
self.role.superSkill[4] = sSkillNumber
|
self.role.superSkill[4] = sSkillNumber
|
||||||
end
|
|
||||||
|
|
||||||
PopupTipPanel.ShowTip(Language[10212])
|
PopupTipPanel.ShowTip(Language[10212])
|
||||||
end
|
end
|
||||||
|
|
|
@ -141,7 +141,7 @@ function EnemyView:onCreate(go, role, position, root, isBoss,enemyId)
|
||||||
self.rageSlider.fillAmount = self.role.Rage / 4
|
self.rageSlider.fillAmount = self.role.Rage / 4
|
||||||
self.rageText.gameObject:SetActive(false)
|
self.rageText.gameObject:SetActive(false)
|
||||||
self.rageText.text = ""
|
self.rageText.text = ""
|
||||||
|
self.currAniName="idle"
|
||||||
-- 伤害文字显示
|
-- 伤害文字显示
|
||||||
self.LastBuffFloatingTime = Time.realtimeSinceStartup
|
self.LastBuffFloatingTime = Time.realtimeSinceStartup
|
||||||
self.BuffFloatingCount = 0
|
self.BuffFloatingCount = 0
|
||||||
|
@ -362,18 +362,23 @@ function EnemyView:SetHighLight(isLight, eScale, dur, func)
|
||||||
end), ec, dur):SetEase(Ease.Linear)
|
end), ec, dur):SetEase(Ease.Linear)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- 播放动画
|
-- 播放动画
|
||||||
function EnemyView:PlaySpineAnim(gog, time, name, isLoop)
|
function EnemyView:PlaySpineAnim(gog, time, name, isLoop)
|
||||||
|
|
||||||
if isLoop then
|
if isLoop then
|
||||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||||
|
self.currAniName=name
|
||||||
else
|
else
|
||||||
local _complete = nil
|
local _complete = nil
|
||||||
_complete = function(state)
|
_complete = function(state)
|
||||||
gog.AnimationState.Complete = gog.AnimationState.Complete - _complete
|
gog.AnimationState.Complete = gog.AnimationState.Complete - _complete
|
||||||
gog.AnimationState:SetAnimation(0, "idle", true)
|
gog.AnimationState:SetAnimation(0, "idle", true)
|
||||||
|
self.currAniName="idle"
|
||||||
end
|
end
|
||||||
gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题)
|
gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题)
|
||||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||||
|
self.currAniName=name
|
||||||
gog.AnimationState.Complete = gog.AnimationState.Complete + _complete
|
gog.AnimationState.Complete = gog.AnimationState.Complete + _complete
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -536,6 +541,7 @@ function EnemyView:DOHitEffect(time, func)
|
||||||
if not time or time < 0.3 then
|
if not time or time < 0.3 then
|
||||||
time = 0.3
|
time = 0.3
|
||||||
end
|
end
|
||||||
|
if self.currAniName~="idle" and self.currAniName~="hit" then
|
||||||
-- 受击放大1.2倍
|
-- 受击放大1.2倍
|
||||||
self:DoScale(1.2, 0.1)
|
self:DoScale(1.2, 0.1)
|
||||||
-- 卡面变红
|
-- 卡面变红
|
||||||
|
@ -552,6 +558,13 @@ function EnemyView:DOHitEffect(time, func)
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
else
|
||||||
|
-- 回调
|
||||||
|
if func then
|
||||||
|
func()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -172,6 +172,7 @@ function PlayerView:onCreate(go, role, position, root)
|
||||||
else
|
else
|
||||||
self.lvHpObj:GetComponent("RectTransform").anchoredPosition=Vector3.New(0,0,0)
|
self.lvHpObj:GetComponent("RectTransform").anchoredPosition=Vector3.New(0,0,0)
|
||||||
end
|
end
|
||||||
|
self.currAniName=""
|
||||||
-- 伤害文字显示
|
-- 伤害文字显示
|
||||||
self.LastBuffFloatingTime = Time.realtimeSinceStartup
|
self.LastBuffFloatingTime = Time.realtimeSinceStartup
|
||||||
self.BuffFloatingCount = 0
|
self.BuffFloatingCount = 0
|
||||||
|
@ -384,16 +385,20 @@ function PlayerView:SetHighLight(isLight, eScale, dur, func)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 播放动画
|
-- 播放动画
|
||||||
|
|
||||||
function PlayerView:PlaySpineAnim(gog, time, name, isLoop)
|
function PlayerView:PlaySpineAnim(gog, time, name, isLoop)
|
||||||
if isLoop then
|
if isLoop then
|
||||||
|
self.currAniName=name
|
||||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||||
else
|
else
|
||||||
local _complete = nil
|
local _complete = nil
|
||||||
_complete = function(state)
|
_complete = function(state)
|
||||||
gog.AnimationState.Complete = gog.AnimationState.Complete - _complete
|
gog.AnimationState.Complete = gog.AnimationState.Complete - _complete
|
||||||
|
self.currAniName="idle"
|
||||||
gog.AnimationState:SetAnimation(0, "idle", true)
|
gog.AnimationState:SetAnimation(0, "idle", true)
|
||||||
end
|
end
|
||||||
gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题)
|
gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题)
|
||||||
|
self.currAniName=name
|
||||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||||
gog.AnimationState.Complete = gog.AnimationState.Complete + _complete
|
gog.AnimationState.Complete = gog.AnimationState.Complete + _complete
|
||||||
end
|
end
|
||||||
|
@ -443,8 +448,8 @@ function PlayerView:OnSkillEnd()
|
||||||
--local cardRenderMat = self.liveRender.material
|
--local cardRenderMat = self.liveRender.material
|
||||||
--cardRenderMat:SetInt("_IsMask", 1)
|
--cardRenderMat:SetInt("_IsMask", 1)
|
||||||
-- 动画播放就停止
|
-- 动画播放就停止
|
||||||
if self.rlgTween2 then self.rlgTween2:Kill() end
|
--if self.rlgTween2 then self.rlgTween2:Kill() end
|
||||||
if self.rlgTween3 then self.rlgTween3:Kill() end
|
--if self.rlgTween3 then self.rlgTween3:Kill() end
|
||||||
--self.RoleLiveParnet.transform.localScale = Vector3.one --Vector2.New(self.offset[1], self.offset[2])
|
--self.RoleLiveParnet.transform.localScale = Vector3.one --Vector2.New(self.offset[1], self.offset[2])
|
||||||
--self.RoleLiveParnet.transform.localPosition = Vector3(0, 0, 0)
|
--self.RoleLiveParnet.transform.localPosition = Vector3(0, 0, 0)
|
||||||
--self.liveRender.transform.anchoredPosition = Vector2.zero--Vector2.New(self.offset[1], self.offset[2])
|
--self.liveRender.transform.anchoredPosition = Vector2.zero--Vector2.New(self.offset[1], self.offset[2])
|
||||||
|
@ -595,6 +600,7 @@ function PlayerView:DOHitEffect(time, func)
|
||||||
if not time or time < 0.3 then
|
if not time or time < 0.3 then
|
||||||
time = 0.3
|
time = 0.3
|
||||||
end
|
end
|
||||||
|
if self.currAniName~="idle" and self.currAniName~="hit" then
|
||||||
-- 受击放大1.2倍
|
-- 受击放大1.2倍
|
||||||
self:DoScale(1.2, 0.1)
|
self:DoScale(1.2, 0.1)
|
||||||
-- 卡面变红
|
-- 卡面变红
|
||||||
|
@ -624,6 +630,12 @@ function PlayerView:DOHitEffect(time, func)
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
else
|
||||||
|
if func then
|
||||||
|
func()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -944,6 +944,7 @@ local OpenSeverWelfareRewardShow = {
|
||||||
[19] = {image1 = "r_guanka_guankajianglishenfu",image2 = "r_guanka_guankajiangli02_zh"},
|
[19] = {image1 = "r_guanka_guankajianglishenfu",image2 = "r_guanka_guankajiangli02_zh"},
|
||||||
[81128] = {image1 = "r_guanka_guankajianglibaoxiang",image2 = "r_guanka_guankajiangli03_zh"},
|
[81128] = {image1 = "r_guanka_guankajianglibaoxiang",image2 = "r_guanka_guankajiangli03_zh"},
|
||||||
[11023] = {image1 = "r_guanka_guankajianglishunwukong",image2 = "r_guanka_guankajiangli04_zh"},
|
[11023] = {image1 = "r_guanka_guankajianglishunwukong",image2 = "r_guanka_guankajiangli04_zh"},
|
||||||
|
[87] = {image1 = "r_Material_Mineral_0003",image2 = ""},
|
||||||
}
|
}
|
||||||
function this.UpdateOpenSeverWelfare()
|
function this.UpdateOpenSeverWelfare()
|
||||||
local mainLevelConfig = ConfigManager.GetConfig(ConfigName.MainLevelConfig)
|
local mainLevelConfig = ConfigManager.GetConfig(ConfigName.MainLevelConfig)
|
||||||
|
@ -965,9 +966,18 @@ function this.UpdateOpenSeverWelfare()
|
||||||
end
|
end
|
||||||
this.btnOpenSeverWelfare:SetActive(isShowBtn)
|
this.btnOpenSeverWelfare:SetActive(isShowBtn)
|
||||||
if not curMissionConfig then return end
|
if not curMissionConfig then return end
|
||||||
|
-- 奖励图
|
||||||
this.OpenSeverWelfareicon.sprite = this.spLoader:LoadSprite(OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image1)
|
this.OpenSeverWelfareicon.sprite = this.spLoader:LoadSprite(OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image1)
|
||||||
this.OpenSeverWelfareiconText.sprite = this.spLoader:LoadSprite(OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image2)
|
|
||||||
this.OpenSeverWelfareicon:SetNativeSize()
|
this.OpenSeverWelfareicon:SetNativeSize()
|
||||||
|
-- 文字
|
||||||
|
local imgName2 = OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image2
|
||||||
|
if imgName2 and imgName2 ~= "" then
|
||||||
|
this.OpenSeverWelfareiconText.sprite = this.spLoader:LoadSprite(imgName2)
|
||||||
|
this.OpenSeverWelfareiconText.gameObject:SetActive(true)
|
||||||
|
else
|
||||||
|
this.OpenSeverWelfareiconText.gameObject:SetActive(false)
|
||||||
|
end
|
||||||
|
--
|
||||||
local curPassLevelSortId = FightPointPassManager.lastPassFightId ~= FightPointPassManager.curOpenFight and mainLevelConfig[FightPointPassManager.lastPassFightId].SortId or 0
|
local curPassLevelSortId = FightPointPassManager.lastPassFightId ~= FightPointPassManager.curOpenFight and mainLevelConfig[FightPointPassManager.lastPassFightId].SortId or 0
|
||||||
local getRewardLevelSortId = mainLevelConfig[curMissionConfig.Values[1][1]].SortId
|
local getRewardLevelSortId = mainLevelConfig[curMissionConfig.Values[1][1]].SortId
|
||||||
this.OpenSeverWelfareRed:SetActive(curPassLevelSortId >= getRewardLevelSortId)
|
this.OpenSeverWelfareRed:SetActive(curPassLevelSortId >= getRewardLevelSortId)
|
||||||
|
|
|
@ -0,0 +1,195 @@
|
||||||
|
require("Base/BasePanel")
|
||||||
|
local ArenaTrialPanel = Inherit(BasePanel)
|
||||||
|
|
||||||
|
--初始化组件(用于子类重写)
|
||||||
|
function ArenaTrialPanel:InitComponent()
|
||||||
|
self.spLoader = SpriteLoader.New()
|
||||||
|
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform)
|
||||||
|
self.btnBack = Util.GetGameObject(self.gameObject,"bg/BackBtn")
|
||||||
|
self.liveRoot = Util.GetGameObject(self.gameObject,"bg/ren")
|
||||||
|
self.helpBtn = Util.GetGameObject(self.gameObject, "helpBtn")
|
||||||
|
self.helpPosition = self.helpBtn:GetComponent("RectTransform").localPosition
|
||||||
|
self.rankingBtn = Util.GetGameObject(self.gameObject, "rankingBtn")
|
||||||
|
|
||||||
|
self.title = Util.GetGameObject(self.gameObject,"bg/kuang/zi"):GetComponent("Image")
|
||||||
|
self.goBtn = Util.GetGameObject(self.gameObject,"bg/kuang/goBtn")
|
||||||
|
self.goBtnImage = Util.GetGameObject(self.goBtn,"zi"):GetComponent("Image")
|
||||||
|
self.Rank = Util.GetGameObject(self.goBtn,"di")
|
||||||
|
self.goNum = Util.GetGameObject(self.Rank,"num"):GetComponent("Text")
|
||||||
|
self.goTips = Util.GetGameObject(self.goBtn,"tips"):GetComponent("Text")
|
||||||
|
|
||||||
|
self.time = Util.GetGameObject(self.gameObject,"bg/kuang/time/Text"):GetComponent("Text")
|
||||||
|
|
||||||
|
self.Scroll = Util.GetGameObject(self.gameObject,"bg/kuang/Scroll")
|
||||||
|
self.leftTime = Util.GetGameObject(self.gameObject,"bg/LeftTime"):GetComponent("Text")
|
||||||
|
self.itemPre = Util.GetGameObject(self.gameObject,"itemPre")
|
||||||
|
|
||||||
|
local rootHight = self.Scroll.transform.rect.height
|
||||||
|
local width = self.Scroll.transform.rect.width
|
||||||
|
self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.Scroll.transform,
|
||||||
|
self.itemPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0, 0))
|
||||||
|
self.ScrollView.moveTween.MomentumAmount = 1
|
||||||
|
self.ScrollView.moveTween.Strength = 2
|
||||||
|
self.itemList = {}
|
||||||
|
self.live = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
--绑定事件(用于子类重写)
|
||||||
|
function ArenaTrialPanel:BindEvent()
|
||||||
|
Util.AddClick(self.btnBack, function()
|
||||||
|
self:ClosePanel()
|
||||||
|
end)
|
||||||
|
|
||||||
|
Util.AddClick(self.goBtn, function()
|
||||||
|
JumpManager.GoJump(8001)
|
||||||
|
end)
|
||||||
|
|
||||||
|
Util.AddClick(self.helpBtn, function()
|
||||||
|
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.jingjishilian, self.helpPosition.x,self.helpPosition.y)
|
||||||
|
end)
|
||||||
|
Util.AddClick(self.rankingBtn, function()
|
||||||
|
UIManager.OpenPanel(UIName.RankingSingleListPanel,rankKingList[6])
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--添加事件监听(用于子类重写)
|
||||||
|
function ArenaTrialPanel:AddListener()
|
||||||
|
end
|
||||||
|
|
||||||
|
--移除事件监听(用于子类重写)
|
||||||
|
function ArenaTrialPanel:RemoveListener()
|
||||||
|
end
|
||||||
|
|
||||||
|
--界面打开时调用(用于子类重写)
|
||||||
|
function ArenaTrialPanel:OnOpen()
|
||||||
|
end
|
||||||
|
|
||||||
|
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||||
|
function ArenaTrialPanel:OnShow()
|
||||||
|
self:Refresh(true,true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ArenaTrialPanel:Refresh(isTop,isAni)
|
||||||
|
self.actData = CommonActPageManager.GetData(ActivityTypeDef.jingjishilian)
|
||||||
|
self.title.sprite = self.spLoader:LoadSprite("s_shanheshilian_shanheshilianzi")
|
||||||
|
self.goBtnImage.sprite = self.spLoader:LoadSprite("s_shanheshilian_anniushangzi")
|
||||||
|
if self.live then
|
||||||
|
poolManager:UnLoadLive(self.live.gameObject.name, self.live)
|
||||||
|
self.live = nil
|
||||||
|
end
|
||||||
|
local data = ConfigManager.GetConfigDataByKey(ConfigName.HeroConfig,"ReadingName","敖丙")
|
||||||
|
self.live = poolManager:LoadLive(GetResourcePath(data.Live), self.liveRoot.transform,
|
||||||
|
Vector3.one * data.Scale, Vector3.New(data.Position[1], data.Position[2], 0))
|
||||||
|
local SkeletonGraphic = self.live:GetComponent("SkeletonGraphic")
|
||||||
|
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
|
||||||
|
|
||||||
|
local _, myRankInfo = ArenaManager.GetRankInfo()
|
||||||
|
local myRank = myRankInfo.personInfo.rank
|
||||||
|
if myRank < 0 then
|
||||||
|
myRank = Language[10036]
|
||||||
|
self.Rank .gameObject:SetActive(false)
|
||||||
|
self.goTips.text = myRank
|
||||||
|
else
|
||||||
|
self.Rank.gameObject:SetActive(true)
|
||||||
|
self.goNum.text = myRank
|
||||||
|
self.goTips.text = "第 名"
|
||||||
|
end
|
||||||
|
|
||||||
|
self:SetNumbers()
|
||||||
|
self:SetRewards(isTop,isAni)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ArenaTrialPanel:SetNumbers()
|
||||||
|
--设置时间
|
||||||
|
if self.timer then
|
||||||
|
self.timer:Stop()
|
||||||
|
self.timer = nil
|
||||||
|
end
|
||||||
|
local time =self.actData.endTime - GetTimeStamp()
|
||||||
|
self.leftTime.text = string.format(Language[10512].."%s",TimeToFelaxible(time))
|
||||||
|
self.timer = Timer.New(function ()
|
||||||
|
time = time - 1
|
||||||
|
self.leftTime.text = string.format(Language[10512].."%s",TimeToFelaxible(time))
|
||||||
|
if time <= 0 then
|
||||||
|
self:ClosePanel()
|
||||||
|
end
|
||||||
|
end,1,-1,true)
|
||||||
|
self.timer:Start()
|
||||||
|
end
|
||||||
|
|
||||||
|
function ArenaTrialPanel:SetRewards(isTop,isAni)
|
||||||
|
local rewardTabs = {}
|
||||||
|
for i, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.ActivityRankingReward)) do
|
||||||
|
if v.ActivityId == self.actData.activityId then
|
||||||
|
table.insert(rewardTabs,v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
self.ScrollView:SetData(rewardTabs, function (index, go)
|
||||||
|
self:SingleDataShow(go, rewardTabs[index],index)
|
||||||
|
end,not isTop,not isAni)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ArenaTrialPanel:SingleDataShow(item,data,index)
|
||||||
|
local sortNumTabs = {}
|
||||||
|
for i = 1, 4 do
|
||||||
|
sortNumTabs[i] = Util.GetGameObject(item, "SortNum/SortNum ("..i..")")
|
||||||
|
sortNumTabs[i]:SetActive(false)
|
||||||
|
end
|
||||||
|
local sort4Text = Util.GetGameObject(sortNumTabs[4],"TitleText"):GetComponent("Text")
|
||||||
|
local reward = Util.GetGameObject(item,"reward")
|
||||||
|
|
||||||
|
if data.MinRank == data.MaxRank then
|
||||||
|
if data.MaxRank < 4 then
|
||||||
|
sortNumTabs[data.MinRank]:SetActive(true)
|
||||||
|
else
|
||||||
|
sortNumTabs[4]:SetActive(true)
|
||||||
|
sort4Text.text = data.MaxRank
|
||||||
|
end
|
||||||
|
else
|
||||||
|
sortNumTabs[4]:SetActive(true)
|
||||||
|
if data.MaxRank < 0 then
|
||||||
|
sort4Text.text = data.MinRank .."+"
|
||||||
|
else
|
||||||
|
sort4Text.text = data.MinRank .."-".. data.MaxRank
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self.itemList[item] then
|
||||||
|
self.itemList[item] = {}
|
||||||
|
end
|
||||||
|
for i = 1, #data.RankingReward do
|
||||||
|
if not self.itemList[item][i] then
|
||||||
|
self.itemList[item][i] = SubUIManager.Open(SubUIConfig.ItemView,reward.transform)
|
||||||
|
end
|
||||||
|
self.itemList[item][i]:OnOpen(false, data.RankingReward[i], 0.8,false,false,false,self.sortingOrder)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--界面关闭时调用(用于子类重写)
|
||||||
|
function ArenaTrialPanel:OnClose()
|
||||||
|
if self.timer then
|
||||||
|
self.timer:Stop()
|
||||||
|
self.timer = nil
|
||||||
|
end
|
||||||
|
if self.live then
|
||||||
|
poolManager:UnLoadLive(self.live.gameObject.name, self.live)
|
||||||
|
self.live = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--界面销毁时调用(用于子类重写)
|
||||||
|
function ArenaTrialPanel:OnDestroy()
|
||||||
|
if self.timer then
|
||||||
|
self.timer:Stop()
|
||||||
|
self.timer = nil
|
||||||
|
end
|
||||||
|
self.itemList = {}
|
||||||
|
if self.live then
|
||||||
|
poolManager:UnLoadLive(self.live.gameObject.name, self.live)
|
||||||
|
self.live = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return ArenaTrialPanel
|
|
@ -1,6 +1,5 @@
|
||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 662490c50a0740444ad18e93f84b5061
|
guid: 80cb96a6503dffd4195efefdb2925ed6
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
|
@ -1066,6 +1066,8 @@ function this:TabBtnAction(id,actType,data)
|
||||||
SwitchPanel.OpenPanel(UIName.YuJianXingPanel,nil,id)
|
SwitchPanel.OpenPanel(UIName.YuJianXingPanel,nil,id)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
elseif id == ActivityTypeDef.jingjishilian then
|
||||||
|
UIManager.OpenPanel(UIName.ArenaTrialPanel)
|
||||||
end
|
end
|
||||||
elseif actType == 2 then
|
elseif actType == 2 then
|
||||||
if id == FUNCTION_OPEN_TYPE.SERVER_START_GIFT then
|
if id == FUNCTION_OPEN_TYPE.SERVER_START_GIFT then
|
||||||
|
|
Loading…
Reference in New Issue