Update - 1.9.0.107

EN: 1.9.0.107
CN: 1.9.0.108
JP: 1.9.0.112
KR: 1.9.0.112
This commit is contained in:
SL1900
2026-05-14 16:00:00 +09:00
parent 4b880806ef
commit eafd8f4088
1034 changed files with 809589 additions and 23067 deletions
+34 -26
View File
@@ -3,9 +3,6 @@ local PlayerCharData = PlayerData.Char
local PlayerCharSkinData = PlayerData.CharSkin
local Actor2DManager = require("Game.Actor2D.Actor2DManager")
local tableInsert = table.insert
local GameCameraStackManager = CS.GameCameraStackManager
local GameResourceLoader = require("Game.Common.Resource.GameResourceLoader")
local ResType = GameResourceLoader.ResType
local Animator = CS.UnityEngine.Animator
local typeof = typeof
CharacterSkinCtrl._mapNodeConfig = {
@@ -201,6 +198,10 @@ end
function CharacterSkinCtrl:RefreshFullScene(bFullScene)
self._mapNode.goPreview.gameObject:SetActive(not bFullScene)
self._mapNode.TopBar.gameObject:SetActive(not bFullScene)
if bFullScene and self.timerFullScene ~= nil then
self.timerFullScene:Cancel()
self.timerFullScene = nil
end
if not bFullScene and self.timerFullScene == nil then
self.timerFullScene = self:AddTimer(1, 5, function()
self._mapNode.TopBar.gameObject:SetActive(false)
@@ -215,14 +216,10 @@ function CharacterSkinCtrl:OnGridRefresh(goGrid, gridIndex)
self.tbGridCtrl[nInstanceId] = self:BindCtrlByNode(goGrid, "Game.UI.TemplateEx.TemplateSkinCtrl")
end
self.tbGridCtrl[nInstanceId]:SetSkinData(self.tbSortSkinList[nIndex])
if self.nSelectIndex == nil then
local usingSkinId = PlayerCharData:GetCharUsedSkinId(self.nCharId)
if usingSkinId == self.tbSortSkinList[nIndex]:GetId() then
self.nSelectIndex = nIndex
end
end
if nIndex == self.nSelectIndex then
if self.nSelectIndex == nIndex then
self.tbGridCtrl[nInstanceId]:SetSelect(true)
else
self.tbGridCtrl[nInstanceId]:SetSelect(false)
end
end
function CharacterSkinCtrl:OnGridBtnClick(goGrid, gridIndex)
@@ -261,28 +258,29 @@ function CharacterSkinCtrl:LoadCharacter()
local mapSkin = ConfigTable.GetData_CharacterSkin(self.nSkinId)
local sFullPath = string.format("%s.prefab", mapSkin.Model_Show)
local LoadModelCallback = function(obj)
if self.rtSceneOriginPos == nil then
return
end
local go = instantiate(obj, self.rtSceneOriginPos)
self.tbModelList[self.nSkinId] = go
self.curShowModel = go
self:WaitReadyClipFinish()
NovaAPI.BindUIParallaxStageCameraControllerModel(self._mapNode.UIParallax3DStage, 0, go)
GameUIUtils.SetCustomModelMaterialVariant(go, CS.CustomModelMaterialVariantComponent.VariantNames.FormationView)
if self.rtSceneOriginPos ~= nil then
NovaAPI.ChangeAnimatorDefaultState(go.transform)
go.transform.position = self.rtSceneOriginPos.position
go.transform.localEulerAngles = Vector3(0, 180, 0)
self.nModelDragRot = go.transform.localEulerAngles.y
go.transform.localScale = Vector3.zero
local animator = go:GetComponent(typeof(Animator))
if animator ~= nil and animator:IsNull() == false then
animator:SetBool("standby", true)
end
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
go.transform.localScale = Vector3.one * (mapSkin.ModelShowScale / 10000)
end
cs_coroutine.start(wait)
NovaAPI.ChangeAnimatorDefaultState(go.transform)
go.transform.position = self.rtSceneOriginPos.position
go.transform.localEulerAngles = Vector3(0, 180, 0)
self.nModelDragRot = go.transform.localEulerAngles.y
go.transform.localScale = Vector3.zero
local animator = go:GetComponent(typeof(Animator))
if animator ~= nil and animator:IsNull() == false then
animator:SetBool("standby", true)
end
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
go.transform.localScale = Vector3.one * (mapSkin.ModelShowScale / 10000)
end
cs_coroutine.start(wait)
EventManager.Hit(EventId.BlockInput, false)
end
self:LoadAssetAsync(sFullPath, typeof(GameObject), LoadModelCallback)
@@ -360,8 +358,17 @@ function CharacterSkinCtrl:OnEnable()
self:UnbindCtrlByNode(objCtrl)
self.tbGridCtrl[insId] = nil
end
for nIndex = 1, #self.tbSortSkinList do
local usingSkinId = PlayerCharData:GetCharUsedSkinId(self.nCharId)
if usingSkinId == self.tbSortSkinList[nIndex]:GetId() then
self.nSelectIndex = nIndex
break
end
end
if self.nSelectIndex == nil then
self.nSelectIndex = 1
end
self._mapNode.sv:Init(#self.tbSortSkinList, self, self.OnGridRefresh, self.OnGridBtnClick)
self._mapNode.sv:SetScrollGridPos(self.nSelectIndex - 1, 0)
self._mapNode.goPreview.gameObject:SetActive(true)
self._mapNode.btnSkin.gameObject:SetActive(false)
self._mapNode.go3D.gameObject:SetActive(self.nShowMode == show_mode_3d)
@@ -380,6 +387,7 @@ function CharacterSkinCtrl:OnEnable()
self._mapNode.UIParallax3DStage.gameObject:SetActive(false)
end
self.gameObject:SetActive(true)
self._mapNode.sv:SetScrollGridPos(self.nSelectIndex - 1, 0, 0)
self:RefreshSelectSkinInfo()
EventManager.Hit(EventId.SetTransition)
end
@@ -180,8 +180,6 @@ function ReceiveSpecialRewardCtrl:ShowCharSkin(nSkinId, bGetNew)
local mapSkinData = ConfigTable.GetData_CharacterSkin(nSkinId)
self.nCharId = mapSkinData.CharId
NovaAPI.SetSpriteRendererSprite(self._mapNode.BgRare1, self:LoadPngGacha(mapSkinData.Bg))
local sPath = string.format("Actor2D/Character/%d/atlas_png/a/%d_001.png", nSkinId, nSkinId)
NovaAPI.SetSpriteRendererSprite(self._mapNode.PNG, self:LoadAsset(sPath, typeof(Sprite)))
if mapSkinData.L2D ~= nil and mapSkinData.L2D ~= "" then
local bSetSuccess, nT, nAnimLength, tbRenderer = Actor2DManager.SetActor2DWithRender(PanelId.ReceiveSpecialReward, self._mapNode.rImgL2D, self.nCharId, nSkinId, nil, self._mapNode.actor2dNode)
self.goL2D = tbRenderer
@@ -257,6 +255,7 @@ function ReceiveSpecialRewardCtrl:ShowCharCG()
self._mapNode.btnJumpAll.gameObject:SetActive(false)
self._mapNode.btnSkipAnim.gameObject:SetActive(true)
local curReward = self.tbRewardList[1]
self.nCharId = curReward.nCharId
local sAssetPath = ""
local mapCfg = ConfigTable.GetData("CharacterCG", curReward.nId)
if nil == mapCfg then
@@ -276,14 +275,16 @@ function ReceiveSpecialRewardCtrl:ShowCharCG()
end
local nDuration = 0
local nId = PlayerData.Voice:PlayCharVoice(cgVoiceKey, curReward.nCharId)
local mapVoiceCfg = ConfigTable.GetData("VoDirectory", nId)
if mapVoiceCfg ~= nil then
local dataText = BubbleVoiceManager.GetBubbleText(mapVoiceCfg.voResource)
if dataText ~= nil then
local sContent = dataText[1] .. dataText[2] .. dataText[3] .. dataText[4]
sContent = string.gsub(sContent, "==RT==", "\n")
sContent = string.gsub(sContent, "==PLAYER_NAME==", PlayerData.Base:GetPlayerNickName())
NovaAPI.SetTMPText(self._mapNode.TMP_CGWord, sContent)
if nId ~= 0 then
local mapVoiceCfg = ConfigTable.GetData("VoDirectory", nId)
if mapVoiceCfg ~= nil then
local dataText = BubbleVoiceManager.GetBubbleText(mapVoiceCfg.voResource)
if dataText ~= nil then
local sContent = dataText[1] .. dataText[2] .. dataText[3] .. dataText[4]
sContent = string.gsub(sContent, "==RT==", "\n")
sContent = string.gsub(sContent, "==PLAYER_NAME==", PlayerData.Base:GetPlayerNickName())
NovaAPI.SetTMPText(self._mapNode.TMP_CGWord, sContent)
end
end
end
if nDuration <= 0 then
@@ -383,13 +384,11 @@ function ReceiveSpecialRewardCtrl:ShowSSRAnimEnd(_, voice)
if self.bNew then
self:AddTimer(1, 0.4, function()
WwiseAudioMgr:PlaySound("ui_recuit_gacha_new")
print("ui_recuit_gacha_new")
end, true, true, true)
end
self.timerStep = self:AddTimer(1, animTime, "ShowTitleAnimEnd", true, true, true)
end
function ReceiveSpecialRewardCtrl:ShowCGEnd()
print("ShowCGEnd")
self:ShowCGTitle()
self._mapNode.goInfoContent:SetActive(false)
self._mapNode.goCGInfoContent:SetActive(true)
@@ -399,7 +398,6 @@ function ReceiveSpecialRewardCtrl:ShowCGEnd()
if self.bNew then
self:AddTimer(1, 0.4, function()
WwiseAudioMgr:PlaySound("ui_recuit_gacha_new")
print("ui_recuit_gacha_new")
end, true, true, true)
end
self.timerStep = self:AddTimer(1, animTime, "ShowTitleAnimEnd", true, true, true)
@@ -446,12 +444,7 @@ function ReceiveSpecialRewardCtrl:OnEnable()
end
end
function ReceiveSpecialRewardCtrl:OnDisable()
self._mapNode.OffScreen2DCamera.targetTexture = nil
NovaAPI.SetTexture(self._mapNode.rImgL2D, nil)
if self.rtCharL2d ~= nil then
GameUIUtils.ReleaseRenderTexture(self.rtCharL2d)
self.rtCharL2d = nil
end
if self.goL2D ~= nil then
Actor2DManager.UnSetActor2DWithRender(self.goL2D)
self.goL2D = nil