天地烘炉提交
parent
cf971541e1
commit
1253466912
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bfd143034ae7afb49b12b187932a856f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -28532,23 +28532,31 @@ MonoBehaviour:
|
|||
extension: .mp3
|
||||
resPathIndex: 192
|
||||
resAbNameIndex: 490
|
||||
- resName: Audio_normal_effect_dao_attack
|
||||
- resName: Audio_normal_effect_dao3_hit
|
||||
extension: .mp3
|
||||
resPathIndex: 192
|
||||
resAbNameIndex: 490
|
||||
- resName: Audio_normal_effect_dao_hit
|
||||
- resName: Audio_normal_effect_fo_attack
|
||||
extension: .mp3
|
||||
resPathIndex: 192
|
||||
resAbNameIndex: 490
|
||||
- resName: Audio_normal_effect_yao1_attack
|
||||
- resName: Audio_normal_effect_fo_hit
|
||||
extension: .mp3
|
||||
resPathIndex: 192
|
||||
resAbNameIndex: 490
|
||||
- resName: Audio_normal_effect_yao_attack
|
||||
- resName: Audio_normal_effect_ren_attack
|
||||
extension: .mp3
|
||||
resPathIndex: 192
|
||||
resAbNameIndex: 490
|
||||
- resName: Audio_normal_effect_yao_hit
|
||||
- resName: Audio_normal_effect_ren_hit
|
||||
extension: .mp3
|
||||
resPathIndex: 192
|
||||
resAbNameIndex: 490
|
||||
- resName: Audio_normal_effect_yao3_attack
|
||||
extension: .mp3
|
||||
resPathIndex: 192
|
||||
resAbNameIndex: 490
|
||||
- resName: Audio_normal_effect_yao3_hit
|
||||
extension: .mp3
|
||||
resPathIndex: 192
|
||||
resAbNameIndex: 490
|
||||
|
|
@ -59200,6 +59208,10 @@ MonoBehaviour:
|
|||
extension: .prefab
|
||||
resPathIndex: 769
|
||||
resAbNameIndex: 3219
|
||||
- resName: page17
|
||||
extension: .prefab
|
||||
resPathIndex: 769
|
||||
resAbNameIndex: 3219
|
||||
- resName: TailsmanSoulMainPanel
|
||||
extension: .prefab
|
||||
resPathIndex: 769
|
||||
|
|
|
|||
|
|
@ -1170,7 +1170,8 @@ JumpType = {
|
|||
linglongBaojing = 10067,
|
||||
|
||||
JiTianHaoLi = 20014, --积天豪礼
|
||||
honglushop = 20274
|
||||
honglushop = 20274,
|
||||
fangcunxunbaoShop = 20275,
|
||||
}
|
||||
|
||||
NPCPosType={
|
||||
|
|
@ -1363,6 +1364,7 @@ ActivityTypeDef = {
|
|||
tiandihonglu = 74,
|
||||
|
||||
ContinueGift = 85, -- 连续礼包
|
||||
Incarnation = 86,
|
||||
}
|
||||
--活动结束需要处理面板关闭类型
|
||||
ActivityTypePanel = {
|
||||
|
|
@ -2523,6 +2525,7 @@ PRE_REWARD_POOL_TYPE = {
|
|||
LINGLONG = 17, --玲珑宝镜
|
||||
TIANDIHONGLU = 18,--天地洪炉
|
||||
TIANDIHONGLU_UP = 19,--天地洪炉
|
||||
Incarnation = 20,--变身卡
|
||||
}
|
||||
DirectBuyType = {
|
||||
XSHL = 11,--限时豪礼
|
||||
|
|
|
|||
|
|
@ -509,4 +509,5 @@ SubUIConfig = {
|
|||
[33] = {name = "XunBaoMiZongPanel",assetName = "XunBaoMiZongPanel",script = "Modules/XunBaoMiZong/XunBaoMiZongPanel"},--寻宝迷踪
|
||||
[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"},
|
||||
}
|
||||
|
|
@ -139,7 +139,7 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
this.CheckMoneyProgress(v)
|
||||
this.mission[v.activityId] = v
|
||||
|
||||
-- LogYellow("刷新活动数据activityId:" .. v.activityId .. " value:" .. v.value)
|
||||
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)
|
||||
if (v.activityId == ActivityTypeDef.OnlineGift) then
|
||||
|
|
|
|||
|
|
@ -123,7 +123,12 @@ function this:OnShow(_parent,_Data)
|
|||
for k,v in pairs(souls) do
|
||||
table.insert(newList,{Reward = {v,1},WeightShow = itemList[k].WeightShow})
|
||||
end
|
||||
LogGreen("#newList:"..#newList)
|
||||
UpItemList = newList
|
||||
elseif activityType == ActivityTypeDef.Incarnation then
|
||||
this.secondTitle.text="变身卡自选箱"
|
||||
local newList = {}
|
||||
itemList = RecruitManager.GetRewardPreviewData(poolType)
|
||||
table.insert(newList,{Reward = {itemList[1].Reward[1],1},WeightShow = itemList[1].WeightShow})
|
||||
UpItemList = newList
|
||||
else
|
||||
UpItemList = RecruitManager.GetRewardPreviewData(poolUpType)
|
||||
|
|
@ -159,6 +164,7 @@ end
|
|||
|
||||
local hero
|
||||
|
||||
--活动类型 所有抽卡 up
|
||||
function this:BuildRateData(actType,UpItem,upItemList)
|
||||
local rateList = {}
|
||||
local _upRateList = {}
|
||||
|
|
@ -203,6 +209,12 @@ function this:BuildRateData(actType,UpItem,upItemList)
|
|||
table.insert(_upRateList,{id = m.Reward[1],tag = "法宝碎片UP!", name=itemConfig.Name,value = m.WeightShow,color = "AD4152"})
|
||||
end
|
||||
rateList = this:RefreshSoulRate(UpItem,_upRateList,ItemType.talismanSoulChip)
|
||||
elseif actType == ActivityTypeDef.Incarnation then
|
||||
for n,m in ipairs(upItemList) do
|
||||
local itemConfig=ConfigManager.TryGetConfigData(ConfigName.ItemConfig, m.Reward[1])
|
||||
table.insert(_upRateList,{id = m.Reward[1],tag = "终极大奖!", name=itemConfig.Name,value = m.WeightShow,color = "AD4152"})
|
||||
end
|
||||
rateList = this:RefreshIncarnationRate(UpItem,_upRateList,ItemType.Incarnation)
|
||||
end
|
||||
|
||||
for k,v in ipairs(this.ratePreList) do
|
||||
|
|
@ -226,6 +238,20 @@ function this:BuildRateData(actType,UpItem,upItemList)
|
|||
return _upRateList,rateList
|
||||
end
|
||||
|
||||
function this:RefreshIncarnationRate(UpItem,_upRateList,itemType)
|
||||
local rateList = {}
|
||||
for k,v in ipairs(_upRateList) do
|
||||
for n,m in ipairs(UpItem) do
|
||||
if v.id == m.Reward[1] then
|
||||
table.insert(rateList,v)
|
||||
else
|
||||
table.insert(rateList,{tag=itemConfig[m.Reward[1]].Name,name=string.format("%s×%s",itemConfig[m.Reward[1]].Name,m.Reward[2]),value = m.WeightShow,color = "BDB69C"})
|
||||
end
|
||||
end
|
||||
end
|
||||
return rateList
|
||||
end
|
||||
|
||||
--通用计算权重功能
|
||||
function this:ReculateRate(list)
|
||||
local weight=0
|
||||
|
|
|
|||
|
|
@ -0,0 +1,354 @@
|
|||
|
||||
local IncarnationLottery = {}
|
||||
local sortingOrder = 0
|
||||
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local artConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
|
||||
local lotterySetting=ConfigManager.GetConfig(ConfigName.LotterySetting)
|
||||
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
|
||||
local lotterySpecialConfig = ConfigManager.GetConfig(ConfigName.LotterySpecialConfig)
|
||||
local wishSoulData
|
||||
function IncarnationLottery:New(gameObject)
|
||||
local b = {}
|
||||
b.gameObject = gameObject
|
||||
b.transform = gameObject.transform
|
||||
setmetatable(b, { __index = IncarnationLottery })
|
||||
return b
|
||||
end
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function IncarnationLottery:InitComponent()
|
||||
self.spLoader = SpriteLoader.New()
|
||||
self.btnHelp= Util.GetGameObject(self.gameObject,"help")
|
||||
self.helpPosition=self.btnHelp:GetComponent("RectTransform").localPosition
|
||||
|
||||
self.limit = Util.GetGameObject(self.gameObject,"limitdi/limit"):GetComponent("Text")
|
||||
|
||||
--rightUp
|
||||
self.rightUp = Util.GetGameObject(self.gameObject,"rightUp")
|
||||
self.btnReward = Util.GetGameObject(self.rightUp,"reward")
|
||||
self.btnStore = Util.GetGameObject(self.rightUp,"store")
|
||||
self.btnGift = Util.GetGameObject(self.rightUp,"gift")
|
||||
self.btns = {}
|
||||
for i = 1 , 2 do
|
||||
self.btns[i] = {}
|
||||
self.btns[i].btn = Util.GetGameObject(self.rightUp,"btn"..i)
|
||||
self.btns[i].red = Util.GetGameObject(self.btns[i].btn.gameObject,"redPoint")
|
||||
self.btns[i].info = Util.GetGameObject(self.btns[i].btn.gameObject,"layout/Text"):GetComponent("Text")
|
||||
self.btns[i].icon = Util.GetGameObject(self.btns[i].btn.gameObject,"layout/icon"):GetComponent("Image")
|
||||
self.btns[i].num = Util.GetGameObject(self.btns[i].btn.gameObject,"layout/num"):GetComponent("Text")
|
||||
end
|
||||
self.btnTime = Util.GetGameObject(self.btns[1].btn,"di1/time"):GetComponent("Text")
|
||||
|
||||
--center
|
||||
self.center = Util.GetGameObject(self.gameObject,"center/TurnTable/itemlist")
|
||||
self.icons = {}
|
||||
for i = 1 , 12 do
|
||||
self.icons[i] = {}
|
||||
self.icons[i].go = Util.GetGameObject(self.center,"item"..i)
|
||||
self.icons[i].pre = Util.GetGameObject(self.icons[i].go,"pre")
|
||||
self.icons[i].kuang = Util.GetGameObject(self.icons[i].pre,"itemPos")
|
||||
self.icons[i].icon = Util.GetGameObject(self.icons[i].pre,"icon"):GetComponent("Image")
|
||||
self.icons[i].num = Util.GetGameObject(self.icons[i].pre,"numDi/Text"):GetComponent("Text")
|
||||
end
|
||||
|
||||
self.updateTimes = Util.GetGameObject(self.gameObject,"updateTimes")
|
||||
--self.updateTimesTip = Util.GetGameObject(self.updateTimes,"Text"):GetComponent("Text")
|
||||
self.updateTimesTip1 = Util.GetGameObject(self.updateTimes,"Text1"):GetComponent("Text")
|
||||
self.mask = Util.GetGameObject(self.gameObject,"mask")
|
||||
|
||||
self._last = 0
|
||||
self._cyclesNum = 10
|
||||
self.reward = {}
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function IncarnationLottery:BindEvent()
|
||||
Util.AddOnceClick(self.btnHelp, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,self.actConfig.HelpId,self.helpPosition.x,self.helpPosition.y)
|
||||
end)
|
||||
|
||||
Util.AddOnceClick(self.btnReward, function()
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.RecrutDetail,self.actConfig.HelpId,self.actType,PRE_REWARD_POOL_TYPE.Incarnation,PRE_REWARD_POOL_TYPE.Incarnation)
|
||||
end)
|
||||
|
||||
Util.AddOnceClick(self.btnStore, function()
|
||||
JumpManager.GoJump(40049)
|
||||
end)
|
||||
|
||||
Util.AddOnceClick(self.btnGift,function ()
|
||||
if not self.actData then
|
||||
return
|
||||
end
|
||||
UIManager.OpenPanel(UIName.ContinueGiftPanel, self.actData.activityId)
|
||||
end)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function IncarnationLottery:AddListener()
|
||||
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function IncarnationLottery:RemoveListener()
|
||||
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function IncarnationLottery:OnOpen(_activityConfig,_index,parent)
|
||||
self.actConfig = _activityConfig
|
||||
self.pageIndex = _index
|
||||
self.parent = parent
|
||||
end
|
||||
|
||||
function IncarnationLottery:OnSortingOrderChange(_sortingOrder)
|
||||
sortingOrder = _sortingOrder or 0
|
||||
end
|
||||
|
||||
-- 打开,重新打开时回调
|
||||
function IncarnationLottery:OnShow(_sortingOrder)
|
||||
self.gameObject:SetActive(true)
|
||||
sortingOrder = _sortingOrder
|
||||
self.actId = self.actConfig.ActId
|
||||
self.actType = self.actConfig.ActiveType > 0 and self.actConfig.ActiveType or self.actConfig.FunType
|
||||
if self.actConfig.IfBack == 1 then
|
||||
if self.actConfig.ActiveType > 0 then
|
||||
local id = ActivityGiftManager.IsActivityTypeOpen(self.actConfig.ActiveType)
|
||||
if id and id > 0 then
|
||||
self.actId = id
|
||||
local config = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"PageType",self.actConfig.PageType,"ActiveType",self.actConfig.ActiveType,"ActId",id)
|
||||
if config then
|
||||
self.actConfig = config
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",self.actId)
|
||||
self.singleRecruit = array[1]
|
||||
self.tenRecruit = array[2]
|
||||
self.freeTimesId=self.singleRecruit.FreeTimes
|
||||
self.maxtimesId=self.singleRecruit.MaxTimes
|
||||
self:contentShow()
|
||||
self:refreshMagicNum()
|
||||
self:refreshBtnShow()--刷新按钮显示
|
||||
self.center.transform.localRotation = Quaternion.Euler(Vector3.zero)
|
||||
self._last = self.center.transform.localRotation.z
|
||||
self:DelayMaskWithBool(false)
|
||||
self:TurnTable(1)
|
||||
end
|
||||
|
||||
--五个魂印头像
|
||||
function IncarnationLottery:contentShow()
|
||||
self.reward = {}
|
||||
self.rewardWeight = {}
|
||||
local data = RecruitManager.GetRewardPreviewData(PRE_REWARD_POOL_TYPE.Incarnation)
|
||||
for i = 1 , #self.icons do
|
||||
local str1 = data[i].Reward[1].."#"..data[i].Reward[2]
|
||||
self.icons[i].icon.sprite = self.spLoader:LoadSprite(GetSpriteNameByItemId(data[i].Reward[1]))
|
||||
self.icons[i].num.text = data[i].Reward[2]
|
||||
self.reward[str1] = i
|
||||
self.rewardWeight[str1] = data[i].WeightShow
|
||||
end
|
||||
end
|
||||
|
||||
function IncarnationLottery:refreshMagicNum()
|
||||
self.actData = ActivityGiftManager.GetActivityTypeInfo(self.actType)
|
||||
local isActive = CommonActPageManager.HasContinueGift(self.actData.activityId)
|
||||
self.btnGift:SetActive(isActive)
|
||||
|
||||
--local d = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySpecialConfig,"Type",self.singleRecruit.MergePool)
|
||||
--self.updateTimesTip.text = string.format("<color=#cbb981>召唤<color=#%s>%s</color>次必得红色碎片</color>","ff850c",d[1].Count - self.actData.value)
|
||||
local endTime = ActivityGiftManager.GetTaskEndTime(self.actType) - PlayerManager.serverTime
|
||||
self.updateTimesTip1.text = string.format("<color=#cbb981>活动剩余时间:%s</color>",self:TimeToDHMS(endTime))
|
||||
local timeDown=CalculateSecondsNowTo_N_OClock(0)
|
||||
self.timer = Timer.New(function()
|
||||
if timeDown < 1 then
|
||||
self:RefreshGetHeroTimes()
|
||||
return
|
||||
else
|
||||
self.btnTime.text = TimeToHMS(timeDown).."后刷新"
|
||||
end
|
||||
if endTime < 1 then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
self:OnShow(sortingOrder)
|
||||
return
|
||||
else
|
||||
self.updateTimesTip1.text = string.format("<color=#cbb981>活动剩余时间:%s</color>",self:TimeToDHMS(endTime))
|
||||
end
|
||||
endTime = endTime - 1
|
||||
timeDown = timeDown - 1
|
||||
end, 1, -1, true)
|
||||
self.timer:Start()
|
||||
end
|
||||
|
||||
function IncarnationLottery:refreshBtnShow()
|
||||
local curTimes = PrivilegeManager.GetPrivilegeUsedTimes(self.maxtimesId)
|
||||
self.limit.text ="今日召唤上限:"..curTimes.."/"..privilegeConfig[self.maxtimesId].Condition[1][2]
|
||||
self.btnTime.gameObject:SetActive(false)
|
||||
local freeTime = 0
|
||||
if self.freeTimesId and self.freeTimesId > 0 then
|
||||
freeTime = PrivilegeManager.GetPrivilegeRemainValue(self.freeTimesId)
|
||||
RecruitManager.freeUseTimeList[self.freeTimesId]=freeTime
|
||||
end
|
||||
|
||||
--按钮赋值
|
||||
for n, m in ipairs(self.btns) do
|
||||
--存在免费次数 并且 免费>=1 并且是1按钮
|
||||
local isFree = freeTime >= 1 and n == 1
|
||||
m.red.gameObject:SetActive(isFree)
|
||||
m.icon.gameObject:SetActive(not isFree)
|
||||
m.num.gameObject:SetActive(not isFree)
|
||||
local itemId=0
|
||||
local itemNum=0
|
||||
local type = 0
|
||||
if n == 1 then
|
||||
type = self.singleRecruit.Id
|
||||
m.info.text = "1次"
|
||||
else
|
||||
type = self.tenRecruit.Id
|
||||
m.info.text = "10次"
|
||||
end
|
||||
local d = {}
|
||||
if (isFree) then
|
||||
self.btnTime.gameObject:SetActive(false)
|
||||
m.info.text="免费抽取"
|
||||
else
|
||||
local d = RecruitManager.GetExpendData(type)
|
||||
itemId=d[1]
|
||||
itemNum=d[2]
|
||||
m.icon.sprite = self.spLoader:LoadSprite(artConfig[itemConfig[itemId].ResourceID].Name)
|
||||
m.num.text= tostring(itemNum)
|
||||
end
|
||||
|
||||
Util.AddOnceClick(m.btn,function()
|
||||
if not isFree then
|
||||
if BagManager.GetItemCountById(itemId) < itemNum then
|
||||
PopupTipPanel.ShowTip(itemConfig[itemId].Name.."数量不足!")
|
||||
return
|
||||
end
|
||||
end
|
||||
local recrutId = n == 1 and self.singleRecruit.Id or self.tenRecruit.Id
|
||||
local recrutNum = n == 1 and 1 or 10
|
||||
local uiName = n == 1 and UIName.QianKunBoxBuyOnePanel or UIName.QianKunBoxBuyTenPanel
|
||||
self:Recruit(recrutNum,recrutId,uiName)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function IncarnationLottery:Recruit(recrutType,recrutId,uiName)
|
||||
if PrivilegeManager.GetPrivilegeUsedTimes(self.maxtimesId)+recrutType>privilegeConfig[self.maxtimesId].Condition[1][2] then
|
||||
PopupTipPanel.ShowTip("无法超出每日召唤次数上限!")
|
||||
return
|
||||
end
|
||||
RecruitManager.RecruitRequest(recrutId, function(msg)
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(self.maxtimesId,recrutType)--记录抽卡次数
|
||||
--先转转盘
|
||||
local index = 1
|
||||
local rotate = self.center.transform.localRotation
|
||||
|
||||
local bestIndex = 0
|
||||
if recrutId == self.singleRecruit.Id then
|
||||
local weight = nil
|
||||
for i = 1,#msg.drop.itemlist do
|
||||
local str = msg.drop.itemlist[i].itemId.."#"..msg.drop.itemlist[i].itemNum
|
||||
if not weight then
|
||||
weight = self.rewardWeight[str]
|
||||
bestIndex = self.reward[str]
|
||||
elseif self.rewardWeight[str] then
|
||||
if weight < self.rewardWeight[str] then
|
||||
weight = self.rewardWeight[str]
|
||||
bestIndex = self.reward[str]
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
local drop = {}
|
||||
drop = msg.drop.itemlist[1]
|
||||
bestIndex = self.reward[drop.itemId.."#"..drop.itemNum]
|
||||
end
|
||||
self:TurnTable(2,bestIndex,function()
|
||||
UIManager.OpenPanel(uiName, msg.drop,recrutId,{RecruitType.QianKunBoxTen,RecruitType.QianKunBoxTen})
|
||||
end)
|
||||
--UIManager.OpenPanel(uiName, msg.drop,recrutId,{RecruitType.QianKunBoxTen,RecruitType.QianKunBoxTen})
|
||||
end,self.freeTimesId)
|
||||
end
|
||||
|
||||
function IncarnationLottery:TurnTable(turnType,pos,fun)
|
||||
if turnType == 1 then --默认旋转
|
||||
self._cyclesNum = 43200 --一直循环
|
||||
self:TurnEffectReset(20)
|
||||
elseif turnType == 2 then --抽奖旋转 至指定位置
|
||||
self:DelayMaskWithBool(true)
|
||||
self._cyclesNum = 3
|
||||
self:TurnEffectReset(3,true,pos,function()--当效果播放完毕后 从管理器取得数据
|
||||
self:DelayMaskWithBool(false)
|
||||
if fun then
|
||||
fun()
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
function IncarnationLottery:DelayMaskWithBool(isShow)
|
||||
self.mask.gameObject:SetActive(isShow)
|
||||
end
|
||||
|
||||
---转盘滚动特效重设 1移动速度,值越小越快 2是否停止 3停止位置
|
||||
function IncarnationLottery:TurnEffectReset(turnSpeed,isStop,pos,func)
|
||||
local s = function()
|
||||
if isStop then
|
||||
self._last = self.center.transform.localRotation.z
|
||||
local a = self._cyclesNum * -360 - (12 - pos) * 30 - 18 - self._last;
|
||||
self.tween:Kill()
|
||||
self.center.transform:DORotate(Vector3.New(0, 0, a), turnSpeed):SetEase(Ease.OutQuad):OnComplete(function()
|
||||
Timer.New(function()
|
||||
if func then--回调
|
||||
func()
|
||||
end
|
||||
self.tween = self.center.transform:DORotate(Vector3.New(0, 0, self._last - 360), turnSpeed,1):SetLoops(-1,0):SetEase(Ease.Linear):OnComplete(function()
|
||||
end)
|
||||
end,1):Start()
|
||||
end)
|
||||
else
|
||||
self.tween = self.center.transform:DORotate(Vector3.New(0, 0, self._last - 360), turnSpeed,1):SetLoops(-1,0):SetEase(Ease.Linear):OnComplete(function()
|
||||
end)
|
||||
end
|
||||
end
|
||||
s()
|
||||
end
|
||||
|
||||
--- 将一段时间转换为天时分秒
|
||||
function IncarnationLottery:TimeToDHMS(second)
|
||||
local day = math.floor(second / (24 * 3600))
|
||||
local minute = math.floor(second / 60) % 60
|
||||
local sec = math.floor(second % 60)
|
||||
local hour = math.floor(math.floor(second - day * 24 * 3600 - sec - minute * 60) / 3600)
|
||||
if day <= 0 and hour <= 0 then
|
||||
return string.format("%s分%s秒",minute, sec)
|
||||
else
|
||||
return string.format("%s天%s小时",day, hour)
|
||||
end
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function IncarnationLottery:OnClose()
|
||||
self.gameObject:SetActive(false)
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
if self.shopView then
|
||||
SubUIManager.Close(self.shopView)
|
||||
end
|
||||
self.shopView = nil
|
||||
end
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function IncarnationLottery:OnDestroy()
|
||||
self.btns = {}
|
||||
if self.shopView then
|
||||
SubUIManager.Close(self.shopView)
|
||||
end
|
||||
self.shopView = nil
|
||||
end
|
||||
|
||||
return IncarnationLottery
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f805af1f87556b3478abe203583d638f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -846,6 +846,9 @@ local jumpDic = {
|
|||
[JumpType.honglushop] = function(data)
|
||||
this.JumpActivity(JumpType.honglushop, data[1])
|
||||
end,
|
||||
[JumpType.fangcunxunbaoShop] = function(data)
|
||||
this.JumpActivity(JumpType.fangcunxunbaoShop, data[1])
|
||||
end,
|
||||
}
|
||||
|
||||
function this.JumpActivity(data,skipfactor)
|
||||
|
|
|
|||
|
|
@ -265,7 +265,8 @@ function this.GetRewardPreviewData(type)
|
|||
or type==PRE_REWARD_POOL_TYPE.LOTTERY_SOUL_UP--乾坤宝盒UP
|
||||
or type==PRE_REWARD_POOL_TYPE.LING_SHOU_UP--灵兽宝阁UP
|
||||
or type==PRE_REWARD_POOL_TYPE.XIANG_YAO_UP
|
||||
or type==PRE_REWARD_POOL_TYPE.TIANDIHONGLU then--降妖夺宝UP
|
||||
or type==PRE_REWARD_POOL_TYPE.TIANDIHONGLU
|
||||
or type==PRE_REWARD_POOL_TYPE.Incarnation then--降妖夺宝UP
|
||||
return this.GetActivityPreviewData(type)--非常驻抽卡需要检测时间
|
||||
elseif type==PRE_REWARD_POOL_TYPE.LINGLONG then --限时招募--开启时间有限制的
|
||||
return this.GetLINGLONGPreviewData()
|
||||
|
|
@ -309,6 +310,8 @@ function this.GetActivityPreviewData(type)--非常驻抽卡奖池预览
|
|||
curActivityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.XiangYaoDuoBao)
|
||||
elseif type==PRE_REWARD_POOL_TYPE.TIANDIHONGLU then
|
||||
curActivityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.tiandihonglu)
|
||||
elseif type==PRE_REWARD_POOL_TYPE.Incarnation then
|
||||
curActivityId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.Incarnation)
|
||||
end
|
||||
local data = nil
|
||||
if curActivityId ~= nil then --活动招募
|
||||
|
|
@ -319,7 +322,7 @@ function this.GetActivityPreviewData(type)--非常驻抽卡奖池预览
|
|||
end
|
||||
local poolId = nil
|
||||
if data ~= nil then
|
||||
if type == PRE_REWARD_POOL_TYPE.LOTTERY_SOUL or type == PRE_REWARD_POOL_TYPE.TIANDIHONGLU then--限时招募,乾坤宝盒
|
||||
if type == PRE_REWARD_POOL_TYPE.LOTTERY_SOUL or type == PRE_REWARD_POOL_TYPE.TIANDIHONGLU or type == PRE_REWARD_POOL_TYPE.Incarnation then--限时招募,乾坤宝盒
|
||||
poolId = data.DiamondBoxContain[1][1]
|
||||
elseif type == PRE_REWARD_POOL_TYPE.LOTTERY_SOUL_UP then--限时招募UP,乾坤宝盒UP
|
||||
data = ConfigManager.GetConfigDataByKey(ConfigName.LotterySpecialConfig,"Type",data.MergePool)
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ function RewardBoxPanel:SetSingleGiftData(index,item,boxId,tagNum)
|
|||
select:GetComponent("Button").interactable = BagManager.isBagPanel
|
||||
select:SetActive(BagManager.isBagPanel)
|
||||
yihuode:SetActive(false)
|
||||
if itemConfig[rewardGroup[boxId].ShowItem[index][1]].ItemType == ItemType.Incarnation then
|
||||
if itemConfig[rewardGroup[boxId].ShowItem[index][1]].ItemType == ItemType.Incarnation and BagManager.isBagPanel then
|
||||
local num = BagManager.GetItemCountById(rewardGroup[boxId].ShowItem[index][1])
|
||||
if num > 0 then
|
||||
select:SetActive(false)
|
||||
|
|
|
|||
|
|
@ -151,6 +151,37 @@ function TailsmanSoulChipLottery:OnShow(_sortingOrder)
|
|||
self:refreshMagicNum()
|
||||
self:refreshBtnShow()--刷新按钮显示
|
||||
self:contentShow()
|
||||
self:IconsPlayAnim()
|
||||
end
|
||||
|
||||
function TailsmanSoulChipLottery:IconsPlayAnim()
|
||||
if self.IconsPlayAnimTimer then
|
||||
self.IconsPlayAnimTimer:Stop()
|
||||
self.IconsPlayAnimTimer = nil
|
||||
end
|
||||
self.coroutines = {}
|
||||
local playAnimFunc = function()
|
||||
for i = 1, #self.icons do
|
||||
self.coroutines[i] = coroutine.start(function()
|
||||
coroutine.wait(i/5)
|
||||
while(true) do
|
||||
local pos = self.icons[i].go.transform.localPosition
|
||||
local tw = self.icons[i].go.transform:DOLocalMove(Vector3(pos.x, pos.y + 50, pos.z), 1.5 , false):OnStart(function ()
|
||||
end):OnUpdate(function()
|
||||
end):OnComplete(function ()
|
||||
pos = self.icons[i].go.transform.localPosition
|
||||
self.icons[i].go.transform:DOLocalMove(Vector3(pos.x, pos.y - 50, pos.z), 1.5 , false):OnStart(function () end):OnUpdate(function()
|
||||
end):OnComplete(function ()
|
||||
end)
|
||||
end):SetEase(Ease.Linear)
|
||||
coroutine.wait(3)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
playAnimFunc()
|
||||
-- self.IconsPlayAnimTimer = Timer.New(playAnimFunc,3,-1,false)
|
||||
-- self.IconsPlayAnimTimer:Start()
|
||||
end
|
||||
|
||||
function TailsmanSoulChipLottery:refreshMagicNum()
|
||||
|
|
@ -307,6 +338,9 @@ function TailsmanSoulChipLottery:OnClose()
|
|||
SubUIManager.Close(self.shopView)
|
||||
end
|
||||
self.shopView = nil
|
||||
for i = 1, #self.icons do
|
||||
coroutine.stop(self.coroutines[i])
|
||||
end
|
||||
end
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function TailsmanSoulChipLottery:OnDestroy()
|
||||
|
|
|
|||
|
|
@ -595,6 +595,13 @@ function this:ShopItemAdapter(shopItem, itemData)
|
|||
PopupTipPanel.ShowTip(Language[12039])
|
||||
end)
|
||||
Util.AddOnceClick(bg, function()
|
||||
if con.ItemType == ItemType.Incarnation then
|
||||
local num = BagManager.GetItemCountById(con.Id)
|
||||
if num > 0 then
|
||||
PopupTipPanel.ShowTip("无法选择已获取过的变身卡!")
|
||||
return
|
||||
end
|
||||
end
|
||||
-- 售空
|
||||
if isEmpty then
|
||||
PopupTipPanel.ShowTip(Language[12039])
|
||||
|
|
|
|||
|
|
@ -579,6 +579,13 @@ function ShopViewNew:ShopItemAdapter(shopItem, itemData)
|
|||
PopupTipPanel.ShowTip("商品已售空")
|
||||
end)
|
||||
Util.AddOnceClick(bg, function()
|
||||
if con.ItemType == ItemType.Incarnation then
|
||||
local num = BagManager.GetItemCountById(con.Id)
|
||||
if num > 0 then
|
||||
PopupTipPanel.ShowTip("无法选择已获取过的变身卡!")
|
||||
return
|
||||
end
|
||||
end
|
||||
-- 售空
|
||||
if isEmpty then
|
||||
PopupTipPanel.ShowTip("商品已售空")
|
||||
|
|
|
|||
Loading…
Reference in New Issue