玲珑宝镜修改提交

dev_chengFeng
jiaoyangna 2021-11-02 14:20:27 +08:00
parent a41765d10b
commit eef7fbacdf
2 changed files with 1224 additions and 20 deletions

View File

@ -24,12 +24,14 @@ local actconfigs
local itemWidth,interval = 0,0
local position = {
[1] = 53.8,
[2] = 152.4,
[3] = 263.1,
[4] = 380.2,
[5] = 513.2,
[6] = 654.25,
[1] = 44.2,
[2] = 126.2,
[3] = 209,
[4] = 300,
[5] = 391,
[6] = 480,
[7] = 565.6,
[8] = 654.25,
}
---初始化组件(用于子类重写)
function LingLongBaoJingPanel:InitComponent(gameObject)
@ -102,7 +104,7 @@ function LingLongBaoJingPanel:InitComponent(gameObject)
self.rewardBox=Util.GetGameObject(self.slider,"RewardBox")
self.itemRewardList = {}
local bg1 = Util.GetGameObject(self.slider, "BG")
for i=1,6 do
for i=1,8 do
if not self.itemRewardList[i] then
self.itemRewardList[i] = SubUIManager.Open(SubUIConfig.ItemView,bg1.transform)
end
@ -573,7 +575,7 @@ function LingLongBaoJingPanel:RefreshLuckyValue()
self.rewardBoxList[i].go:GetComponent("RectTransform").anchoredPosition3D = v3
self.rewardBoxList[i].value.text = configs[i].Values[1][1]..""
self.rewardBoxList[i].redPoint.gameObject:SetActive(false)
if i < 6 then
if i < 8 then
self.rewardBoxList[i].Num.text = configs[i].Reward[1][2]
self.rewardBoxList[i].icon.sprite = self.spLoader:LoadSprite(GetSpriteNameByItemId(configs[i].Reward[1][1]))
end
@ -657,8 +659,12 @@ function LingLongBaoJingPanel:CalculateInterval(count)
configs = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",self.actId)
end
local interval = 0
if count >= configs[6].Values[1][1] then
if count >= configs[8].Values[1][1] then
interval = 1
elseif count >= configs[7].Values[1][1] then
interval = position[7]/position[#position] + ((count - configs[7].Values[1][1]) * (position[8] - position[7]) / (configs[8].Values[1][1] - configs[7].Values[1][1]))/position[#position]
elseif count >= configs[6].Values[1][1] then
interval = position[6]/position[#position] + ((count - configs[6].Values[1][1]) * (position[7] - position[6]) / (configs[7].Values[1][1] - configs[6].Values[1][1]))/position[#position]
elseif count >= configs[5].Values[1][1] then
interval = position[5]/position[#position] + ((count - configs[5].Values[1][1]) * (position[6] - position[5]) / (configs[6].Values[1][1] - configs[5].Values[1][1]))/position[#position]
elseif count >= configs[4].Values[1][1] then