【升星有礼】界面调整

dev_chengFeng
ZhangBiao 2021-07-30 17:51:25 +08:00
parent e829b33d14
commit 92f3ee123c
9 changed files with 5083 additions and 35 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d0a20a3e2c8e1544bb76b617ff1a06cb
guid: 0b439f78e876e894e8ab30642e47dc76
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
@ -97,7 +97,7 @@ TextureImporter:
outline: []
physicsShape: []
bones: []
spriteID: 169846eb7942b434dbdb049c75900823
spriteID: 27d26fe2166e776488a484884a7af408
vertices: []
indices:
edges: []

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 KiB

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: af427fe7944d94d409dd82f68a9a70fa
guid: 0eda4a9b16aadb140a481060f1911cf1
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
@ -58,17 +58,6 @@ TextureImporter:
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
@ -108,7 +97,7 @@ TextureImporter:
outline: []
physicsShape: []
bones: []
spriteID: 82b7c766fab4bc140a06202e263f3229
spriteID: e1c8fcd2477e52d4ab75a7553de42047
vertices: []
indices:
edges: []
@ -117,5 +106,5 @@ TextureImporter:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName: lz4/dynamicatlas/s_shengxingyouli_banner_zh
assetBundleVariant: unity3d
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 893 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 920 KiB

View File

@ -6,6 +6,8 @@ local rechargeCommodityConfig = ConfigManager.GetConfig(ConfigName.RechargeCommo
local actRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig)
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local GlobalActivity = ConfigManager.GetConfig(ConfigName.GlobalActivity)
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
local artResConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
this.curLevel = 0--社稷大典的等级
this.curActivityType = 0
this.OpenUIList = {}
@ -368,7 +370,7 @@ function this.ShengXingYouLiGetData()
data.endTime = actData.endTime
data.mission = {}
local rewardData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",data.activityId)
data.heroId = rewardData[1].Values[1][1]
for i = 1, #actData.mission do
local d={}
d.missionId = actData.mission[i].missionId

View File

@ -3,6 +3,11 @@ local actData={}
local itemsGrid = {}--item重复利用
local activityId
--live2D位置和大小
local NamePosSize = {
[10040] = {name = "live2d_c_yj_00040" , size = Vector3.one*0.8 , pos = Vector2.New(231,-333)},
}
function ShengXingYouLi:New(gameObject)
local b = {}
b.gameObject = gameObject
@ -15,6 +20,7 @@ function ShengXingYouLi:InitComponent()
self.spLoader = SpriteLoader.New()
self.time = Util.GetGameObject(self.gameObject, "tiao/time"):GetComponent("Text")
self.itemPre = Util.GetGameObject(self.gameObject, "ItemPre3")
self.grid = Util.GetGameObject(self.gameObject, "titleImg/aniRoot")
self.scrollItem = Util.GetGameObject(self.gameObject, "scrollItem")
local rootHight = self.scrollItem.transform.rect.height
local width = self.scrollItem.transform.rect.width
@ -22,6 +28,7 @@ function ShengXingYouLi:InitComponent()
self.itemPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0, 35))
self.ScrollView.moveTween.MomentumAmount = 1
self.ScrollView.moveTween.Strength = 2
self.effect = Util.GetGameObject(self.gameObject, "titleImg/effect")
end
--绑定事件(用于子类重写)
@ -49,7 +56,7 @@ end
function ShengXingYouLi:OnShow(_sortingOrder)
self.sortingOrder = _sortingOrder
self.gameObject:SetActive(true)
Util.SetParticleSortLayer(self.effect, self.sortingOrder + 1)
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
@ -67,6 +74,7 @@ function ShengXingYouLi:OnShow(_sortingOrder)
self:OnShowData(true,true)
self:SetTime()
self:ShowLive()
end
function ShengXingYouLi:OnShowData(isTop,isAni)
actData={}
@ -81,7 +89,13 @@ function ShengXingYouLi:OnShowData(isTop,isAni)
end
function ShengXingYouLi:ShowLive()
self.bgName = NamePosSize[actData.heroId].name
if self.Live then
poolManager:UnLoadLive(self.bgName, self.Live)
end
self.Live = poolManager:LoadLive(self.bgName, self.grid.transform, NamePosSize[actData.heroId].size, NamePosSize[actData.heroId].pos)
end
--刷新每一条的显示数据
function ShengXingYouLi:SingleDataShow(pre,value)
@ -198,8 +212,12 @@ function ShengXingYouLi:OnClose()
if self.timer then
self.timer:Stop()
self.timer = nil
end
sortingOrder = 0
end
if self.Live then
poolManager:UnLoadLive(self.bgName, self.Live)
end
self.Live = nil
self.sortingOrder = 0
end
--界面销毁时调用(用于子类重写)
@ -208,8 +226,12 @@ function ShengXingYouLi:OnDestroy()
if self.timer then
self.timer:Stop()
self.timer = nil
end
sortingOrder = 0
end
if self.Live then
poolManager:UnLoadLive(self.bgName, self.Live)
end
self.Live = nil
self.sortingOrder = 0
end
return ShengXingYouLi