玲珑宝镜动画修改
parent
7e5061844b
commit
ca74a5c158
|
@ -90,8 +90,8 @@ function this.IsAllGet()
|
||||||
return index < 1
|
return index < 1
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.QiMenDunJiaDrawRequest(id,func)
|
function this.QiMenDunJiaDrawRequest(id,num,func)
|
||||||
NetManager.QiMenDunJiaDrawRequest(id,function(msg)
|
NetManager.QiMenDunJiaDrawRequest(id,num,function(msg)
|
||||||
-- for i = 1,#msg.idList do
|
-- for i = 1,#msg.idList do
|
||||||
-- LogGreen("msg.idList:"..msg.idList[i])
|
-- LogGreen("msg.idList:"..msg.idList[i])
|
||||||
-- end
|
-- end
|
||||||
|
|
|
@ -111,7 +111,7 @@ function LingLongBaoJingPanel:InitComponent(gameObject)
|
||||||
|
|
||||||
self.skip = Util.GetGameObject(self.gameObject,"button/skip")
|
self.skip = Util.GetGameObject(self.gameObject,"button/skip")
|
||||||
self.check = Util.GetGameObject(self.skip,"Go")
|
self.check = Util.GetGameObject(self.skip,"Go")
|
||||||
|
self.checkText = Util.GetGameObject(self.skip,"Text"):GetComponent("Text")--幸运值
|
||||||
if not PlayerPrefs.HasKey("Linglongbaojing_SkipAnim"..PlayerManager.uid) then
|
if not PlayerPrefs.HasKey("Linglongbaojing_SkipAnim"..PlayerManager.uid) then
|
||||||
PlayerPrefs.SetInt("Linglongbaojing_SkipAnim"..PlayerManager.uid,0)
|
PlayerPrefs.SetInt("Linglongbaojing_SkipAnim"..PlayerManager.uid,0)
|
||||||
end
|
end
|
||||||
|
@ -147,6 +147,7 @@ function LingLongBaoJingPanel:BindEvent()
|
||||||
skip = skip == 0 and 1 or 0
|
skip = skip == 0 and 1 or 0
|
||||||
PlayerPrefs.SetInt("Linglongbaojing_SkipAnim"..PlayerManager.uid,skip)
|
PlayerPrefs.SetInt("Linglongbaojing_SkipAnim"..PlayerManager.uid,skip)
|
||||||
self.check.gameObject:SetActive(skip ~= 0)
|
self.check.gameObject:SetActive(skip ~= 0)
|
||||||
|
self:SetPropShow()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Util.AddClick(self.propBtn, function()
|
Util.AddClick(self.propBtn, function()
|
||||||
|
@ -154,7 +155,13 @@ function LingLongBaoJingPanel:BindEvent()
|
||||||
PopupTipPanel.ShowTip("道具不足")
|
PopupTipPanel.ShowTip("道具不足")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
LingLongBaoJingManager.QiMenDunJiaDrawRequest(self.actId,function(idList,_drop)
|
local count = BagManager.GetItemCountById(self.costId)
|
||||||
|
local TenCount = (a * 10^3 + b * 10^2 + c * 10 ^1 + d * 10^0)
|
||||||
|
local num = 1
|
||||||
|
if count >= TenCount and skip == 1 then
|
||||||
|
num = 10
|
||||||
|
end
|
||||||
|
LingLongBaoJingManager.QiMenDunJiaDrawRequest(self.actId,num,function(idList,_drop)
|
||||||
if not idList[1] then
|
if not idList[1] then
|
||||||
PopupTipPanel.ShowTip("转盘奖励出错了")
|
PopupTipPanel.ShowTip("转盘奖励出错了")
|
||||||
return
|
return
|
||||||
|
@ -513,6 +520,7 @@ end
|
||||||
function LingLongBaoJingPanel:SetPropShow()
|
function LingLongBaoJingPanel:SetPropShow()
|
||||||
self.propImage.sprite = self.spLoader:LoadSprite(GetSpriteNameByItemId(self.costId))
|
self.propImage.sprite = self.spLoader:LoadSprite(GetSpriteNameByItemId(self.costId))
|
||||||
local count = BagManager.GetItemCountById(self.costId)
|
local count = BagManager.GetItemCountById(self.costId)
|
||||||
|
local tenCount = (a * 10^3 + b * 10^2 + c * 10^1 + d * 10^0)
|
||||||
local singleCount = (a * 1^3 + b * 1^2 + c * 1 ^1 + d * 1^0)
|
local singleCount = (a * 1^3 + b * 1^2 + c * 1 ^1 + d * 1^0)
|
||||||
local color
|
local color
|
||||||
if singleCount <= count then
|
if singleCount <= count then
|
||||||
|
@ -522,7 +530,16 @@ function LingLongBaoJingPanel:SetPropShow()
|
||||||
self.enough = false
|
self.enough = false
|
||||||
color = "FF0000"
|
color = "FF0000"
|
||||||
end
|
end
|
||||||
self.propText.text = string.format("<color=#%s>×%s</color>",color,singleCount)
|
local tempCount = singleCount
|
||||||
|
if tenCount <= count then
|
||||||
|
self.checkText.text = "十连跳过动画"
|
||||||
|
if skip == 1 then
|
||||||
|
tempCount = tenCount
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self.checkText.text = "跳过动画"
|
||||||
|
end
|
||||||
|
self.propText.text = string.format("<color=#%s>×%s</color>",color,tempCount)
|
||||||
end
|
end
|
||||||
|
|
||||||
function LingLongBaoJingPanel:CreatBox()
|
function LingLongBaoJingPanel:CreatBox()
|
||||||
|
|
Loading…
Reference in New Issue