Merge branch 'china/dev' into 0功能/命格
# Conflicts: # Assets/ManagedResources/~Lua/Common/Managers.lua # Assets/ManagedResources/~Lua/Data/ConfigData.lua # Assets/ManagedResources/~Lua/Modules/ActivityGift/ActivityGiftManager.luadev_chengFeng
commit
f09556242d
|
@ -73,7 +73,7 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: 3ded3fc3a2c17c44dbec353f16fae822, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 6aa31f116bdd5754f8748c10196ac54c, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
|
@ -227,7 +227,7 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: 3ded3fc3a2c17c44dbec353f16fae822, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 6aa31f116bdd5754f8748c10196ac54c, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6dc329aaed8370b42a642e071ff3e785
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1018,6 +1018,11 @@ RedPointType = {
|
|||
incarnation_demon = 43804,
|
||||
incarnation_taoist = 43805,
|
||||
tiandihonglu = 43806,
|
||||
|
||||
recruitTreasure = 7010,
|
||||
recruitTreasure_one = 7011,
|
||||
recruitTreasure_two = 7012,
|
||||
recruitTreasure_three = 7013,
|
||||
LingMaiMiJing = 920,--灵脉秘境
|
||||
}
|
||||
|
||||
|
@ -1289,7 +1294,7 @@ ActivityTypeDef = {
|
|||
-- AccumulativeRecharge = 5, --累计充值
|
||||
FirstRecharge = 5, --首充
|
||||
GrowthReward = 6, --成长礼金
|
||||
Pray = 7, --云梦祈福
|
||||
RecruitTreasure = 7, --招募秘宝
|
||||
TreasureOfSomeBody = 8,--孙龙的宝藏
|
||||
LuckyCat=9,--招财猫
|
||||
SevenDayCarnival = 10,--七日狂欢
|
||||
|
@ -1418,6 +1423,8 @@ GoodsTypeDef = {
|
|||
WuJinMiBao=14,--天宫秘宝
|
||||
-- UpgradePackage=13,--升级限时礼包
|
||||
QiJieMiBao=40,--天宫秘宝
|
||||
RecruiteTreasure = 16,
|
||||
|
||||
}
|
||||
|
||||
--工坊功能类型
|
||||
|
|
|
@ -222,6 +222,7 @@ local ManagerNames = {
|
|||
"LingMaiMiJing/LingMaiMiJingManager",
|
||||
--命格
|
||||
"Gem/GemManager",
|
||||
"TreasureOfHeaven/RecruitTreasureManager",
|
||||
--!!!!红点管理(尽量放在最后)!!!!--
|
||||
"Player/RedpotManager",
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ ConfigName = {
|
|||
GuildSetting = "GuildSetting",
|
||||
GuildLevelConfig = "GuildLevelConfig",
|
||||
GuildRewardConfig = "GuildRewardConfig",
|
||||
ActivityRankingReward = "ActivityRankingReward",
|
||||
ActivityRankingReward = "ActivityRankingRewardActivityRankingReward",
|
||||
ExchangeActivityConfig = "ExchangeActivityConfig",
|
||||
FloodConfig = "FloodConfig",
|
||||
LoginPosterConfig = "LoginPosterConfig",
|
||||
|
@ -244,6 +244,7 @@ ConfigName = {
|
|||
GoodsConfig = "GoodsConfig",
|
||||
ThemeActivityShop = "ThemeActivityShop",
|
||||
GemConfig = "GemConfig",
|
||||
SummonTreasure = "SummonTreasure",
|
||||
}
|
||||
|
||||
require "Framework/GameDataBase"
|
||||
|
|
|
@ -514,4 +514,5 @@ SubUIConfig = {
|
|||
[34] = {name = "WeekCardPage",assetName = "WeekCardPage",script = "Modules/Operating/WeekCardPage"},
|
||||
[35] = {name = "page16",assetName = "page16",script = "Modules/TailsManSoul/TailsmanSoulChipLottery"},
|
||||
[36] = {name = "page17",assetName = "page17",script = "Modules/Incarnation/IncarnationLottery"},
|
||||
[37] = {name = "RecruitTreasurePanel",assetName = "RecruitTreasurePanel",script = "Modules/TreasureOfHeaven/RecruitTreasurePanel"},
|
||||
}
|
|
@ -430,6 +430,7 @@ GameEvent = {
|
|||
BuyQinglongSerectLevelSuccess="TreasureOfHeaven.BuyQinglongSerectLevelSuccess",
|
||||
RechargeQinglongSerectSuccess="TreasureOfHeaven.RechargeQinglongSerectSuccess",
|
||||
TaskRefresh = "TreasureOfHeaven.TaskRefresh",
|
||||
RechargeSuccess = "TreasureOfHeaven.RechargeSuccess",
|
||||
},
|
||||
CloseUI={
|
||||
OnClose="CloseUI.OnClose"
|
||||
|
|
|
@ -138,7 +138,6 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
if GlobalActivity[v.activityId] then
|
||||
this.CheckMoneyProgress(v)
|
||||
this.mission[v.activityId] = v
|
||||
|
||||
-- LogYellow("刷新活动数据activityId:" .. v.activityId .. " value:" .. v.value)
|
||||
for n, m in ipairs(v.mission) do
|
||||
-- LogGreen(" 刷新活动数据missionId:" .. m.missionId .. " state:" .. m.state .. " progress:" .. m.progress)
|
||||
|
@ -176,12 +175,6 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
LuckyCatManager.GetRewardProgress(v.mission, v.activityId, v.value)
|
||||
end
|
||||
end
|
||||
-- if (v.activityId == ActivityTypeDef.SupremeHero) then
|
||||
-- for n, m in ipairs(v.mission) do
|
||||
-- LogGreen("v.activityId:"..v.activityId.." m.missionId:"..m.missionId.." m.state:"..m.state)
|
||||
-- end
|
||||
-- end
|
||||
this.CheckActiveIsOpen(v)
|
||||
else
|
||||
LogError("服务器发送了前端不存在的活动ID:"..v.activityId)
|
||||
end
|
||||
|
@ -229,18 +222,6 @@ function this.CheckChapterRed()
|
|||
return chapterRed
|
||||
end
|
||||
|
||||
|
||||
--监测云梦祈福等活动是否开启 并请求数据
|
||||
function this.CheckActiveIsOpen(data)
|
||||
local globalActivityData = GlobalActivity[data.activityId]
|
||||
if globalActivityData then
|
||||
-- if globalActivityData.Type == ActivityTypeDef.Pray then
|
||||
-- --云梦活动开启 请求数据
|
||||
-- NetManager.InitPrayDataRequest()
|
||||
-- end
|
||||
end
|
||||
end
|
||||
|
||||
-------针对首充和累充,成长礼金-----------
|
||||
function this.GetActivityTypeInfo(type)
|
||||
local globalActConfigs = ConfigManager.GetAllConfigsDataByKey(ConfigName.GlobalActivity, "Type", type)
|
||||
|
@ -430,7 +411,6 @@ function this.RefreshActivityData(respond)
|
|||
TreasureOfSomebodyManagerV2.SetTreasureLocalData()
|
||||
--CheckRedPointStatus(RedPointType.TreasureOfSl)
|
||||
end
|
||||
this.CheckActiveIsOpen(respond.activityInfo[i])
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Activity.OnActivityOpenOrClose, {
|
||||
type = this.GetActivityTypeFromId(respond.activityInfo[i].activityId),
|
||||
status = 1 --开启
|
||||
|
|
|
@ -175,6 +175,7 @@ end
|
|||
|
||||
--获取怪物数据(战斗用)
|
||||
function this.GetMonsterData(monsterId)
|
||||
LogRed("GetMonsterData :"..monsterId)
|
||||
local monsterConfig = MonsterConfig[monsterId]
|
||||
return {
|
||||
roleId = monsterConfig.MonsterId,
|
||||
|
@ -676,11 +677,16 @@ function this.GetMonsterDataFromGroup(gId, camp)
|
|||
list[i] = this.PokemonUnitAdapter(mUnit, camp)
|
||||
end
|
||||
end
|
||||
-- 主角
|
||||
-- 技能
|
||||
local RoleSkills = MonsterGroup[gId].Role
|
||||
if RoleSkills and #RoleSkills > 0 then
|
||||
-- 主角ID
|
||||
local CharacterId = MonsterGroup[gId].CharacterId
|
||||
if not CharacterId or CharacterId == 0 then
|
||||
CharacterId = 20100
|
||||
end
|
||||
local mUnit = {
|
||||
unitId = 20100,
|
||||
unitId = CharacterId,
|
||||
position = 100,
|
||||
star = 1,
|
||||
playerSex = NameManager.roleSex,
|
||||
|
@ -851,7 +857,7 @@ end
|
|||
-- 是否解锁跳过功能
|
||||
function this.IsUnlockBattlePass()
|
||||
-- return false
|
||||
return PrivilegeManager.GetPrivilegeOpenStatus(PRIVILEGE_TYPE.SkipFight), "通关简单3-20或充值任意金额后解锁"
|
||||
return PrivilegeManager.GetPrivilegeOpenStatus(PRIVILEGE_TYPE.SkipFight), "通关简单3-10或充值任意金额后解锁"
|
||||
end
|
||||
|
||||
-- 战斗暂停控制
|
||||
|
|
|
@ -2814,6 +2814,59 @@ local effectList = {
|
|||
BattleUtil.FinalTreat(caster,target,treat,1,skill)
|
||||
end)
|
||||
end,
|
||||
--对目标造成神佑状态,造成目标[a]属性[b]%的治疗,持续[c]回合,溢出的治疗量转化为御甲
|
||||
--a[int],b[float],c[int]
|
||||
[144] = function(caster, target, args, interval, skill)
|
||||
local p1 = args[1]
|
||||
local v1 = args[2]
|
||||
local round = args[3]
|
||||
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
local damage=floor(target:GetRoleData(p1)*v1)
|
||||
local buff=Buff.Create(caster,BuffName.HOT,round,1,damage)
|
||||
buff.hotType=2
|
||||
target:AddBuff(buff)
|
||||
end)
|
||||
end,
|
||||
--为我方添加反伤盾,护盾类型为[a],护盾值为[b]%,持续[c]回合
|
||||
--a[int],b[float],c[int]
|
||||
[145] = function(caster, target, args, interval, skill)
|
||||
local type = args[1]
|
||||
local v1 = args[2]
|
||||
local r1 = args[3]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
|
||||
target:AddBuff(Buff.Create(caster, BuffName.Shield,r1,type,v1))
|
||||
end)
|
||||
end,
|
||||
--对目标造成自身[a]*[b]%的伤害,目标每减少[c]个伤害增加[d]%,
|
||||
--a[int],b[int],c[int],d[float]
|
||||
[146] = function(caster, target, args, interval, skill)
|
||||
local pro = args[1]
|
||||
local v1 = args[2]
|
||||
local i1 = args[3]
|
||||
local v2 = args[4]
|
||||
BattleLogic.WaitForTrigger(interval, function ()
|
||||
|
||||
local isBoss=BattleUtil.CheckIsBoss(target)
|
||||
if isBoss then
|
||||
return
|
||||
end
|
||||
-- 改变值 = 技能最大目标数 - 当前目标数
|
||||
local maxNum = skill:GetMaxTargetNum()
|
||||
local curNum = #skill:GetDirectTargets()
|
||||
local lessNum = max(maxNum - curNum, 0)
|
||||
local level = math.floor(lessNum/i1)
|
||||
local extra = BattleUtil.ErrorCorrection(level * v2)
|
||||
local damage=floor(target:GetRoleData(pro)*(v1+extra))
|
||||
BattleUtil.FinalDamageCountShield(nil,caster, target,damage)
|
||||
end)
|
||||
end,
|
||||
[147]=function(caster, target, args, interval, skill)
|
||||
target.isRealDead=true
|
||||
target:SetRelive(1, caster)
|
||||
end,
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -3241,16 +3241,16 @@ local passivityList = {
|
|||
if not type then
|
||||
type=0
|
||||
end
|
||||
local onBeSkillCastEnd = function(skill)
|
||||
if type==0 and skill.type~=BattleSkillType.Normal then
|
||||
local onBeSkillCastEnd = function(atkRole, damage, bCrit, finalDmg, damageType, skill)
|
||||
if type==0 and (skill.type~=BattleSkillType.Normal and skill.type~=BattleSkillType.ChaosNormal) then
|
||||
return
|
||||
end
|
||||
if type==1 and skill.type~=BattleSkillType.Special and skill.type~=BattleSkillType.Extra and skill.type~=BattleSkillType.DeadSkill then
|
||||
return
|
||||
end
|
||||
BattleUtil.CalRage(role, skill.owner, i1, CountTypeName.Sub)
|
||||
BattleUtil.CalRage(role, atkRole, i1, CountTypeName.Sub)
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.BeSkillCastEnd, onBeSkillCastEnd,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.RoleBeHit, onBeSkillCastEnd,nil,nil,role)
|
||||
end,
|
||||
|
||||
|
||||
|
@ -10259,27 +10259,43 @@ local passivityList = {
|
|||
end
|
||||
role.Event:AddEvent(BattleEventName.SkillCastEnd,onSkillEnd,nil,nil,role)
|
||||
end,
|
||||
--敌方处于[a]类型[b]状态的单位死亡,自身立即获得全场[c]状态[d]类型buff层数*[e]的怒气
|
||||
--a[int],b[int],c[int],d[int],e[float]
|
||||
--敌方处于[a]类型[b]状态的单位死亡,自身立即获得全场[c]状态[d]类型buff层数*[e]的怒气,每回合触发[f]次
|
||||
--a[int],b[int],c[int],d[int],e[float],f[int]
|
||||
[405]=function(role,args,id,judge)
|
||||
local t1=args[1]
|
||||
local t2=args[2]
|
||||
local t3=args[3]
|
||||
local t4=args[4]
|
||||
local v1=args[5]
|
||||
local time=args[6]
|
||||
if args[6]==nil then
|
||||
time=1
|
||||
end
|
||||
local triggerTime=0
|
||||
local onRoleDead=function(defRole, atkRole)
|
||||
|
||||
if defRole and defRole.camp==role.camp then
|
||||
return
|
||||
end
|
||||
if BattleUtil.CheckIsNoDead(defRole) then
|
||||
return
|
||||
end
|
||||
if BattleLogic.BuffMgr:HasBuff(defRole, t1, function (buff) return buff.damageType == t2 end ) then
|
||||
if triggerTime>=time then
|
||||
return
|
||||
end
|
||||
local list=BattleLogic.BuffMgr:GetAllBuffByFunc(function(buff) return buff.type==t1 and buff.damageType==t2 end)
|
||||
local len=BattleUtil.LengthOfTable(list)
|
||||
local num= floor(v1*len)
|
||||
BattleUtil.CalRage(role,role,num,CountTypeName.Add)
|
||||
triggerTime=triggerTime+1
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoleDead,onRoleDead,nil,nil,role)
|
||||
local onRoundChange=function()
|
||||
triggerTime=0
|
||||
end
|
||||
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange,onRoundChange,nil,nil,role)
|
||||
end,
|
||||
--第[a]回合必定命中
|
||||
--a[int]
|
||||
|
@ -10351,11 +10367,11 @@ local passivityList = {
|
|||
local addDMGFac=function(func)
|
||||
if BattleLogic.BuffMgr:HasBuff(role,t1, function (buff) return buff.signType==t2 end ) then
|
||||
if func then
|
||||
func(v2,CountTypeName.Add)
|
||||
func(v2,CountTypeName.Sub)
|
||||
end
|
||||
end
|
||||
end
|
||||
role.Event:AddEvent(BattleEventName.PassiveChangeAddDMGFac,addDMGFac,nil,nil,role)
|
||||
role.Event:AddEvent(BattleEventName.PassiveChangeDefDMGReFac,addDMGFac,nil,nil,role)
|
||||
end,
|
||||
--被自身添加[a]类型[b]效果的目标,己方[c]系神将对其暴击率改变[d][e]%,命中改变[f][g]%
|
||||
--a[int],b[int],c[int],d[int],e[float],f[float]
|
||||
|
@ -10413,7 +10429,7 @@ local passivityList = {
|
|||
|
||||
if len>0 then
|
||||
local list=RoleManager.Query(function(target)
|
||||
if not BattleLogic.BuffMgr:HasBuff(target, t1, function (buff) return buff.ctrlType==t2 end) then
|
||||
if not BattleLogic.BuffMgr:HasBuff(target, t1, function (buff) return buff.ctrlType==t2 end) and target.camp~=role.camp then
|
||||
return true
|
||||
end
|
||||
end)
|
||||
|
@ -10452,7 +10468,7 @@ local passivityList = {
|
|||
end)
|
||||
if #list>0 then
|
||||
for i = 1, #list do
|
||||
local list2=BattleLogic.BuffMgr:GetAllBuffByFunc(function(buff) return buff.type==t2 and buff.signType==t3 end)
|
||||
local list2=BattleLogic.BuffMgr:GetAllBuffByFunc(function(buff) return buff.type==t2 and buff.signType==t3 and buff.target==list[i] end)
|
||||
local len=BattleUtil.LengthOfTable(list2)
|
||||
if len<num then
|
||||
local buff=Buff.Create(role,t2,0,t3)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Shield = Buff:New()
|
||||
-- 无敌吸血盾的免疫状态
|
||||
local immune0 = function(buff)
|
||||
return buff.type == BuffName.Control or buff.isDeBuff or buff.type == BuffName.DOT
|
||||
return buff.type == BuffName.Control or buff.isDeBuff or buff.type == BuffName.DOT or buff.caster.camp~=buff.target.camp
|
||||
end
|
||||
--初始化Buff,通过传入一些自定义参数控制成长相关的数值
|
||||
function Shield:SetData(...)
|
||||
|
@ -18,6 +18,20 @@ function Shield:SetData(...)
|
|||
self.sort = 4
|
||||
end
|
||||
|
||||
|
||||
local onRoleBeHit=function(atkRole, damage, bCrit, finalDmg, damageType, skill)
|
||||
--damagetype为3 是 舍身济世分摊伤害
|
||||
if damageType==3 then
|
||||
return
|
||||
end
|
||||
if skill then --技能造成的直接伤害
|
||||
local rDamage = math.floor(damage*self.shieldValue)
|
||||
if rDamage ~= 0 then
|
||||
BattleUtil.ApplyDamage(nil,self.target,atkRole, rDamage)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--初始化后调用一次
|
||||
function Shield:OnStart()
|
||||
|
||||
|
@ -26,8 +40,10 @@ function Shield:OnStart()
|
|||
self.target.buffFilter:Add(immune0)
|
||||
-- 清除所有负面buff
|
||||
BattleLogic.BuffMgr:ClearBuff(self.target, function (buff)
|
||||
return buff.type == BuffName.Control or buff.type == BuffName.DOT
|
||||
return buff.type == BuffName.Control or buff.type == BuffName.DOT or buff.caster.camp~=self.target.camp
|
||||
end)
|
||||
elseif self.shieldType == ShieldTypeName.ThornsReduce then
|
||||
self.target.Event:AddEvent(BattleEventName.RoleBeHit,onRoleBeHit,nil,nil,self.target)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -179,6 +195,16 @@ function Shield:OnEnd()
|
|||
break
|
||||
end
|
||||
end
|
||||
elseif self.shieldType == ShieldTypeName.ThornsReduce then
|
||||
|
||||
self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,onRoleBeHit,nil,nil,self.target)
|
||||
|
||||
for i = 1, self.target.shield.size do
|
||||
if self.target.shield.buffer[i] == self then
|
||||
self.target.shield:Remove(i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
BattleLogic.Event:DispatchEvent(BattleEventName.ShieldBuffEnd, self)
|
||||
end
|
||||
|
|
|
@ -192,7 +192,7 @@ BattleEventName = {
|
|||
ImmuneDebuffSuccess = indexAdd(),--免疫debuff成功
|
||||
ChangeRoleRage = indexAdd(),--改变角色怒气
|
||||
PassiveChangeIgnoreDef = indexAdd(),--被动改变无视防御比例
|
||||
PassiveChangeAddDMGFac = indexAdd(),--被动改变增伤比例
|
||||
PassiveChangeDefDMGReFac = indexAdd(),--被动改变增伤比例
|
||||
PassiveChangeRoleHit = indexAdd(),--被动改变角色命中
|
||||
|
||||
}
|
||||
|
@ -332,6 +332,7 @@ ShieldTypeName = {
|
|||
NormalReduce = 1, -- 固定值减伤
|
||||
RateReduce = 2, -- 百分比减伤
|
||||
AllReduce = 3, -- 无敌护盾
|
||||
ThornsReduce = 4, --反伤盾
|
||||
}
|
||||
|
||||
--额外释放技能
|
||||
|
|
|
@ -441,8 +441,15 @@ function BattleUtil.ChooseTarget(role, chooseId)
|
|||
if list and #list>0 then
|
||||
arr=RoleManager.GetNeighbor(list[1], chooseType)
|
||||
end
|
||||
elseif chooseWeight ==15 then --敌方
|
||||
-- body
|
||||
elseif chooseWeight ==15 then --我方阵亡
|
||||
|
||||
local aaa=RoleManager.GetDeadRole(role.camp)
|
||||
if aaa~=nil then
|
||||
--LogError(aaa.position)
|
||||
end
|
||||
aaa.isRealDead=false
|
||||
table.insert(arr,aaa)
|
||||
-- return aaa
|
||||
end
|
||||
local finalArr = {}
|
||||
if num == 0 then
|
||||
|
@ -617,6 +624,9 @@ end
|
|||
|
||||
-- 计算真实伤害
|
||||
function BattleUtil.ApplyDamage(skill, atkRole, defRole, damage, bCrit, damageType, dotType,isDirect)
|
||||
if defRole==nil then
|
||||
return
|
||||
end
|
||||
-- 灵兽无效
|
||||
if defRole.type == BattleUnitType.Monster or defRole.type == BattleUnitType.Player then
|
||||
return
|
||||
|
@ -992,13 +1002,18 @@ function BattleUtil.CalDamage(skill, atkRole, defRole, damageType, baseFactor, i
|
|||
ignoreDef = 1 - (ignoreDef or 0)
|
||||
-- 基础伤害 = 攻击力 - 防御力
|
||||
baseDamage = max(attack - BattleUtil.FP_Mul(2,defence, ignoreDef), 0)
|
||||
-- 基础伤害增加系数
|
||||
local addDamageFactor = 1 + atkRole:GetRoleData(RoleDataName.DamageBocusFactor) - defRole:GetRoleData(RoleDataName.DamageReduceFactor)
|
||||
local addDMGFac=function(v1,ct)
|
||||
addDamageFactor=BattleUtil.CountValue(addDamageFactor,v1,ct)
|
||||
|
||||
local defDMGRef=defRole:GetRoleData(RoleDataName.DamageReduceFactor)
|
||||
local changeDefDMGFac=function(v1,ct)
|
||||
if ct== CountTypeName.Sub and defDMGRef==0 then
|
||||
return
|
||||
end
|
||||
defDMGRef=BattleUtil.CountValue(defDMGRef,v1,ct)
|
||||
end
|
||||
atkRole.Event:DispatchEvent(BattleEventName.PassiveChangeDefDMGReFac,changeDefDMGFac)
|
||||
-- 基础伤害增加系数
|
||||
local addDamageFactor = 1 + atkRole:GetRoleData(RoleDataName.DamageBocusFactor) - defDMGRef
|
||||
|
||||
atkRole.Event:DispatchEvent(BattleEventName.PassiveChangeAddDMGFac,addDMGFac)
|
||||
-- 计算暴伤害系数
|
||||
local critDamageFactor = 1
|
||||
local critDamageReduceFactor = 0 -- 暴击伤害减免
|
||||
|
@ -1092,6 +1107,9 @@ end
|
|||
--没有暴击得治疗
|
||||
function BattleUtil.CalTreatNoCrit(castRole, targetRole, value, baseFactor,skill)
|
||||
-- 灵兽无效
|
||||
if targetRole==nil then
|
||||
return
|
||||
end
|
||||
if targetRole.type == BattleUnitType.Monster or targetRole.type == BattleUnitType.Player then
|
||||
return
|
||||
end
|
||||
|
|
|
@ -7,6 +7,10 @@ local _DeadRoleList = {}
|
|||
local _ReliveRoleList = {}
|
||||
-- 所有角色
|
||||
local PosList = {}
|
||||
|
||||
|
||||
local RealDeadList={}
|
||||
|
||||
-- 删除节点
|
||||
local removeObjList = BattleList.New()
|
||||
-- 角色对象池
|
||||
|
@ -83,6 +87,16 @@ end
|
|||
function this.AddDeadRole(role)
|
||||
_DeadRoleList[role.position + role.camp * 6] = role
|
||||
end
|
||||
function this.GetDeadRole(type)
|
||||
if RealDeadList and #RealDeadList>0 then
|
||||
for i = 1, #RealDeadList do
|
||||
if RealDeadList[i].camp==type then
|
||||
return RealDeadList[i]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function this.RemoveDeadRole(role)
|
||||
if _DeadRoleList[role.position + role.camp * 6] then
|
||||
|
@ -101,8 +115,10 @@ function this.CheckDead()
|
|||
end
|
||||
end
|
||||
for _, pos in ipairs(removePos) do
|
||||
table.insert(RealDeadList,_DeadRoleList[pos])
|
||||
_DeadRoleList[pos] = nil
|
||||
end
|
||||
|
||||
return isDeadFrame
|
||||
end
|
||||
|
||||
|
@ -411,6 +427,7 @@ function this.Clear()
|
|||
|
||||
_DeadRoleList = {}
|
||||
_ReliveRoleList = {}
|
||||
RealDeadList = {}
|
||||
end
|
||||
|
||||
-- 多波
|
||||
|
|
|
@ -50,18 +50,19 @@ local UpdateBtnGMFunc = {
|
|||
-- [BATTLE_TYPE.DAILY_CHALLENGE] = function()
|
||||
-- return SKIP_STATE.NOUSE, "日常副本战斗无法跳过!"
|
||||
-- end,
|
||||
-- [BATTLE_TYPE.STORY_FIGHT] = function()
|
||||
-- if not BattleManager.IsUnlockBattlePass() then
|
||||
-- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁"
|
||||
-- end
|
||||
-- -- if FightPointPassManager.GetCurOpenFightIdIsBoss() then
|
||||
-- -- return SKIP_STATE.NOUSE, "首领关卡无法跳过!"
|
||||
-- -- end
|
||||
-- -- if this.curRound <= _NO_JUMP_ROUND then
|
||||
-- -- return SKIP_STATE.NOUSE, "第二回合结束后可以跳过"
|
||||
-- -- end
|
||||
-- return SKIP_STATE.UNLOCK
|
||||
-- end,
|
||||
[BATTLE_TYPE.STORY_FIGHT] = function()
|
||||
local isUnlock, tip = BattleManager.IsUnlockBattlePass()
|
||||
if not isUnlock then
|
||||
return SKIP_STATE.LOCK, tip
|
||||
end
|
||||
if FightPointPassManager.GetCurOpenFightIdIsBoss() then
|
||||
if this.curRound <= _NO_JUMP_ROUND then
|
||||
return SKIP_STATE.NOUSE, "首领关卡第二回合结束后可以跳过"
|
||||
end
|
||||
-- return SKIP_STATE.NOUSE, "首领关卡无法跳过!"
|
||||
end
|
||||
return SKIP_STATE.UNLOCK
|
||||
end,
|
||||
-- [BATTLE_TYPE.DAILY_CHALLENGE] = function()
|
||||
-- -- if not BattleManager.IsUnlockBattlePass() then
|
||||
-- -- return SKIP_STATE.LOCK, "25级或充值任意金额后解锁"
|
||||
|
@ -773,7 +774,7 @@ function this.OnRoundChanged(round)
|
|||
this.roundText.text = string.format(Language[10211], curRound, maxRound)
|
||||
|
||||
-- 设置跳过按钮的状态
|
||||
-- this.SetJumpBtnState()
|
||||
this.SetJumpBtnState()
|
||||
end
|
||||
-- 角色轮转回调
|
||||
function this.RoleTurnChange(role)
|
||||
|
|
|
@ -29,26 +29,37 @@ function MonsterView:onCreate(go, role, position, root)
|
|||
self.icon = Util.GetGameObject(go, "icon"):GetComponent("Image")
|
||||
self.turnEffect=role.camp == 0 and self.RootPanel.lingshouDownEffect or self.RootPanel.lingshouUpEffect
|
||||
-- 获取数据
|
||||
local live=0
|
||||
self.livePath = nil
|
||||
if position==100 then
|
||||
if role.sex==ROLE_SEX.BOY then
|
||||
self.livePath="live2d_npc_boy"
|
||||
else
|
||||
self.livePath="live2d_npc_girl"
|
||||
end
|
||||
--self.livePath="live2d_npc_girl"
|
||||
role.roleData.id=20100
|
||||
else
|
||||
self.livePath = GetResourcePath(SpiritAnimal[role.roleData.id].Live)
|
||||
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(SpiritAnimal[role.roleData.id].Icon))
|
||||
if not role.roleData.id or role.roleData.id == 0 then
|
||||
role.roleData.id = 20100
|
||||
end
|
||||
if role.roleData.id == 20100 then
|
||||
if role.sex == ROLE_SEX.BOY then
|
||||
self.livePath = "live2d_npc_boy"
|
||||
else
|
||||
self.livePath = "live2d_npc_girl"
|
||||
end
|
||||
-- 确定是主角
|
||||
self.isMainPlayer = true
|
||||
end
|
||||
end
|
||||
self.play_liveScale = SpiritAnimal[role.roleData.id].play_liveScale
|
||||
self.enemy_liveScale = SpiritAnimal[role.roleData.id].enemy_liveScale
|
||||
self.offset = SpiritAnimal[role.roleData.id].offset
|
||||
self.outOffset = SpiritAnimal[role.roleData.id].enemy_offset
|
||||
self.spAtkTime = SpiritAnimal[role.roleData.id].CastingSkills/1000
|
||||
self.atkSoundTime = SpiritAnimal[role.roleData.id].CastingAudio/1000
|
||||
self.attackSound = SpiritAnimal[role.roleData.id].sond
|
||||
-- 配置表数据
|
||||
self.config = SpiritAnimal[role.roleData.id]
|
||||
|
||||
-- 如果不是男女主角
|
||||
if not self.livePath then
|
||||
self.livePath = GetResourcePath(self.config.Live)
|
||||
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(self.config.Icon))
|
||||
end
|
||||
|
||||
self.play_liveScale = self.config.play_liveScale
|
||||
self.enemy_liveScale = self.config.enemy_liveScale
|
||||
self.offset = self.config.offset
|
||||
self.outOffset = self.config.enemy_offset
|
||||
self.spAtkTime = self.config.CastingSkills/1000
|
||||
self.atkSoundTime = self.config.CastingAudio/1000
|
||||
self.attackSound = self.config.sond
|
||||
|
||||
|
||||
-- 人物立绘
|
||||
|
@ -139,12 +150,7 @@ function MonsterView:PlaySpineAnim(gog, time, name, isLoop)
|
|||
local _complete = nil
|
||||
_complete = function(state)
|
||||
gog.AnimationState.Complete = gog.AnimationState.Complete - _complete
|
||||
if self.role.roleData.id==20100 then
|
||||
gog.AnimationState:SetAnimation(0, "idle", true)
|
||||
else
|
||||
gog.AnimationState:SetAnimation(0, "attack", true)
|
||||
end
|
||||
|
||||
gog.AnimationState:SetAnimation(0, "idle", true)
|
||||
end
|
||||
gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题)
|
||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||
|
@ -182,7 +188,7 @@ function MonsterView:OnSkillCastStart(skill)
|
|||
self.RoleLiveGO3.transform:SetParent(self.skillCastRoot.gameObject.transform)
|
||||
self.RoleLiveGO3.transform:SetSiblingIndex(0)
|
||||
--self.RoleLiveGO3.transform.position=Vector3.zero
|
||||
local offset = self.camp == 0 and SpiritAnimal[20100].offset or SpiritAnimal[20100].enemy_offset
|
||||
local offset = self.camp == 0 and self.config.offset or self.config.enemy_offset
|
||||
local add=roleConfig.enemy_offset
|
||||
if self.camp==1 then
|
||||
self.RoleLiveGO3.transform.rotation=Vector3.New(0,180,0)
|
||||
|
@ -219,10 +225,6 @@ function MonsterView:OnSkillCastingStart(skill)
|
|||
-- 提前进入下一阶段
|
||||
self.turnEffect:SetActive(false)
|
||||
self.RoleLiveGO2:SetActive(true)
|
||||
local animName="attack"
|
||||
if self.role.roleData.id==20100 then
|
||||
animName="idle"
|
||||
end
|
||||
self.RoleLiveGO2:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0, 0, 0))
|
||||
if self.RoleLiveGO3 then
|
||||
if (self.camp==0 and heroConfig and heroConfig.Toward==1) or (self.camp==1 and heroConfig and heroConfig.Toward==2) then
|
||||
|
@ -245,16 +247,15 @@ function MonsterView:OnSkillCastingStart(skill)
|
|||
self.RoleLiveGO3.transform:DORotate(Vector3.New(0,0, 0),0.5)
|
||||
end
|
||||
self.castingNameNode:GetComponent("Image").sprite = self.spLoader:LoadSprite(self.combat.skillname)
|
||||
animName="attack"
|
||||
self:PlaySpineAnim(self.RoleLiveGOGraphic3, 0,animName , false)
|
||||
coroutine.wait(1.5)
|
||||
self:PlaySpineAnim(self.RoleLiveGOGraphic3, 0, "attack" , false)
|
||||
-- coroutine.wait(1.5)
|
||||
--self.turnEffect:SetActive(false)
|
||||
end)
|
||||
coroutine.wait(0.1)
|
||||
self.turnEffect:SetActive(true)
|
||||
end)
|
||||
else
|
||||
self:PlaySpineAnim(self.RoleLiveGOGraphic2, 0,animName , false)
|
||||
self:PlaySpineAnim(self.RoleLiveGOGraphic2, 0, "attack" , false)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -387,6 +387,9 @@ end
|
|||
-- 播放动画
|
||||
|
||||
function PlayerView:PlaySpineAnim(gog, time, name, isLoop)
|
||||
if startWith(gog.gameObject.name, "live2d_npc") then
|
||||
return
|
||||
end
|
||||
if isLoop then
|
||||
self.currAniName=name
|
||||
gog.AnimationState:SetAnimation(time, name, isLoop)
|
||||
|
|
|
@ -480,9 +480,9 @@ function this:BindEvent()
|
|||
UIManager.OpenPanel(UIName.EliteMonsterPanel, 1)
|
||||
end)
|
||||
|
||||
Util.AddClick(this.paryGift, function()
|
||||
UIManager.OpenPanel(UIName.PrayMainPanel)
|
||||
end)
|
||||
-- Util.AddClick(this.paryGift, function()
|
||||
-- UIManager.OpenPanel(UIName.PrayMainPanel)
|
||||
-- end)
|
||||
|
||||
--群英招募
|
||||
Util.AddClick(this.btnRecruit, function()
|
||||
|
@ -1010,8 +1010,6 @@ function this:TabBtnAction(id,actType,data)
|
|||
UIManager.OpenPanel(UIName.WarPowerSortPanel)
|
||||
elseif id == ActivityTypeDef.DailyRecharge then
|
||||
UIManager.OpenPanel(UIName.DailyRechargePanel)
|
||||
elseif id == ActivityTypeDef.Pray then
|
||||
UIManager.OpenPanel(UIName.PrayMainPanel)
|
||||
elseif id == ActivityTypeDef.DemonSlayer then
|
||||
UIManager.OpenPanel(UIName.DemonSlayerPanel)
|
||||
elseif id == ActivityTypeDef.DemonSlayerNew then
|
||||
|
|
|
@ -303,12 +303,7 @@ local jumpDic = {
|
|||
UIManager.OpenPanel(UIName.RecruitMainPanel,TableRecruitType.Siyuanzhen)
|
||||
end,
|
||||
[JumpType.Pray] = function(data)--云梦
|
||||
if ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.Pray) then
|
||||
UIManager.OpenPanel(UIName.PrayMainPanel)
|
||||
else
|
||||
PopupTipPanel.ShowTip(Language[11396])
|
||||
this.isOpen = false
|
||||
end
|
||||
|
||||
end,
|
||||
[JumpType.recharge] = function(data)--充值
|
||||
this.JumpActivity(JumpType.recharge,data[1])
|
||||
|
|
|
@ -636,6 +636,9 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.incarnation_taoist,IncarnationManager.CheckRedData)
|
||||
|
||||
RPData:AddCheckFunc(RedPointType.tiandihonglu,OperatingManager.GetTianDiHongLuRedPointStatus)
|
||||
RPData:AddCheckFunc(RedPointType.recruitTreasure_one,RecruitTreasureManager.GetRedPointStatus)
|
||||
RPData:AddCheckFunc(RedPointType.recruitTreasure_two,RecruitTreasureManager.GetRedPointStatus)
|
||||
RPData:AddCheckFunc(RedPointType.recruitTreasure_three,RecruitTreasureManager.GetRedPointStatus)
|
||||
end
|
||||
|
||||
-- 向红点绑定物体
|
||||
|
|
|
@ -17,6 +17,9 @@ local type = {
|
|||
[2] = {name=Language[11316],id = 5001,goodsType = GoodsTypeDef.FindBaby},
|
||||
[3] = {name="无尽秘宝",id = 107,goodsType = GoodsTypeDef.WuJinMiBao},
|
||||
[4] = {name="七界秘宝",id = 108,goodsType = GoodsTypeDef.QiJieMiBao},
|
||||
[5] = {name="招募秘宝",id = 109,goodsType = GoodsTypeDef.RecruiteTreasure},
|
||||
[6] = {name="招募秘宝",id = 110,goodsType = GoodsTypeDef.RecruiteTreasure},
|
||||
[7] = {name="招募秘宝",id = 111,goodsType = GoodsTypeDef.RecruiteTreasure},
|
||||
}
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
|
@ -44,9 +47,22 @@ function this:BindEvent()
|
|||
parent:ClosePanel()
|
||||
end)
|
||||
Util.AddOnceClick(this.dealBtn,function()
|
||||
PayManager.Pay(type[curType].id, function(id)
|
||||
this.RechargeSuccessFunc()
|
||||
end)
|
||||
local isBuy = true
|
||||
if type[curType].goodsType == GoodsTypeDef.RecruiteTreasure and curType > 5 then
|
||||
for i = 5,curType - 1 do
|
||||
if not RecruitTreasureManager.CheckIsBuyTreasureByGoodsId(type[i].id) then
|
||||
isBuy = false
|
||||
end
|
||||
end
|
||||
end
|
||||
if isBuy then
|
||||
PayManager.Pay(type[curType].id, function(id)
|
||||
this.RechargeSuccessFunc()
|
||||
end)
|
||||
elseif type[curType].goodsType == GoodsTypeDef.RecruiteTreasure then
|
||||
PopupTipPanel.ShowTip("需购买上一档秘宝!")
|
||||
return
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -60,6 +76,7 @@ function this:OnShow(_parent,...)
|
|||
parent.BG:SetActive(false)
|
||||
local temp = {...}
|
||||
curType = temp[1]
|
||||
local extraType = temp[2]
|
||||
if curType == 1 then
|
||||
rewardStateData = TreasureOfHeavenManger.rewardStateData
|
||||
rewardData = TreasureOfHeavenManger.GetAllRewardData()
|
||||
|
@ -77,7 +94,6 @@ function this:OnShow(_parent,...)
|
|||
elseif curType == 3 then
|
||||
rewardData,rewardData1 = EndLessMapManager.GetAllRewardData()
|
||||
this:showRewardWuJin(rewardData,rewardData1)
|
||||
-- this.tip.text = "<color=#60A22C>解锁秘宝,激活进阶</color><color=#95523B>专属奖励+2000积分,<color=#CC4325>可获取1280妖晶</color></color>"
|
||||
this.tip.text = "·获得<color=#45953B>2000积分</color>\n·获取<color=#45953B>1280妖晶</color>,激活<color=#45953B>进阶专属奖励</color>\n<size=25> <color=#45953B>妖晶</color>奖励通过<color=#45953B>邮件</color>发送</size>"
|
||||
this.dealBtnIma.gameObject:SetActive(false)
|
||||
this.dealBtnText.gameObject:SetActive(true)
|
||||
|
@ -86,12 +102,35 @@ function this:OnShow(_parent,...)
|
|||
elseif curType == 4 then --七界秘宝
|
||||
rewardData,rewardData1 = GeneralTreasureMangaer.GetAllRewardData()
|
||||
this:SetItem(rewardData,rewardData1)
|
||||
-- this.tip.text = "<color=#60A22C>解锁秘宝,激活进阶</color><color=#95523B>专属奖励+1500积分,<color=#CC4325>可获取1980妖晶</color></color>"
|
||||
this.tip.text = "·获得<color=#45953B>1500积分</color>\n·获取<color=#45953B>1980妖晶</color>,激活<color=#45953B>进阶专属奖励</color>\n<size=25> <color=#45953B>妖晶</color>奖励通过<color=#45953B>邮件</color>发送</size>"
|
||||
this.dealBtnIma.gameObject:SetActive(false)
|
||||
this.dealBtnText.gameObject:SetActive(true)
|
||||
local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,type[curType].id)
|
||||
this.dealBtnText.text = MoneyUtil.GetMoneyUnitNameWithMoney(config.Price)
|
||||
elseif curType == 5 then --
|
||||
rewardData,rewardData1 = RecruitTreasureManager.GetAllRewardData(extraType,type[curType].id)
|
||||
this:showRewardWuJin(rewardData,rewardData1)
|
||||
this.tip.text = "·获取<color=#45953B>980妖晶</color>,激活<color=#45953B>进阶专属奖励</color>\n<size=25> <color=#45953B>妖晶</color>奖励通过<color=#45953B>邮件</color>发送</size>"
|
||||
this.dealBtnIma.gameObject:SetActive(false)
|
||||
this.dealBtnText.gameObject:SetActive(true)
|
||||
local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,type[curType].id)
|
||||
this.dealBtnText.text = MoneyUtil.GetMoneyUnitNameWithMoney(config.Price)
|
||||
elseif curType == 6 then --
|
||||
rewardData,rewardData1 = RecruitTreasureManager.GetAllRewardData(extraType,type[curType].id)
|
||||
this:showRewardWuJin(rewardData,rewardData1)
|
||||
this.tip.text = "·获取<color=#45953B>980妖晶</color>,激活<color=#45953B>进阶专属奖励</color>\n<size=25> <color=#45953B>妖晶</color>奖励通过<color=#45953B>邮件</color>发送</size>"
|
||||
this.dealBtnIma.gameObject:SetActive(false)
|
||||
this.dealBtnText.gameObject:SetActive(true)
|
||||
local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,type[curType].id)
|
||||
this.dealBtnText.text = MoneyUtil.GetMoneyUnitNameWithMoney(config.Price)
|
||||
elseif curType == 7 then --
|
||||
rewardData,rewardData1 = RecruitTreasureManager.GetAllRewardData(extraType,type[curType].id)
|
||||
this:showRewardWuJin(rewardData,rewardData1)
|
||||
this.tip.text = "·获取<color=#45953B>980妖晶</color>,激活<color=#45953B>进阶专属奖励</color>\n<size=25> <color=#45953B>妖晶</color>奖励通过<color=#45953B>邮件</color>发送</size>"
|
||||
this.dealBtnIma.gameObject:SetActive(false)
|
||||
this.dealBtnText.gameObject:SetActive(true)
|
||||
local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,type[curType].id)
|
||||
this.dealBtnText.text = MoneyUtil.GetMoneyUnitNameWithMoney(config.Price)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -111,6 +150,12 @@ function this:RechargeSuccessFunc()
|
|||
Game.GlobalEvent:DispatchEvent(GameEvent.EndLess.RechargeQinglongSerectSuccess,false,false)
|
||||
elseif curType == 4 then
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.SerectTreasure.RechargeSuccess,false,false)
|
||||
elseif curType == 5 then
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeSuccess,false,false)
|
||||
elseif curType == 6 then
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeSuccess,false,false)
|
||||
elseif curType == 7 then
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeSuccess,false,false)
|
||||
end
|
||||
parent:ClosePanel()
|
||||
end
|
||||
|
|
|
@ -1,461 +1,461 @@
|
|||
require("Base/BasePanel")
|
||||
PrayMainPanel = Inherit(BasePanel)
|
||||
local this = PrayMainPanel
|
||||
local blessingConfig = ConfigManager.GetConfig(ConfigName.BlessingConfig)
|
||||
--16个祈福奖励
|
||||
local RewardParentGrid = {}
|
||||
local RewardItemGrid = {}
|
||||
--16个祈福奖励预览
|
||||
local yunLanRewardParentGrid = {}
|
||||
local yunLanRewardItemGrid = {}
|
||||
--当前祈福完成的个数
|
||||
local allGetFinishRewardNum = 0
|
||||
local allGetRewardNum = 0
|
||||
-- require("Base/BasePanel")
|
||||
-- PrayMainPanel = Inherit(BasePanel)
|
||||
-- local this = PrayMainPanel
|
||||
-- local blessingConfig = ConfigManager.GetConfig(ConfigName.BlessingConfig)
|
||||
-- --16个祈福奖励
|
||||
-- local RewardParentGrid = {}
|
||||
-- local RewardItemGrid = {}
|
||||
-- --16个祈福奖励预览
|
||||
-- local yunLanRewardParentGrid = {}
|
||||
-- local yunLanRewardItemGrid = {}
|
||||
-- --当前祈福完成的个数
|
||||
-- local allGetFinishRewardNum = 0
|
||||
-- local allGetRewardNum = 0
|
||||
|
||||
local blessingConFigData = {}
|
||||
local itemId = 0
|
||||
local itemNum = 0
|
||||
local itemData = {}
|
||||
-- local blessingConFigData = {}
|
||||
-- local itemId = 0
|
||||
-- local itemNum = 0
|
||||
-- local itemData = {}
|
||||
|
||||
--累计奖励
|
||||
local extraRewardParentGrid = {}
|
||||
local extraRewardItemGrid = {}
|
||||
--是否在刷新时间范围内
|
||||
local isRefresh = true
|
||||
-- --累计奖励
|
||||
-- local extraRewardParentGrid = {}
|
||||
-- local extraRewardItemGrid = {}
|
||||
-- --是否在刷新时间范围内
|
||||
-- local isRefresh = true
|
||||
|
||||
|
||||
local orginLayer = 0
|
||||
--初始化组件(用于子类重写)
|
||||
function PrayMainPanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
orginLayer = 0
|
||||
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft })
|
||||
self.BtnBack = Util.GetGameObject(self.transform, "btnBack")
|
||||
self.bg = Util.GetGameObject(self.transform, "bg")
|
||||
screenAdapte(self.bg)
|
||||
-- local orginLayer = 0
|
||||
-- --初始化组件(用于子类重写)
|
||||
-- function PrayMainPanel:InitComponent()
|
||||
-- this.spLoader = SpriteLoader.New()
|
||||
-- orginLayer = 0
|
||||
-- self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft })
|
||||
-- self.BtnBack = Util.GetGameObject(self.transform, "btnBack")
|
||||
-- self.bg = Util.GetGameObject(self.transform, "bg")
|
||||
-- screenAdapte(self.bg)
|
||||
|
||||
self.tishiText = Util.GetGameObject(self.gameObject, "downGo/name/tishiText")
|
||||
self.tishiText2 = Util.GetGameObject(self.gameObject, "downGo/name/tishiText2")
|
||||
self.tishiText3 = Util.GetGameObject(self.gameObject, "downGo/name/tishiText3")
|
||||
self.tishiText2Text = Util.GetGameObject(self.gameObject, "downGo/name/tishiText2/tishiText1"):GetComponent("Text")
|
||||
self.tishiText2Image = Util.GetGameObject(self.gameObject, "downGo/name/tishiText2/itemImage"):GetComponent("Image")
|
||||
self.refreshBtn = Util.GetGameObject(self.gameObject, "upGo/refreshBtn")
|
||||
self.yulanBtn = Util.GetGameObject(self.gameObject, "upGo/yulanBtn")
|
||||
self.extraRewardGo = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre")
|
||||
self.extraRewardParent = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/parent")
|
||||
self.allPrayNum = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/getNumText"):GetComponent("Text")
|
||||
self.extraRewardExp = Util.GetGameObject(self.transform, "upGo/extraRewardPre/exp"):GetComponent("Slider")
|
||||
self.extraRewardExpText = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/exp/Text"):GetComponent("Text")
|
||||
self.extraRewardNameText = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/nameText"):GetComponent("Text")
|
||||
this.RewardGrid = Util.GetGameObject(self.gameObject, "downGo/RewardGrid")
|
||||
for i = 1, 16 do
|
||||
RewardParentGrid[i] = Util.GetGameObject(self.gameObject, "downGo/RewardGrid/ItemView ("..i..")")
|
||||
RewardItemGrid[i] = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(RewardParentGrid[i].transform, "itemParent").transform)
|
||||
yunLanRewardParentGrid[i] = Util.GetGameObject(self.gameObject, "previewRewardLayout/RewardGrid/ItemView ("..i..")")
|
||||
yunLanRewardItemGrid[i] = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(yunLanRewardParentGrid[i].transform, "itemParent").transform)
|
||||
end
|
||||
-- self.tishiText = Util.GetGameObject(self.gameObject, "downGo/name/tishiText")
|
||||
-- self.tishiText2 = Util.GetGameObject(self.gameObject, "downGo/name/tishiText2")
|
||||
-- self.tishiText3 = Util.GetGameObject(self.gameObject, "downGo/name/tishiText3")
|
||||
-- self.tishiText2Text = Util.GetGameObject(self.gameObject, "downGo/name/tishiText2/tishiText1"):GetComponent("Text")
|
||||
-- self.tishiText2Image = Util.GetGameObject(self.gameObject, "downGo/name/tishiText2/itemImage"):GetComponent("Image")
|
||||
-- self.refreshBtn = Util.GetGameObject(self.gameObject, "upGo/refreshBtn")
|
||||
-- self.yulanBtn = Util.GetGameObject(self.gameObject, "upGo/yulanBtn")
|
||||
-- self.extraRewardGo = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre")
|
||||
-- self.extraRewardParent = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/parent")
|
||||
-- self.allPrayNum = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/getNumText"):GetComponent("Text")
|
||||
-- self.extraRewardExp = Util.GetGameObject(self.transform, "upGo/extraRewardPre/exp"):GetComponent("Slider")
|
||||
-- self.extraRewardExpText = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/exp/Text"):GetComponent("Text")
|
||||
-- self.extraRewardNameText = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/nameText"):GetComponent("Text")
|
||||
-- this.RewardGrid = Util.GetGameObject(self.gameObject, "downGo/RewardGrid")
|
||||
-- for i = 1, 16 do
|
||||
-- RewardParentGrid[i] = Util.GetGameObject(self.gameObject, "downGo/RewardGrid/ItemView ("..i..")")
|
||||
-- RewardItemGrid[i] = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(RewardParentGrid[i].transform, "itemParent").transform)
|
||||
-- yunLanRewardParentGrid[i] = Util.GetGameObject(self.gameObject, "previewRewardLayout/RewardGrid/ItemView ("..i..")")
|
||||
-- yunLanRewardItemGrid[i] = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(yunLanRewardParentGrid[i].transform, "itemParent").transform)
|
||||
-- end
|
||||
|
||||
--奖励预览
|
||||
self.previewRewardLayout = Util.GetGameObject(self.gameObject, "previewRewardLayout")
|
||||
self.previewRewardLayout:SetActive(false)
|
||||
self.yulanMaskBtn = Util.GetGameObject(self.gameObject, "previewRewardLayout/maskBtn")
|
||||
--累计奖励预览
|
||||
self.extraRewardBtn = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/extraRewardBtn")
|
||||
self.extraRewardLayout = Util.GetGameObject(self.gameObject, "extraRewardLayout")
|
||||
self.extraRewardLayout:SetActive(false)
|
||||
self.extraMaskBtn = Util.GetGameObject(self.gameObject, "extraRewardLayout/maskBtn")
|
||||
for i = 1, 6 do
|
||||
extraRewardParentGrid[i] = Util.GetGameObject(self.gameObject, "extraRewardLayout/RewardRect/RewardGrid/ItemView ("..i..")")
|
||||
extraRewardItemGrid[i] = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(extraRewardParentGrid[i].transform, "itemParent").transform)
|
||||
end
|
||||
--时间
|
||||
self.activeTimeText = Util.GetGameObject(self.gameObject, "upGo/name/time/timeImage/timeText"):GetComponent("Text")
|
||||
self.activeRefreshTimeText = Util.GetGameObject(self.gameObject, "upGo/refreshTimeBg/refreshTimeText")
|
||||
self.refreshTimeBg = Util.GetGameObject(self.gameObject, "upGo/refreshTimeBg")
|
||||
-- --奖励预览
|
||||
-- self.previewRewardLayout = Util.GetGameObject(self.gameObject, "previewRewardLayout")
|
||||
-- self.previewRewardLayout:SetActive(false)
|
||||
-- self.yulanMaskBtn = Util.GetGameObject(self.gameObject, "previewRewardLayout/maskBtn")
|
||||
-- --累计奖励预览
|
||||
-- self.extraRewardBtn = Util.GetGameObject(self.gameObject, "upGo/extraRewardPre/extraRewardBtn")
|
||||
-- self.extraRewardLayout = Util.GetGameObject(self.gameObject, "extraRewardLayout")
|
||||
-- self.extraRewardLayout:SetActive(false)
|
||||
-- self.extraMaskBtn = Util.GetGameObject(self.gameObject, "extraRewardLayout/maskBtn")
|
||||
-- for i = 1, 6 do
|
||||
-- extraRewardParentGrid[i] = Util.GetGameObject(self.gameObject, "extraRewardLayout/RewardRect/RewardGrid/ItemView ("..i..")")
|
||||
-- extraRewardItemGrid[i] = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(extraRewardParentGrid[i].transform, "itemParent").transform)
|
||||
-- end
|
||||
-- --时间
|
||||
-- self.activeTimeText = Util.GetGameObject(self.gameObject, "upGo/name/time/timeImage/timeText"):GetComponent("Text")
|
||||
-- self.activeRefreshTimeText = Util.GetGameObject(self.gameObject, "upGo/refreshTimeBg/refreshTimeText")
|
||||
-- self.refreshTimeBg = Util.GetGameObject(self.gameObject, "upGo/refreshTimeBg")
|
||||
|
||||
self.effect = Util.GetGameObject(self.gameObject, "effect")
|
||||
effectAdapte(Util.GetGameObject(self.effect, "Partical/ziti mask (1)"))
|
||||
end
|
||||
-- self.effect = Util.GetGameObject(self.gameObject, "effect")
|
||||
-- effectAdapte(Util.GetGameObject(self.effect, "Partical/ziti mask (1)"))
|
||||
-- end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function PrayMainPanel:BindEvent()
|
||||
-- --绑定事件(用于子类重写)
|
||||
-- function PrayMainPanel:BindEvent()
|
||||
|
||||
Util.AddClick(self.BtnBack, function()
|
||||
self:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(self.refreshBtn, function()
|
||||
self:RefreshBtnClick()
|
||||
end)
|
||||
Util.AddClick(self.yulanMaskBtn, function()
|
||||
self.previewRewardLayout:SetActive(false)
|
||||
end)
|
||||
Util.AddClick(self.yulanBtn, function()
|
||||
for i = 1, #PrayManager.patyPreviewRewardData do
|
||||
if allGetRewardNum > 0 then
|
||||
local patyPreviewRewardData = PrayManager.patyPreviewRewardData[i]
|
||||
this:ShowSingleRewardData(false,yunLanRewardParentGrid[i],yunLanRewardItemGrid[i],patyPreviewRewardData,false)
|
||||
end
|
||||
end
|
||||
self.previewRewardLayout:SetActive(true)
|
||||
end)
|
||||
Util.AddClick(self.extraMaskBtn, function()
|
||||
self.extraRewardLayout:SetActive(false)
|
||||
end)
|
||||
Util.AddClick(self.extraRewardBtn, function()
|
||||
--累计奖励
|
||||
for i = 1, 6 do
|
||||
if i <= #PrayManager.extraRewardData then
|
||||
extraRewardParentGrid[i]:SetActive(true)
|
||||
local patyRewardData = PrayManager.extraRewardData[i]
|
||||
this:ShowSingleExtraRewardData(false,extraRewardParentGrid[i],extraRewardItemGrid[i],patyRewardData)
|
||||
else
|
||||
extraRewardParentGrid[i]:SetActive(false)
|
||||
end
|
||||
end
|
||||
self.extraRewardLayout:SetActive(true)
|
||||
end)
|
||||
end
|
||||
-- Util.AddClick(self.BtnBack, function()
|
||||
-- self:ClosePanel()
|
||||
-- end)
|
||||
-- Util.AddClick(self.refreshBtn, function()
|
||||
-- self:RefreshBtnClick()
|
||||
-- end)
|
||||
-- Util.AddClick(self.yulanMaskBtn, function()
|
||||
-- self.previewRewardLayout:SetActive(false)
|
||||
-- end)
|
||||
-- Util.AddClick(self.yulanBtn, function()
|
||||
-- for i = 1, #PrayManager.patyPreviewRewardData do
|
||||
-- if allGetRewardNum > 0 then
|
||||
-- local patyPreviewRewardData = PrayManager.patyPreviewRewardData[i]
|
||||
-- this:ShowSingleRewardData(false,yunLanRewardParentGrid[i],yunLanRewardItemGrid[i],patyPreviewRewardData,false)
|
||||
-- end
|
||||
-- end
|
||||
-- self.previewRewardLayout:SetActive(true)
|
||||
-- end)
|
||||
-- Util.AddClick(self.extraMaskBtn, function()
|
||||
-- self.extraRewardLayout:SetActive(false)
|
||||
-- end)
|
||||
-- Util.AddClick(self.extraRewardBtn, function()
|
||||
-- --累计奖励
|
||||
-- for i = 1, 6 do
|
||||
-- if i <= #PrayManager.extraRewardData then
|
||||
-- extraRewardParentGrid[i]:SetActive(true)
|
||||
-- local patyRewardData = PrayManager.extraRewardData[i]
|
||||
-- this:ShowSingleExtraRewardData(false,extraRewardParentGrid[i],extraRewardItemGrid[i],patyRewardData)
|
||||
-- else
|
||||
-- extraRewardParentGrid[i]:SetActive(false)
|
||||
-- end
|
||||
-- end
|
||||
-- self.extraRewardLayout:SetActive(true)
|
||||
-- end)
|
||||
-- end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function PrayMainPanel:AddListener()
|
||||
-- --添加事件监听(用于子类重写)
|
||||
-- function PrayMainPanel:AddListener()
|
||||
|
||||
end
|
||||
-- end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function PrayMainPanel:RemoveListener()
|
||||
-- --移除事件监听(用于子类重写)
|
||||
-- function PrayMainPanel:RemoveListener()
|
||||
|
||||
end
|
||||
-- end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function PrayMainPanel:OnOpen(...)
|
||||
Util.GetGameObject(self.gameObject, "upGo/name/time/timeImage/Text"):GetComponent("Text").text = Language[11637]..tostring(16)..Language[11638]
|
||||
SetTextVerTial(Util.GetGameObject(self.gameObject, "upGo/name/time/timeImage/Text"),Vector3.New(0,-6.4,0),"MiddleLeft")
|
||||
end
|
||||
-- --界面打开时调用(用于子类重写)
|
||||
-- function PrayMainPanel:OnOpen(...)
|
||||
-- Util.GetGameObject(self.gameObject, "upGo/name/time/timeImage/Text"):GetComponent("Text").text = Language[11637]..tostring(16)..Language[11638]
|
||||
-- SetTextVerTial(Util.GetGameObject(self.gameObject, "upGo/name/time/timeImage/Text"),Vector3.New(0,-6.4,0),"MiddleLeft")
|
||||
-- end
|
||||
|
||||
local isPlayAinEnd = true
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function PrayMainPanel:OnShow()
|
||||
-- local isPlayAinEnd = true
|
||||
-- --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
-- function PrayMainPanel:OnShow()
|
||||
|
||||
isPlayAinEnd = true
|
||||
self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.LightRing })
|
||||
blessingConFigData = blessingConfig[1].Cost
|
||||
this.ShowRewardDataList()
|
||||
end
|
||||
function PrayMainPanel:OnSortingOrderChange()
|
||||
-- 设置特效
|
||||
Util.AddParticleSortLayer(self.effect, self.sortingOrder - orginLayer)
|
||||
orginLayer = self.sortingOrder
|
||||
self.previewRewardLayout.transform:GetComponent("Canvas").sortingOrder = self.sortingOrder + 50
|
||||
self.extraRewardLayout.transform:GetComponent("Canvas").sortingOrder = self.sortingOrder + 50
|
||||
end
|
||||
--获取活动时间 和 刷新倒计时显示
|
||||
function PrayMainPanel:SetRemainTime()
|
||||
local activityInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.Pray)--Pray
|
||||
if activityInfo then
|
||||
if activityInfo.endTime ~= 0 then
|
||||
Log("活动时间: "..activityInfo.startTime.." "..activityInfo.endTime)
|
||||
self.activeTimeText.text = Language[10584]..self:TimeStampToDateStr2(activityInfo.startTime).."~"..self:TimeStampToDateStr2(activityInfo.endTime)
|
||||
end
|
||||
end
|
||||
local privilegeId = blessingConfig[1].RefreshCd
|
||||
local maxResreshNum = PrivilegeManager.GetPrivilegeNumber(privilegeId)
|
||||
-- Log("sssssssssssssssss "..PrayManager.lastRefreshTime.." "..maxResreshNum.." "..GetTimeStamp())
|
||||
self:RemainTimeDown(PrayManager.lastRefreshTime+(maxResreshNum) - GetTimeStamp())
|
||||
end
|
||||
--刷新倒计时显示
|
||||
function PrayMainPanel:RemainTimeDown(timeDown)
|
||||
if timeDown > 0 then
|
||||
self.refreshTimeBg:SetActive(true)
|
||||
self.activeRefreshTimeText:GetComponent("Text").text = TimeStampToDateStr3(timeDown)
|
||||
isRefresh = false
|
||||
Util.SetGray(self.refreshBtn, true)
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
self.timer = Timer.New(function()
|
||||
self.activeRefreshTimeText:GetComponent("Text").text = TimeStampToDateStr3(timeDown)
|
||||
if timeDown < 0 then
|
||||
isRefresh = true
|
||||
self.refreshTimeBg:SetActive(false)
|
||||
Util.SetGray(self.refreshBtn, false)
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
timeDown = timeDown - 1
|
||||
end, 1, -1, true)
|
||||
self.timer:Start()
|
||||
else
|
||||
isRefresh = true
|
||||
Util.SetGray(self.refreshBtn, false)
|
||||
self.refreshTimeBg:SetActive(false)
|
||||
end
|
||||
end
|
||||
--展示所有祈福奖励
|
||||
function this.ShowRewardDataList()
|
||||
this:OnShowExtraRewar()
|
||||
this:SetRemainTime()
|
||||
for i = 1, #PrayManager.patyRewardData do
|
||||
local patyRewardData = PrayManager.patyRewardData[i]
|
||||
this:ShowSingleRewardData(false,RewardParentGrid[i],RewardItemGrid[i],patyRewardData,true)
|
||||
--if allGetRewardNum > 0 then
|
||||
-- local patyPreviewRewardData = PrayManager.patyPreviewRewardData[i]
|
||||
-- this:ShowSingleRewardData(false,yunLanRewardParentGrid[i],yunLanRewardItemGrid[i],patyPreviewRewardData,false)
|
||||
--end
|
||||
end
|
||||
--累计奖励
|
||||
--for i = 1, #PrayManager.extraRewardData do
|
||||
-- local patyRewardData = PrayManager.extraRewardData[i]
|
||||
-- this:ShowSingleExtraRewardData(false,extraRewardParentGrid[i],extraRewardItemGrid[i],patyRewardData)
|
||||
--end
|
||||
end
|
||||
--展示单个祈福奖励
|
||||
function PrayMainPanel:ShowSingleRewardData(_isGet,_parentGo,_go,patyRewardData,isClick)
|
||||
local PreciousShow = 0
|
||||
if patyRewardData.rewardId > 0 then
|
||||
local BlessingRewardPoolData = ConfigManager.GetConfigData(ConfigName.BlessingRewardPool,patyRewardData.rewardId)
|
||||
if BlessingRewardPoolData then
|
||||
PreciousShow = BlessingRewardPoolData.PreciousShow
|
||||
end
|
||||
end
|
||||
local _reward = {patyRewardData.itemId,patyRewardData.num,PreciousShow}
|
||||
--Log("item 信息 "..patyRewardData.itemId.." "..patyRewardData.num)
|
||||
local _state = patyRewardData.state
|
||||
local itemParent = Util.GetGameObject(_parentGo.transform, "itemParent")
|
||||
local getBtn = Util.GetGameObject(_parentGo.transform, "getBtn")
|
||||
local wenhaoBtn
|
||||
local addImage
|
||||
if isClick then
|
||||
wenhaoBtn = Util.GetGameObject(_parentGo.transform, "wenhaoBtn")
|
||||
addImage = Util.GetGameObject(_parentGo.transform, "addImage")
|
||||
wenhaoBtn:SetActive(false)
|
||||
addImage:SetActive(false)
|
||||
end
|
||||
getBtn:SetActive(false)
|
||||
itemParent:SetActive(false)
|
||||
if _state == 0 then--0未保存无物品 1 未保存有物品 2 已选择 3 已祈福
|
||||
if isClick then
|
||||
addImage:SetActive(true)
|
||||
end
|
||||
elseif _state == 1 then
|
||||
itemParent:SetActive(true)
|
||||
if isClick then
|
||||
_go:OnOpen(_isGet,_reward,1)
|
||||
else
|
||||
_go:OnOpen(_isGet,_reward,1,true)
|
||||
end
|
||||
elseif _state == 2 then
|
||||
if isClick then
|
||||
wenhaoBtn:SetActive(true)
|
||||
else
|
||||
itemParent:SetActive(true)
|
||||
if isClick then
|
||||
_go:OnOpen(_isGet,_reward,1)
|
||||
else
|
||||
_go:OnOpen(_isGet,_reward,1,true)
|
||||
end
|
||||
end
|
||||
elseif _state == 3 then
|
||||
itemParent:SetActive(true)
|
||||
if isClick then
|
||||
_go:OnOpen(_isGet,_reward,1)
|
||||
else
|
||||
_go:OnOpen(_isGet,_reward,1,true)
|
||||
end
|
||||
getBtn:SetActive(true)
|
||||
end
|
||||
Util.AddOnceClick(addImage, function()
|
||||
if isPlayAinEnd == false then
|
||||
return
|
||||
end
|
||||
if isClick then
|
||||
UIManager.OpenPanel(UIName.PraySelectRewardPanel,this)
|
||||
end
|
||||
end)
|
||||
if isClick then
|
||||
Util.AddOnceClick(wenhaoBtn, function()
|
||||
if BagManager.GetItemCountById(itemData.Id) < itemNum then
|
||||
--PopupTipPanel.ShowTip("材料不足")
|
||||
--功能快捷购买
|
||||
UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.LightRing })
|
||||
return
|
||||
end
|
||||
if isPlayAinEnd == false then
|
||||
return
|
||||
end
|
||||
MsgPanel.ShowTwo(Language[11639]..itemNum..Language[10200]..GetLanguageStrById(itemData.Name), nil ,function ()
|
||||
NetManager.GetSinglePrayRewardRequest(patyRewardData.id, function (_msg)
|
||||
isPlayAinEnd = false
|
||||
PrayManager.SetPatySingleRewardData(patyRewardData.id,_msg.chooseRewardId)
|
||||
PlayUIAnim(_parentGo)
|
||||
Timer.New(function ()
|
||||
this.ShowRewardDataList()
|
||||
end, 0.2):Start()
|
||||
Timer.New(function ()
|
||||
UIManager.OpenPanel(UIName.PrayRewardItemPopup,_msg.reward,allGetFinishRewardNum,_msg.chooseRewardId,function()
|
||||
-- self:CheckGetMaxReward()
|
||||
end)
|
||||
isPlayAinEnd = true
|
||||
end, 0.4):Start()
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
end
|
||||
--检测祈福是否满16 满会自动刷新
|
||||
-- function PrayMainPanel:CheckGetMaxReward()
|
||||
-- isPlayAinEnd = true
|
||||
-- self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.LightRing })
|
||||
-- blessingConFigData = blessingConfig[1].Cost
|
||||
-- this.ShowRewardDataList()
|
||||
-- end
|
||||
-- function PrayMainPanel:OnSortingOrderChange()
|
||||
-- -- 设置特效
|
||||
-- Util.AddParticleSortLayer(self.effect, self.sortingOrder - orginLayer)
|
||||
-- orginLayer = self.sortingOrder
|
||||
-- self.previewRewardLayout.transform:GetComponent("Canvas").sortingOrder = self.sortingOrder + 50
|
||||
-- self.extraRewardLayout.transform:GetComponent("Canvas").sortingOrder = self.sortingOrder + 50
|
||||
-- end
|
||||
-- --获取活动时间 和 刷新倒计时显示
|
||||
-- function PrayMainPanel:SetRemainTime()
|
||||
-- -- local activityInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.Pray)--Pray
|
||||
-- -- if activityInfo then
|
||||
-- -- if activityInfo.endTime ~= 0 then
|
||||
-- -- Log("活动时间: "..activityInfo.startTime.." "..activityInfo.endTime)
|
||||
-- -- self.activeTimeText.text = Language[10584]..self:TimeStampToDateStr2(activityInfo.startTime).."~"..self:TimeStampToDateStr2(activityInfo.endTime)
|
||||
-- -- end
|
||||
-- -- end
|
||||
-- -- local privilegeId = blessingConfig[1].RefreshCd
|
||||
-- -- local maxResreshNum = PrivilegeManager.GetPrivilegeNumber(privilegeId)
|
||||
-- -- -- Log("sssssssssssssssss "..PrayManager.lastRefreshTime.." "..maxResreshNum.." "..GetTimeStamp())
|
||||
-- -- self:RemainTimeDown(PrayManager.lastRefreshTime+(maxResreshNum) - GetTimeStamp())
|
||||
-- end
|
||||
-- --刷新倒计时显示
|
||||
-- function PrayMainPanel:RemainTimeDown(timeDown)
|
||||
-- if timeDown > 0 then
|
||||
-- self.refreshTimeBg:SetActive(true)
|
||||
-- self.activeRefreshTimeText:GetComponent("Text").text = TimeStampToDateStr3(timeDown)
|
||||
-- isRefresh = false
|
||||
-- Util.SetGray(self.refreshBtn, true)
|
||||
-- if self.timer then
|
||||
-- self.timer:Stop()
|
||||
-- self.timer = nil
|
||||
-- end
|
||||
-- self.timer = Timer.New(function()
|
||||
-- self.activeRefreshTimeText:GetComponent("Text").text = TimeStampToDateStr3(timeDown)
|
||||
-- if timeDown < 0 then
|
||||
-- isRefresh = true
|
||||
-- self.refreshTimeBg:SetActive(false)
|
||||
-- Util.SetGray(self.refreshBtn, false)
|
||||
-- self.timer:Stop()
|
||||
-- self.timer = nil
|
||||
-- end
|
||||
-- timeDown = timeDown - 1
|
||||
-- end, 1, -1, true)
|
||||
-- self.timer:Start()
|
||||
-- else
|
||||
-- isRefresh = true
|
||||
-- Util.SetGray(self.refreshBtn, false)
|
||||
-- self.refreshTimeBg:SetActive(false)
|
||||
-- end
|
||||
-- end
|
||||
-- --展示所有祈福奖励
|
||||
-- function this.ShowRewardDataList()
|
||||
-- this:OnShowExtraRewar()
|
||||
-- this:SetRemainTime()
|
||||
-- for i = 1, #PrayManager.patyRewardData do
|
||||
-- local patyRewardData = PrayManager.patyRewardData[i]
|
||||
-- this:ShowSingleRewardData(false,RewardParentGrid[i],RewardItemGrid[i],patyRewardData,true)
|
||||
-- --if allGetRewardNum > 0 then
|
||||
-- -- local patyPreviewRewardData = PrayManager.patyPreviewRewardData[i]
|
||||
-- -- this:ShowSingleRewardData(false,yunLanRewardParentGrid[i],yunLanRewardItemGrid[i],patyPreviewRewardData,false)
|
||||
-- --end
|
||||
-- end
|
||||
-- --累计奖励
|
||||
-- --for i = 1, #PrayManager.extraRewardData do
|
||||
-- -- local patyRewardData = PrayManager.extraRewardData[i]
|
||||
-- -- this:ShowSingleExtraRewardData(false,extraRewardParentGrid[i],extraRewardItemGrid[i],patyRewardData)
|
||||
-- --end
|
||||
-- end
|
||||
-- --展示单个祈福奖励
|
||||
-- function PrayMainPanel:ShowSingleRewardData(_isGet,_parentGo,_go,patyRewardData,isClick)
|
||||
-- local PreciousShow = 0
|
||||
-- if patyRewardData.rewardId > 0 then
|
||||
-- local BlessingRewardPoolData = ConfigManager.GetConfigData(ConfigName.BlessingRewardPool,patyRewardData.rewardId)
|
||||
-- if BlessingRewardPoolData then
|
||||
-- PreciousShow = BlessingRewardPoolData.PreciousShow
|
||||
-- end
|
||||
-- end
|
||||
-- local _reward = {patyRewardData.itemId,patyRewardData.num,PreciousShow}
|
||||
-- --Log("item 信息 "..patyRewardData.itemId.." "..patyRewardData.num)
|
||||
-- local _state = patyRewardData.state
|
||||
-- local itemParent = Util.GetGameObject(_parentGo.transform, "itemParent")
|
||||
-- local getBtn = Util.GetGameObject(_parentGo.transform, "getBtn")
|
||||
-- local wenhaoBtn
|
||||
-- local addImage
|
||||
-- if isClick then
|
||||
-- wenhaoBtn = Util.GetGameObject(_parentGo.transform, "wenhaoBtn")
|
||||
-- addImage = Util.GetGameObject(_parentGo.transform, "addImage")
|
||||
-- wenhaoBtn:SetActive(false)
|
||||
-- addImage:SetActive(false)
|
||||
-- end
|
||||
-- getBtn:SetActive(false)
|
||||
-- itemParent:SetActive(false)
|
||||
-- if _state == 0 then--0未保存无物品 1 未保存有物品 2 已选择 3 已祈福
|
||||
-- if isClick then
|
||||
-- addImage:SetActive(true)
|
||||
-- end
|
||||
-- elseif _state == 1 then
|
||||
-- itemParent:SetActive(true)
|
||||
-- if isClick then
|
||||
-- _go:OnOpen(_isGet,_reward,1)
|
||||
-- else
|
||||
-- _go:OnOpen(_isGet,_reward,1,true)
|
||||
-- end
|
||||
-- elseif _state == 2 then
|
||||
-- if isClick then
|
||||
-- wenhaoBtn:SetActive(true)
|
||||
-- else
|
||||
-- itemParent:SetActive(true)
|
||||
-- if isClick then
|
||||
-- _go:OnOpen(_isGet,_reward,1)
|
||||
-- else
|
||||
-- _go:OnOpen(_isGet,_reward,1,true)
|
||||
-- end
|
||||
-- end
|
||||
-- elseif _state == 3 then
|
||||
-- itemParent:SetActive(true)
|
||||
-- if isClick then
|
||||
-- _go:OnOpen(_isGet,_reward,1)
|
||||
-- else
|
||||
-- _go:OnOpen(_isGet,_reward,1,true)
|
||||
-- end
|
||||
-- getBtn:SetActive(true)
|
||||
-- end
|
||||
-- Util.AddOnceClick(addImage, function()
|
||||
-- if isPlayAinEnd == false then
|
||||
-- return
|
||||
-- end
|
||||
-- if isClick then
|
||||
-- UIManager.OpenPanel(UIName.PraySelectRewardPanel,this)
|
||||
-- end
|
||||
-- end)
|
||||
-- if isClick then
|
||||
-- Util.AddOnceClick(wenhaoBtn, function()
|
||||
-- if BagManager.GetItemCountById(itemData.Id) < itemNum then
|
||||
-- --PopupTipPanel.ShowTip("材料不足")
|
||||
-- --功能快捷购买
|
||||
-- UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = UpViewRechargeType.LightRing })
|
||||
-- return
|
||||
-- end
|
||||
-- if isPlayAinEnd == false then
|
||||
-- return
|
||||
-- end
|
||||
-- MsgPanel.ShowTwo(Language[11639]..itemNum..Language[10200]..GetLanguageStrById(itemData.Name), nil ,function ()
|
||||
-- NetManager.GetSinglePrayRewardRequest(patyRewardData.id, function (_msg)
|
||||
-- isPlayAinEnd = false
|
||||
-- PrayManager.SetPatySingleRewardData(patyRewardData.id,_msg.chooseRewardId)
|
||||
-- PlayUIAnim(_parentGo)
|
||||
-- Timer.New(function ()
|
||||
-- this.ShowRewardDataList()
|
||||
-- end, 0.2):Start()
|
||||
-- Timer.New(function ()
|
||||
-- UIManager.OpenPanel(UIName.PrayRewardItemPopup,_msg.reward,allGetFinishRewardNum,_msg.chooseRewardId,function()
|
||||
-- -- self:CheckGetMaxReward()
|
||||
-- end)
|
||||
-- isPlayAinEnd = true
|
||||
-- end, 0.4):Start()
|
||||
-- end)
|
||||
-- end)
|
||||
-- end)
|
||||
-- end
|
||||
-- end
|
||||
-- --检测祈福是否满16 满会自动刷新
|
||||
-- -- function PrayMainPanel:CheckGetMaxReward()
|
||||
-- -- local allGetFinishRewardNums = 0
|
||||
-- -- for i = 1, #PrayManager.patyRewardData do
|
||||
-- -- if PrayManager.patyRewardData[i].state >= 3 then
|
||||
-- -- allGetFinishRewardNums = allGetFinishRewardNums + 1
|
||||
-- -- end
|
||||
-- -- end
|
||||
-- -- LogYellow("allGetFinishRewardNums "..allGetFinishRewardNums)
|
||||
-- -- if allGetFinishRewardNums >= 16 then
|
||||
-- -- local isRefreshConFig = blessingConfig[1].IsRefresh
|
||||
-- -- if isRefreshConFig == 1 then
|
||||
-- -- MsgPanel.ShowOne("本轮祈福已全部完成,奖池刷新并重置开启次数。", function ()
|
||||
-- -- NetManager.InitPrayDataRequest(function (_msg)
|
||||
-- -- PrayManager.ResetPatyRewardData(_msg)
|
||||
-- -- this.ShowRewardDataList()
|
||||
-- -- end)
|
||||
-- -- end)
|
||||
-- -- return
|
||||
-- -- end
|
||||
-- -- end
|
||||
-- -- end
|
||||
-- --展示额外奖励
|
||||
-- function PrayMainPanel:OnShowExtraRewar()
|
||||
-- --额外奖励赋值
|
||||
-- allGetFinishRewardNum = PrayManager.GetCount()
|
||||
-- allGetRewardNum = 0
|
||||
-- for i = 1, #PrayManager.patyRewardData do
|
||||
-- -- if PrayManager.patyRewardData[i].state >= 3 then
|
||||
-- -- allGetFinishRewardNum = allGetFinishRewardNum + 1
|
||||
-- -- end
|
||||
-- if PrayManager.patyRewardData[i].state >= 2 then
|
||||
-- allGetRewardNum = allGetRewardNum + 1
|
||||
-- end
|
||||
-- end
|
||||
-- local curGetExtraRewarData = {}
|
||||
-- local upGetExtraRewarData = 0
|
||||
-- for i = 1, #PrayManager.extraRewardData do
|
||||
-- if allGetFinishRewardNum < PrayManager.extraRewardData[i].extraRewardCount then
|
||||
-- curGetExtraRewarData = PrayManager.extraRewardData[i]
|
||||
-- break
|
||||
-- end
|
||||
-- end
|
||||
-- for i = 1, #PrayManager.extraRewardData do
|
||||
-- if allGetFinishRewardNum >= PrayManager.extraRewardData[i].extraRewardCount then
|
||||
-- upGetExtraRewarData = PrayManager.extraRewardData[i].extraRewardCount
|
||||
-- end
|
||||
-- end
|
||||
-- --抽取消耗的材料赋值
|
||||
-- itemId = blessingConFigData[1][1]
|
||||
-- itemNum = CalculateCostCount(allGetFinishRewardNum + 1, blessingConFigData[2])
|
||||
-- itemData = ConfigManager.GetConfigData(ConfigName.ItemConfig,itemId)
|
||||
-- self.tishiText3:SetActive(false)
|
||||
-- self.tishiText:SetActive(false)
|
||||
-- self.tishiText2:SetActive(false)
|
||||
-- --Log("allGetFinishRewardNum "..allGetFinishRewardNum)
|
||||
-- self.allPrayNum.text = Language[11640]..allGetFinishRewardNum
|
||||
-- if allGetRewardNum > 0 then
|
||||
-- self.yulanBtn:SetActive(true)
|
||||
-- self.tishiText:SetActive(false)
|
||||
-- if allGetFinishRewardNum >= 16 then
|
||||
-- self.tishiText3:SetActive(true)
|
||||
-- else
|
||||
-- self.tishiText2:SetActive(true)
|
||||
-- self.tishiText2Text.text = Language[11641]..itemNum..Language[10200]
|
||||
-- self.tishiText2Image.sprite = this.spLoader:LoadSprite(GetResourcePath(itemData.ResourceID))
|
||||
-- end
|
||||
-- else
|
||||
-- self.yulanBtn:SetActive(false)
|
||||
-- self.tishiText2:SetActive(false)
|
||||
-- self.tishiText3:SetActive(false)
|
||||
-- self.tishiText:SetActive(true)
|
||||
-- end
|
||||
-- if curGetExtraRewarData and curGetExtraRewarData.itemId then
|
||||
-- self.extraRewardGo:SetActive(true)
|
||||
-- Util.ClearChild(self.extraRewardParent.transform)
|
||||
-- SubUIManager.Open(SubUIConfig.ItemView, self.extraRewardParent.transform,false,{curGetExtraRewarData.itemId,curGetExtraRewarData.num},1,false)
|
||||
-- self.extraRewardNameText.text = GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,curGetExtraRewarData.itemId).Name)
|
||||
-- self.extraRewardExp.value= (allGetFinishRewardNum)/(curGetExtraRewarData.extraRewardCount)
|
||||
-- self.extraRewardExpText.text =(allGetFinishRewardNum).."/"..(curGetExtraRewarData.extraRewardCount)
|
||||
-- else
|
||||
-- self.extraRewardGo:SetActive(false)
|
||||
-- end
|
||||
-- end
|
||||
-- --展示单个额外奖励
|
||||
-- function PrayMainPanel:ShowSingleExtraRewardData(_isGet,_parentGo,_go,patyRewardData)
|
||||
-- local numText = Util.GetGameObject(_parentGo.transform, "numText/Text"):GetComponent("Text")
|
||||
-- local _reward = {patyRewardData.itemId,patyRewardData.num}
|
||||
-- _go:OnOpen(_isGet,_reward,0.9)
|
||||
-- numText.text = patyRewardData.extraRewardCount
|
||||
-- end
|
||||
-- --刷新按钮事件
|
||||
-- function PrayMainPanel:RefreshBtnClick()
|
||||
-- local allGetFinishRewardNums = 0
|
||||
-- for i = 1, #PrayManager.patyRewardData do
|
||||
-- if PrayManager.patyRewardData[i].state >= 3 then
|
||||
-- allGetFinishRewardNums = allGetFinishRewardNums + 1
|
||||
-- end
|
||||
-- end
|
||||
-- LogYellow("allGetFinishRewardNums "..allGetFinishRewardNums)
|
||||
-- if allGetFinishRewardNums >= 16 then
|
||||
-- local isRefreshConFig = blessingConfig[1].IsRefresh
|
||||
-- if isRefreshConFig == 1 then
|
||||
-- MsgPanel.ShowOne("本轮祈福已全部完成,奖池刷新并重置开启次数。", function ()
|
||||
-- NetManager.InitPrayDataRequest(function (_msg)
|
||||
-- PrayManager.ResetPatyRewardData(_msg)
|
||||
-- this.ShowRewardDataList()
|
||||
-- end)
|
||||
-- if allGetFinishRewardNums == 16 then
|
||||
-- NetManager.ResetAllPrayRewardRequest(function (_msg)
|
||||
-- PrayManager.ResetPatyRewardData(_msg)
|
||||
-- -- PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeId, 1)
|
||||
-- this.ShowRewardDataList()
|
||||
-- end)
|
||||
-- else
|
||||
-- MsgPanel.ShowTwo(Language[11642], nil ,function ()
|
||||
-- NetManager.ResetAllPrayRewardRequest(function (_msg)
|
||||
-- PrayManager.ResetPatyRewardData(_msg)
|
||||
-- -- PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeId, 1)
|
||||
-- this.ShowRewardDataList()
|
||||
-- end)
|
||||
-- return
|
||||
-- end
|
||||
-- end)
|
||||
-- end
|
||||
|
||||
-- -- local isRefreshConFig = blessingConfig[1].IsRefresh
|
||||
-- -- local privilegeId = blessingConfig[1].RefreshCd
|
||||
-- -- if isRefreshConFig == 0 then
|
||||
-- -- PopupTipPanel.ShowTip("活动不可刷新")
|
||||
-- -- return
|
||||
-- -- end
|
||||
-- -- if isRefresh == false then
|
||||
-- -- PopupTipPanel.ShowTip("当前时间不可刷新")
|
||||
-- -- return
|
||||
-- -- end
|
||||
|
||||
-- end
|
||||
-- --界面关闭时调用(用于子类重写)
|
||||
-- function PrayMainPanel:OnClose()
|
||||
|
||||
-- if self.timer then
|
||||
-- self.timer:Stop()
|
||||
-- self.timer = nil
|
||||
-- end
|
||||
-- end
|
||||
--展示额外奖励
|
||||
function PrayMainPanel:OnShowExtraRewar()
|
||||
--额外奖励赋值
|
||||
allGetFinishRewardNum = PrayManager.GetCount()
|
||||
allGetRewardNum = 0
|
||||
for i = 1, #PrayManager.patyRewardData do
|
||||
-- if PrayManager.patyRewardData[i].state >= 3 then
|
||||
-- allGetFinishRewardNum = allGetFinishRewardNum + 1
|
||||
-- end
|
||||
if PrayManager.patyRewardData[i].state >= 2 then
|
||||
allGetRewardNum = allGetRewardNum + 1
|
||||
end
|
||||
end
|
||||
local curGetExtraRewarData = {}
|
||||
local upGetExtraRewarData = 0
|
||||
for i = 1, #PrayManager.extraRewardData do
|
||||
if allGetFinishRewardNum < PrayManager.extraRewardData[i].extraRewardCount then
|
||||
curGetExtraRewarData = PrayManager.extraRewardData[i]
|
||||
break
|
||||
end
|
||||
end
|
||||
for i = 1, #PrayManager.extraRewardData do
|
||||
if allGetFinishRewardNum >= PrayManager.extraRewardData[i].extraRewardCount then
|
||||
upGetExtraRewarData = PrayManager.extraRewardData[i].extraRewardCount
|
||||
end
|
||||
end
|
||||
--抽取消耗的材料赋值
|
||||
itemId = blessingConFigData[1][1]
|
||||
itemNum = CalculateCostCount(allGetFinishRewardNum + 1, blessingConFigData[2])
|
||||
itemData = ConfigManager.GetConfigData(ConfigName.ItemConfig,itemId)
|
||||
self.tishiText3:SetActive(false)
|
||||
self.tishiText:SetActive(false)
|
||||
self.tishiText2:SetActive(false)
|
||||
--Log("allGetFinishRewardNum "..allGetFinishRewardNum)
|
||||
self.allPrayNum.text = Language[11640]..allGetFinishRewardNum
|
||||
if allGetRewardNum > 0 then
|
||||
self.yulanBtn:SetActive(true)
|
||||
self.tishiText:SetActive(false)
|
||||
if allGetFinishRewardNum >= 16 then
|
||||
self.tishiText3:SetActive(true)
|
||||
else
|
||||
self.tishiText2:SetActive(true)
|
||||
self.tishiText2Text.text = Language[11641]..itemNum..Language[10200]
|
||||
self.tishiText2Image.sprite = this.spLoader:LoadSprite(GetResourcePath(itemData.ResourceID))
|
||||
end
|
||||
else
|
||||
self.yulanBtn:SetActive(false)
|
||||
self.tishiText2:SetActive(false)
|
||||
self.tishiText3:SetActive(false)
|
||||
self.tishiText:SetActive(true)
|
||||
end
|
||||
if curGetExtraRewarData and curGetExtraRewarData.itemId then
|
||||
self.extraRewardGo:SetActive(true)
|
||||
Util.ClearChild(self.extraRewardParent.transform)
|
||||
SubUIManager.Open(SubUIConfig.ItemView, self.extraRewardParent.transform,false,{curGetExtraRewarData.itemId,curGetExtraRewarData.num},1,false)
|
||||
self.extraRewardNameText.text = GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ItemConfig,curGetExtraRewarData.itemId).Name)
|
||||
self.extraRewardExp.value= (allGetFinishRewardNum)/(curGetExtraRewarData.extraRewardCount)
|
||||
self.extraRewardExpText.text =(allGetFinishRewardNum).."/"..(curGetExtraRewarData.extraRewardCount)
|
||||
else
|
||||
self.extraRewardGo:SetActive(false)
|
||||
end
|
||||
end
|
||||
--展示单个额外奖励
|
||||
function PrayMainPanel:ShowSingleExtraRewardData(_isGet,_parentGo,_go,patyRewardData)
|
||||
local numText = Util.GetGameObject(_parentGo.transform, "numText/Text"):GetComponent("Text")
|
||||
local _reward = {patyRewardData.itemId,patyRewardData.num}
|
||||
_go:OnOpen(_isGet,_reward,0.9)
|
||||
numText.text = patyRewardData.extraRewardCount
|
||||
end
|
||||
--刷新按钮事件
|
||||
function PrayMainPanel:RefreshBtnClick()
|
||||
local allGetFinishRewardNums = 0
|
||||
for i = 1, #PrayManager.patyRewardData do
|
||||
if PrayManager.patyRewardData[i].state >= 3 then
|
||||
allGetFinishRewardNums = allGetFinishRewardNums + 1
|
||||
end
|
||||
end
|
||||
if allGetFinishRewardNums == 16 then
|
||||
NetManager.ResetAllPrayRewardRequest(function (_msg)
|
||||
PrayManager.ResetPatyRewardData(_msg)
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeId, 1)
|
||||
this.ShowRewardDataList()
|
||||
end)
|
||||
else
|
||||
MsgPanel.ShowTwo(Language[11642], nil ,function ()
|
||||
NetManager.ResetAllPrayRewardRequest(function (_msg)
|
||||
PrayManager.ResetPatyRewardData(_msg)
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeId, 1)
|
||||
this.ShowRewardDataList()
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
-- local isRefreshConFig = blessingConfig[1].IsRefresh
|
||||
-- local privilegeId = blessingConfig[1].RefreshCd
|
||||
-- if isRefreshConFig == 0 then
|
||||
-- PopupTipPanel.ShowTip("活动不可刷新")
|
||||
-- return
|
||||
-- end
|
||||
-- if isRefresh == false then
|
||||
-- PopupTipPanel.ShowTip("当前时间不可刷新")
|
||||
-- return
|
||||
-- end
|
||||
-- -- 将时间戳转换为用于显示的日期字符串(年月日)
|
||||
-- function PrayMainPanel:TimeStampToDateStr2(timestamp)
|
||||
-- local date = os.date("*t", timestamp)
|
||||
-- --local year = string.sub(date.year,3,4)
|
||||
-- return string.format(Language[11643], date.year, date.month, date.day)
|
||||
-- end
|
||||
-- function this.ShowAnimationAndRefreshData()
|
||||
-- PlayUIAnim(this.RewardGrid)
|
||||
-- Timer.New(function ()
|
||||
-- this.ShowRewardDataList()
|
||||
-- PlayUIAnimBack(this.RewardGrid)
|
||||
-- end, 0.8):Start()
|
||||
-- end
|
||||
-- --界面销毁时调用(用于子类重写)
|
||||
-- function PrayMainPanel:OnDestroy()
|
||||
-- this.spLoader:Destroy()
|
||||
|
||||
end
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function PrayMainPanel:OnClose()
|
||||
-- SubUIManager.Close(self.UpView)
|
||||
-- end
|
||||
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- 将时间戳转换为用于显示的日期字符串(年月日)
|
||||
function PrayMainPanel:TimeStampToDateStr2(timestamp)
|
||||
local date = os.date("*t", timestamp)
|
||||
--local year = string.sub(date.year,3,4)
|
||||
return string.format(Language[11643], date.year, date.month, date.day)
|
||||
end
|
||||
function this.ShowAnimationAndRefreshData()
|
||||
PlayUIAnim(this.RewardGrid)
|
||||
Timer.New(function ()
|
||||
this.ShowRewardDataList()
|
||||
PlayUIAnimBack(this.RewardGrid)
|
||||
end, 0.8):Start()
|
||||
end
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function PrayMainPanel:OnDestroy()
|
||||
this.spLoader:Destroy()
|
||||
|
||||
SubUIManager.Close(self.UpView)
|
||||
end
|
||||
|
||||
return PrayMainPanel
|
||||
-- return PrayMainPanel
|
|
@ -0,0 +1,114 @@
|
|||
RecruitTreasureManager = {}
|
||||
local this = RecruitTreasureManager
|
||||
local summonTreasure = ConfigManager.GetConfig(ConfigName.SummonTreasure)
|
||||
local configs = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityGroups,"PageType",ActivityTypeDef.RecruitTreasure)
|
||||
|
||||
function this.Initialize()
|
||||
this.treasureData = {}
|
||||
end
|
||||
|
||||
function this.GetRecruitTreasureData(actId,goodsId)
|
||||
if not this.treasureData[actId] then
|
||||
this.treasureData[actId] = {}
|
||||
this.treasureData[actId] = this.GetConfigDataByActId(actId)
|
||||
end
|
||||
local actData = ActivityGiftManager.GetActivityInfoByType(actId)
|
||||
if actData then
|
||||
for i = 1,#actData.mission do
|
||||
if this.treasureData[actId][actData.mission[i].missionId] then
|
||||
this.treasureData[actId][actData.mission[i].missionId].state = actData.mission[i].state -- -1 完美领取 1 已领取
|
||||
else
|
||||
LogError(string.format("招募秘宝%s中有一个不存在的missionId%s",actId,actData.mission[i].missionId))
|
||||
end
|
||||
end
|
||||
for k,v in ipairs(this.treasureData[actId]) do
|
||||
if v.state == 0 then
|
||||
if actData.value >= v.cout then
|
||||
v.state = 2
|
||||
end
|
||||
elseif v.state == 1 then
|
||||
if this.CheckIsBuyTreasureByGoodsId(goodsId) then
|
||||
v.state = 3
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return this.treasureData[actId]
|
||||
end
|
||||
|
||||
function this.CheckIsBuyTreasureByGoodsId(goodsId)
|
||||
local goodsInfo = OperatingManager.GetGiftGoodsInfo(GoodsTypeDef.RecruiteTreasure,goodsId)
|
||||
LogGreen("goodsInfo.isBought:"..tostring(goodsInfo.isBought))
|
||||
return goodsInfo.isBought > 0
|
||||
end
|
||||
|
||||
function this.GetConfigDataByActId(actId)
|
||||
local data = {}
|
||||
local configs = ConfigManager.GetAllConfigsDataByKey(ConfigName.SummonTreasure,"Grade",actId)
|
||||
for i = 1,#configs do
|
||||
if not data[i] then
|
||||
data[i] = {}
|
||||
end
|
||||
data[i].missionId = configs[i].Id
|
||||
data[i].cout = configs[i].Count
|
||||
data[i].reward = {}
|
||||
if configs[i].Reward then
|
||||
for j = 1,#configs[i].Reward do
|
||||
table.insert(data[i].reward,{id = configs[i].Reward[j][1],num = configs[i].Reward[j][2],type = 1})
|
||||
end
|
||||
end
|
||||
if configs[i].TreasureReward then
|
||||
for j = 1,#configs[i].TreasureReward do
|
||||
table.insert(data[i].reward,{id = configs[i].TreasureReward[j][1],num = configs[i].TreasureReward[j][2],type = 2})
|
||||
end
|
||||
end
|
||||
data[i].state = 0 -- -1 完美领取 1 已领取 2 未领取过可领取 3 领取过可完美领取 0 未达成
|
||||
end
|
||||
return data
|
||||
end
|
||||
|
||||
function this.GetAllRewardData(actId,goodsId)
|
||||
local rewardData = {}
|
||||
local rewardData1 = {}
|
||||
local actData = ActivityGiftManager.GetActivityInfoByType(actId)
|
||||
local data = this.GetRecruitTreasureData(actId,goodsId)
|
||||
for k,v in ipairs(data) do
|
||||
--0 未达成 3 可再次领取 2 可领取 1 已领取 -1 完美领取(充钱领取过的)
|
||||
if v.reward then
|
||||
for n,m in ipairs(v.reward) do
|
||||
if m.type == 2 then
|
||||
table.insert(rewardData1,m)
|
||||
if actData.value >= v.cout then
|
||||
table.insert(rewardData,m)
|
||||
end
|
||||
else
|
||||
if (v.state == 0 or v.state == 2) and actData.value >= v.cout then
|
||||
table.insert(rewardData,m)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return rewardData,rewardData1
|
||||
end
|
||||
|
||||
function this.GetRedPointStatus(red)
|
||||
local actId,goodId = 0
|
||||
for i = 1,#configs do
|
||||
if configs[i].RpType == red then
|
||||
actId = configs[i].ActId
|
||||
goodId = configs[i].ShopData[1][1]
|
||||
break
|
||||
end
|
||||
end
|
||||
LogGreen("actId:"..actId.." goodId:"..goodId)
|
||||
local data = this.GetRecruitTreasureData(actId,goodId)
|
||||
for i = 1,#data do
|
||||
if data[i].state == 2 or data[i].state == 3 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
return this
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4eab92a65ae91a2438c4910ac8e54def
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,328 @@
|
|||
local RecruitTreasurePanel = {}
|
||||
local this = RecruitTreasurePanel
|
||||
local sortingOrder = 0
|
||||
local redPointTypeList = {}
|
||||
local curPage = 0
|
||||
-- Tab管理器
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local configs = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityGroups,"PageType",ActivityTypeDef.RecruitTreasure)
|
||||
function RecruitTreasurePanel:New(gameObject)
|
||||
local b = {}
|
||||
b.gameObject = gameObject
|
||||
b.transform = gameObject.transform
|
||||
setmetatable(b, { __index = RecruitTreasurePanel })
|
||||
return b
|
||||
end
|
||||
local itemnum = 0
|
||||
--初始化组件(用于子类重写)
|
||||
|
||||
function RecruitTreasurePanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
this.quesBtn = Util.GetGameObject(self.transform, "bg/quesBtn")
|
||||
this.helpPosition=this.quesBtn:GetComponent("RectTransform").localPosition
|
||||
this.titleImage = Util.GetGameObject(self.transform, "bg/titleName"):GetComponent("Image")
|
||||
|
||||
this.buyBtn = Util.GetGameObject(self.transform, "bg/topBar/buyBtn")
|
||||
this.Text1 = Util.GetGameObject(this.buyBtn, "buy"):GetComponent("Text")
|
||||
this.tips = Util.GetGameObject(self.transform, "bg/topBar/tips"):GetComponent("Text")
|
||||
--Content
|
||||
this.scoreText = Util.GetGameObject(self.transform, "bg/pageContent/bg/score/number"):GetComponent("Text")
|
||||
|
||||
this.treasureList = Util.GetGameObject(self.transform, "bg/pageContent/treasureList")
|
||||
this.itemPre = Util.GetGameObject(self.transform, "bg/pageContent/itemPro")
|
||||
|
||||
--设置滚动条
|
||||
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView,this.treasureList.transform,this.itemPre,nil,Vector2.New(950, 1000),1,1,Vector2.New(100, 25))
|
||||
this.ScrollView.gameObject:GetComponent("RectTransform").anchoredPosition = Vector2.New(0, 0)
|
||||
this.ScrollView.gameObject:GetComponent("RectTransform").anchorMin = Vector2.New(0.5, 0.5)
|
||||
this.ScrollView.gameObject:GetComponent("RectTransform").anchorMax = Vector2.New(0.5, 0.5)
|
||||
this.ScrollView.gameObject:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
|
||||
this.ScrollView.moveTween.MomentumAmount = 1
|
||||
this.ScrollView.moveTween.Strength = 2
|
||||
|
||||
this.tabbox = Util.GetGameObject(self.gameObject, "bg/pageContent/tabbox")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function RecruitTreasurePanel:BindEvent()
|
||||
Util.AddClick(this.quesBtn,function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,this.actConfig.HelpId,this.helpPosition.x,this.helpPosition.y)
|
||||
end)
|
||||
|
||||
-- 初始化Tab管理器
|
||||
this.PageTabCtrl = TabBox.New()
|
||||
this.PageTabCtrl:SetTabAdapter(this.PageTabAdapter)
|
||||
this.PageTabCtrl:SetTabIsLockCheck(this.PageTabIsLockCheck)
|
||||
this.PageTabCtrl:SetChangeTabCallBack(this.OnPageTabChange)
|
||||
|
||||
end
|
||||
|
||||
function this.PageTabAdapter(tab, index, status)
|
||||
local img = Util.GetGameObject(tab, "img"):GetComponent("Image")
|
||||
local select = Util.GetGameObject(tab, "select"):GetComponent("Image")
|
||||
local tip = Util.GetGameObject(tab, "tip"):GetComponent("Text")
|
||||
local redpot = Util.GetGameObject(tab, "redpot")
|
||||
if status == "select" then
|
||||
select.gameObject:SetActive(true)
|
||||
else
|
||||
select.gameObject:SetActive(false)
|
||||
end
|
||||
tip.text = configs[index].Icon[1]
|
||||
if redPointTypeList[configs[index].RpType] then
|
||||
ClearRedPointObject(configs[index].RpType,redPointTypeList[configs[index].RpType])
|
||||
redPointTypeList[configs[index].RpType] = nil
|
||||
end
|
||||
if not configs[index].RpType or configs[index].RpType < 1 then
|
||||
redpot.gameObject:SetActive(false)
|
||||
else
|
||||
BindRedPointObject(configs[index].RpType,redpot)
|
||||
redPointTypeList[configs[index].RpType] = redpot
|
||||
end
|
||||
local data = ActivityGiftManager.GetActivityInfoByType(configs[index].ActId)
|
||||
if data then
|
||||
tab.gameObject:SetActive(true)
|
||||
else
|
||||
tab.gameObject:SetActive(false)
|
||||
end
|
||||
end
|
||||
|
||||
function this.PageTabIsLockCheck()
|
||||
return false
|
||||
end
|
||||
|
||||
function this.OnPageTabChange(index)
|
||||
curPage = index
|
||||
this:refresh()
|
||||
end
|
||||
|
||||
function RecruitTreasurePanel:OnSortingOrderChange()
|
||||
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function RecruitTreasurePanel:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.TreasureOfHeaven.RechargeSuccess,this.refresh,self)
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function RecruitTreasurePanel:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.TreasureOfHeaven.RechargeSuccess,this.refresh,self)
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function RecruitTreasurePanel:OnOpen(_activityConfig,_index,parent)
|
||||
this.actConfig = _activityConfig
|
||||
this.pageIndex = _index
|
||||
this.parent = parent
|
||||
end
|
||||
|
||||
-- 打开,重新打开时回调
|
||||
function RecruitTreasurePanel:OnShow(_sortingOrder)
|
||||
self.gameObject:SetActive(true)
|
||||
sortingOrder = _sortingOrder
|
||||
this.actType = this.actConfig.ActiveType > 0 and this.actConfig.ActiveType or this.actConfig.FunType
|
||||
this.titleImage.sprite = this.spLoader:LoadSprite(this.actConfig.Icon[3])
|
||||
|
||||
local activeNum = 0
|
||||
curPage = 0
|
||||
for i = 1,#configs do
|
||||
this.actData = ActivityGiftManager.GetActivityInfoByType(configs[i].ActId)
|
||||
if this.actData then
|
||||
activeNum = activeNum + 1
|
||||
if curPage < 1 then
|
||||
this.treasureData = RecruitTreasureManager.GetRecruitTreasureData(configs[i].ActId,configs[i].ShopData[1][1])
|
||||
for j = 1,#this.treasureData do
|
||||
if this.treasureData[j].state == 2 or this.treasureData[j].state == 3 then
|
||||
curPage = i
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if activeNum == 1 then
|
||||
this.tabbox.gameObject:SetActive(false)
|
||||
else
|
||||
this.tabbox.gameObject:SetActive(true)
|
||||
end
|
||||
if curPage < 1 then
|
||||
curPage = activeNum
|
||||
end
|
||||
this.actData = ActivityGiftManager.GetActivityInfoByType(configs[curPage].ActId)
|
||||
this.PageTabCtrl:Init(this.tabbox.gameObject, configs,curPage)
|
||||
end
|
||||
|
||||
function RecruitTreasurePanel:refresh()
|
||||
this.actId = configs[curPage].ActId
|
||||
this.tips.text = configs[curPage].TitleText
|
||||
this.isBuy = RecruitTreasureManager.CheckIsBuyTreasureByGoodsId(configs[curPage].ShopData[1][1])
|
||||
LogGreen("this.isBuy:"..tostring(this.isBuy))
|
||||
self:topBar()
|
||||
self:showTaskList()
|
||||
end
|
||||
|
||||
--topBar按钮状态
|
||||
function RecruitTreasurePanel:topBar()
|
||||
--设置礼包购买按钮状态
|
||||
this.buyBtn:GetComponent("Button").interactable = not this.isBuy
|
||||
this.Text1.text = not this.isBuy and "激活秘宝" or "已激活"
|
||||
Util.AddOnceClick(this.buyBtn,function()
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.HeavenUnlockExtraRewardPanel,configs[curPage].ShopData[1][2],configs[curPage].ActId)
|
||||
end)
|
||||
end
|
||||
|
||||
--任务列表
|
||||
function RecruitTreasurePanel:showTaskList(isTop,isAni)
|
||||
this.scoreText.text = this.actData.value
|
||||
if not this.itemsList then
|
||||
this.itemsList = {}
|
||||
end
|
||||
this.ScrollView:SetData(this.treasureData,function(index, rewardItem)
|
||||
self:SingleTask(rewardItem, this.treasureData[index])
|
||||
end,not isTop,not isAni)
|
||||
-- -1 完美领取 1 已领取 2 未领取过可领取 3 领取过可完美领取 0 未达成
|
||||
--定位打开界面时位置
|
||||
local t = 0
|
||||
for i = 1, #this.treasureData do
|
||||
if this.treasureData[i].state == 2 or this.treasureData[i].state == 3 then
|
||||
t = i
|
||||
break
|
||||
end
|
||||
end
|
||||
if t == 0 then
|
||||
for i = 1, #this.treasureData do
|
||||
if this.treasureData[i].state == 0 then
|
||||
t = i
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
this.ScrollView:SetIndex(t)
|
||||
end
|
||||
|
||||
--单个任务
|
||||
function RecruitTreasurePanel:SingleTask(rewardItem, singleData)
|
||||
local scoreLevel = Util.GetGameObject(rewardItem, "scoreLevel"):GetComponent("Text")
|
||||
local scroll1 = Util.GetGameObject(rewardItem, "scroll1")
|
||||
local scroll2 = Util.GetGameObject(rewardItem, "scroll2")
|
||||
if not this.itemsList[rewardItem] then
|
||||
this.itemsList[rewardItem] = {}
|
||||
end
|
||||
for k,v in pairs(this.itemsList[rewardItem]) do
|
||||
v.gameObject:SetActive(false)
|
||||
end
|
||||
for i = 1 ,#singleData.reward do
|
||||
local parent
|
||||
if singleData.reward[i].type == 1 then
|
||||
parent = scroll1
|
||||
else
|
||||
parent = scroll2
|
||||
end
|
||||
if not this.itemsList[rewardItem][i] then
|
||||
this.itemsList[rewardItem][i] = SubUIManager.Open(SubUIConfig.ItemView,parent.transform)
|
||||
end
|
||||
this.itemsList[rewardItem][i].transform:SetParent(parent.transform)
|
||||
this.itemsList[rewardItem][i].transform.localScale = Vector3.one
|
||||
this.itemsList[rewardItem][i].transform.localPosition = Vector3.zero
|
||||
this.itemsList[rewardItem][i].gameObject:SetActive(true)
|
||||
this.itemsList[rewardItem][i]:OnOpen(false, {singleData.reward[i].id, singleData.reward[i].num}, 0.8, false)
|
||||
end
|
||||
scoreLevel.text = singleData.cout
|
||||
--初始化按钮状态
|
||||
self:InitButtonState(rewardItem, singleData)
|
||||
end
|
||||
|
||||
--初始化按钮状态
|
||||
function RecruitTreasurePanel:InitButtonState(rewardItem, singleData)
|
||||
local btnDeal = Util.GetGameObject(rewardItem, "btnDeal")
|
||||
local get = Util.GetGameObject(rewardItem, "btnDeal/get")
|
||||
local getAgain = Util.GetGameObject(rewardItem, "btnDeal/getAgain")
|
||||
local unfinished = Util.GetGameObject(rewardItem, "btnDeal/unfinished")
|
||||
local finished = Util.GetGameObject(rewardItem, "finished")
|
||||
local redPoint = Util.GetGameObject(rewardItem, "btnDeal/redPoint")
|
||||
--当前任务领取情况
|
||||
local state = singleData.state
|
||||
--判断
|
||||
if state == 0 then
|
||||
btnDeal.gameObject:SetActive(true)
|
||||
get.gameObject:SetActive(false)
|
||||
getAgain.gameObject:SetActive(false)
|
||||
unfinished.gameObject:SetActive(true)
|
||||
finished.gameObject:SetActive(false)
|
||||
redPoint:SetActive(false)
|
||||
elseif state == 3 then
|
||||
btnDeal.gameObject:SetActive(true)
|
||||
get.gameObject:SetActive(false)
|
||||
getAgain.gameObject:SetActive(true)
|
||||
unfinished.gameObject:SetActive(false)
|
||||
finished.gameObject:SetActive(false)
|
||||
redPoint:SetActive(true)
|
||||
elseif state == 2 then
|
||||
btnDeal.gameObject:SetActive(true)
|
||||
get.gameObject:SetActive(true)
|
||||
getAgain.gameObject:SetActive(false)
|
||||
unfinished.gameObject:SetActive(false)
|
||||
finished.gameObject:SetActive(false)
|
||||
redPoint:SetActive(true)
|
||||
elseif state == 1 then
|
||||
btnDeal.gameObject:SetActive(true)
|
||||
get.gameObject:SetActive(false)
|
||||
getAgain.gameObject:SetActive(true)
|
||||
unfinished.gameObject:SetActive(false)
|
||||
finished.gameObject:SetActive(false)
|
||||
redPoint:SetActive(false)
|
||||
elseif state == -1 then
|
||||
btnDeal.gameObject:SetActive(false)
|
||||
get.gameObject:SetActive(false)
|
||||
getAgain.gameObject:SetActive(false)
|
||||
unfinished.gameObject:SetActive(false)
|
||||
finished.gameObject:SetActive(true)
|
||||
redPoint:SetActive(false)
|
||||
end
|
||||
--添加点击事件
|
||||
Util.AddOnceClick(btnDeal,function()
|
||||
self:OnBtnDealClicked(rewardItem,singleData)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
--按钮事件
|
||||
function RecruitTreasurePanel:OnBtnDealClicked(rewardItem,singleData)
|
||||
if singleData.state == 0 then
|
||||
PopupTipPanel.ShowTip(Language[11330])
|
||||
elseif singleData.state == 3 or singleData.state == 2 then
|
||||
NetManager.GetActivityRewardRequest(singleData.missionId,configs[curPage].ActId,function(msg)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg,1,function()
|
||||
--需要刷新界面
|
||||
if not this.isBuy then--判断是否已经购买了礼包
|
||||
singleData.state = 1
|
||||
else
|
||||
singleData.state = -1
|
||||
end
|
||||
self:SingleTask(rewardItem, singleData)
|
||||
--self:refresh()--刷新界面
|
||||
CheckRedPointStatus(configs[curPage].RpType)
|
||||
end)
|
||||
end)
|
||||
elseif singleData.state == 1 then
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.HeavenUnlockExtraRewardPanel,configs[curPage].ShopData[1][2],configs[curPage].ActId)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function RecruitTreasurePanel:OnClose()
|
||||
self.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function RecruitTreasurePanel:OnDestroy()
|
||||
this.spLoader:Destroy()
|
||||
this.itemsList = {}
|
||||
if this.ScrollView then
|
||||
SubUIManager.Close(this.ScrollView)
|
||||
this.ScrollView = nil
|
||||
end
|
||||
end
|
||||
|
||||
return RecruitTreasurePanel
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d33f2b3c81ae3a94fb33ef35333fbee1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue