bug修复
This commit is contained in:
parent
5d8cb4bfff
commit
c71e0cd4d0
@ -195,27 +195,33 @@ function DungeonArmorMainUI:refreshBG(chapterId, index)
|
||||
end
|
||||
|
||||
local obj
|
||||
if isUp then
|
||||
local y1 = self.bg1:fastGetAnchoredPositionY()
|
||||
local y2 = self.bg2:fastGetAnchoredPositionY()
|
||||
if y1 == y2 then
|
||||
obj = self.bg1
|
||||
elseif y1 < y2 then
|
||||
obj = self.bg1
|
||||
local y1 = self.bg1:fastGetAnchoredPositionY()
|
||||
local y2 = self.bg2:fastGetAnchoredPositionY()
|
||||
if y1 == -1 then
|
||||
obj = self.bg1
|
||||
elseif y2 == -1 then
|
||||
obj = self.bg2
|
||||
end
|
||||
if not obj then
|
||||
if isUp then
|
||||
if y1 == y2 then
|
||||
obj = self.bg1
|
||||
elseif y1 < y2 then
|
||||
obj = self.bg1
|
||||
else
|
||||
obj = self.bg2
|
||||
end
|
||||
else
|
||||
obj = self.bg2
|
||||
end
|
||||
else
|
||||
local y1 = self.bg1:fastGetAnchoredPositionY()
|
||||
local y2 = self.bg2:fastGetAnchoredPositionY()
|
||||
if y1 == y2 then
|
||||
obj = self.bg2
|
||||
elseif y1 < y2 then
|
||||
obj = self.bg2
|
||||
else
|
||||
obj = self.bg1
|
||||
if y1 == y2 then
|
||||
obj = self.bg2
|
||||
elseif y1 < y2 then
|
||||
obj = self.bg2
|
||||
else
|
||||
obj = self.bg1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if self.bgNames[obj] ~= bgName then
|
||||
obj:setTexture("assets/arts/textures/background/dungeon_armor/" .. bgName .. ".png")
|
||||
self.bgNames[obj] = bgName
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user