Initial version - 1.2.0.60

EN: 1.2.0.60
CN: 1.2.0.61
JP: 1.2.0.63
KR: 1.2.0.67
This commit is contained in:
SL1900
2025-12-03 01:00:00 +09:00
commit 5e0d58cfad
3595 changed files with 9373562 additions and 0 deletions
@@ -0,0 +1,91 @@
local VampireFateCardInfo_fateCardPackageCtrl = class("VampireFateCardInfo_fateCardPackageCtrl", BaseCtrl)
VampireFateCardInfo_fateCardPackageCtrl._mapNodeConfig = {
TMPPackageName = {sComponentName = "TMP_Text"},
imgPackageIcon = {sComponentName = "Image"},
subIcon = {sComponentName = "Image"},
btnFateCard = {}
}
VampireFateCardInfo_fateCardPackageCtrl._mapEventConfig = {}
VampireFateCardInfo_fateCardPackageCtrl._mapRedDotConfig = {}
function VampireFateCardInfo_fateCardPackageCtrl:Awake()
self.mapFateCardCtrl = {}
self.rtContent = self.gameObject:GetComponent("Transform")
end
function VampireFateCardInfo_fateCardPackageCtrl:FadeIn()
end
function VampireFateCardInfo_fateCardPackageCtrl:FadeOut()
end
function VampireFateCardInfo_fateCardPackageCtrl:OnEnable()
self._mapNode.btnFateCard:SetActive(false)
end
function VampireFateCardInfo_fateCardPackageCtrl:Refresh(nBundleId, tbFateCard, tbExFateCard)
local sort = function(a, b)
return a.nId < b.nId
end
local sortEx = function(a, b)
return a < b
end
table.sort(tbFateCard, sort)
table.sort(tbExFateCard, sortEx)
self.mapBundleCfgData = ConfigTable.GetData("StarTowerBookFateCardBundle", nBundleId)
if self.mapBundleCfgData == nil then
self.gameObject:SetActive(false)
return
end
self:SetPngSprite(self._mapNode.imgPackageIcon, self.mapBundleCfgData.Icon .. AllEnum.FateCardBundleIcon.S)
self:SetAtlasSprite(self._mapNode.subIcon, "05_language", self.mapBundleCfgData.Text)
NovaAPI.SetImageNativeSize(self._mapNode.subIcon)
NovaAPI.SetTMPText(self._mapNode.TMPPackageName, self.mapBundleCfgData.Name)
local bFirst = true
local ret, retId
for _, nFateCardId in ipairs(tbExFateCard) do
local itemObj = instantiate(self._mapNode.btnFateCard, self.rtContent)
itemObj.gameObject:SetActive(true)
local itemCtrl = self:BindCtrlByNode(itemObj, "Game.UI.VampireSurvivor.Depot.DepotFateCardItemCtrl")
itemCtrl:InitFateCard(nFateCardId, 1, true)
if bFirst then
ret = itemCtrl
bFirst = false
retId = nFateCardId
end
self.mapFateCardCtrl[itemObj] = itemCtrl
local btnSelect = itemObj:GetComponent("UIButton")
btnSelect.onClick:RemoveAllListeners()
local func_select = function()
EventManager.Hit("VampireFardInfoSelectFateCard", nFateCardId, itemCtrl)
end
btnSelect.onClick:AddListener(func_select)
end
for _, mapInfo in ipairs(tbFateCard) do
local itemObj = instantiate(self._mapNode.btnFateCard, self.rtContent)
itemObj.gameObject:SetActive(true)
local itemCtrl = self:BindCtrlByNode(itemObj, "Game.UI.VampireSurvivor.Depot.DepotFateCardItemCtrl")
itemCtrl:InitFateCard(mapInfo.nId, 1, false)
if bFirst then
ret = itemCtrl
bFirst = false
retId = mapInfo.nId
end
self.mapFateCardCtrl[itemObj] = itemCtrl
local btnSelect = itemObj:GetComponent("UIButton")
btnSelect.onClick:RemoveAllListeners()
local func_select = function()
EventManager.Hit("VampireFardInfoSelectFateCard", mapInfo.nId, itemCtrl)
end
btnSelect.onClick:AddListener(func_select)
end
return ret, retId
end
function VampireFateCardInfo_fateCardPackageCtrl:OnDisable()
for go, ctrl in ipairs(self.mapFateCardCtrl) do
local btnSelect = go:GetComponent("UIButton")
btnSelect.onClick:RemoveAllListeners()
self:UnbindCtrlByNode(ctrl)
destroy(go)
end
end
function VampireFateCardInfo_fateCardPackageCtrl:OnDestroy()
end
function VampireFateCardInfo_fateCardPackageCtrl:OnRelease()
end
return VampireFateCardInfo_fateCardPackageCtrl
@@ -0,0 +1,167 @@
local VampireFateCardInfoCtrl = class("VampireFateCardInfoCtrl", BaseCtrl)
VampireFateCardInfoCtrl._mapNodeConfig = {
TMPFateCardTitleInfo = {
sComponentName = "TMP_Text",
sLanguageId = "Vampire_FateCardInfo_Title"
},
TMPAcqDesc = {sComponentName = "TMP_Text"},
tcFateCard = {
sCtrlName = "Game.UI.VampireSurvivor.FateCardItemCtrl"
},
TMPAcqTitle = {
sComponentName = "TMP_Text",
sLanguageId = "Vampire_FateCardAcqTitle"
},
grid = {
sNodeName = "grid_",
nCount = 5,
sCtrlName = "Game.UI.VampireLevelSelect.VampireFateCardInfo.VampireFateCardInfo_fateCardPackageCtrl"
},
btnClose = {
sComponentName = "UIButton",
callback = "OnBtnClick_Close"
},
btnScreenClose = {
sComponentName = "Button",
callback = "OnBtnClick_Close"
},
rtWindow = {},
ani = {sNodeName = "rtWindow", sComponentName = "Animator"},
snapshot = {}
}
VampireFateCardInfoCtrl._mapEventConfig = {
VampireFardInfoSelectFateCard = "OnEvent_SelectFateCard"
}
VampireFateCardInfoCtrl._mapRedDotConfig = {}
function VampireFateCardInfoCtrl:Awake()
self._canvas = self.gameObject:GetComponent("Canvas")
self.curFateCardItem = nil
end
function VampireFateCardInfoCtrl:FadeIn()
end
function VampireFateCardInfoCtrl:FadeOut()
end
function VampireFateCardInfoCtrl:OnEnable()
local tbParam = self:GetPanelParam()
self.nLevelId = tbParam[1]
local initFateCard = 0
local mapVampireSurvivorCfgData = ConfigTable.GetData("VampireSurvivor", self.nLevelId)
if mapVampireSurvivorCfgData == nil then
return
end
self.tbBundle = {}
if mapVampireSurvivorCfgData.Type == GameEnum.vampireSurvivorType.Turn then
local nSeasonId = PlayerData.VampireSurvivor:GetCurSeason()
local mapSeason = ConfigTable.GetData("VampireRankSeason", nSeasonId)
if mapSeason ~= nil then
self.tbExFateCard = decodeJson(mapSeason.SpeciaFateCard)
self.tbBundle = mapSeason.FateCardBundle
end
else
self.tbExFateCard = decodeJson(mapVampireSurvivorCfgData.SpeciaFateCard)
self.tbBundle = mapVampireSurvivorCfgData.FateCardBundle
end
if self.tbExFateCard == nil then
self.tbExFateCard = {}
end
local mapBundle = PlayerData.StarTowerBook:GetAllFateCardBundle()
local mapFirstCtrl, nRetId
for i = 1, 5 do
if self.tbBundle[i] ~= nil then
local nBundleId = self.tbBundle[i]
local mapBundleInfo = mapBundle[nBundleId]
local tbFateCard = {}
if mapBundleInfo ~= nil then
tbFateCard = mapBundleInfo.tbCardList
end
local ret, retId = self._mapNode.grid[i]:Refresh(nBundleId, tbFateCard, self.tbExFateCard[i])
if i == 1 then
mapFirstCtrl = ret
nRetId = retId
end
else
self._mapNode.grid[i].gameObject:SetActive(false)
end
end
if mapFirstCtrl ~= nil then
self:OnEvent_SelectFateCard(nRetId, mapFirstCtrl)
end
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
NovaAPI.UIEffectSnapShotCapture(self._mapNode.snapshot)
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
self._mapNode.rtWindow:SetActive(true)
self._mapNode.ani:Play("t_window_04_t_in")
end
cs_coroutine.start(wait)
end
function VampireFateCardInfoCtrl:OnDisable()
end
function VampireFateCardInfoCtrl:OnDestroy()
end
function VampireFateCardInfoCtrl:OnRelease()
end
function VampireFateCardInfoCtrl:OnBtnClick_Close()
self._mapNode.ani:Play("t_window_04_t_out")
self:AddTimer(1, 0.17, function()
EventManager.Hit(EventId.ClosePanel, PanelId.VampireSurvivorFateCardInfo)
end, true, true, true)
end
function VampireFateCardInfoCtrl:OnEvent_SelectFateCard(nFateCardId, mapCtrl)
self._mapNode.tcFateCard.gameObject:SetActive(true)
self._mapNode.tcFateCard:SetFateCardItem(nFateCardId, false)
if self.curFateCardItem ~= nil then
self.curFateCardItem:SetChoose(false)
end
mapCtrl:SetChoose(true)
self.curFateCardItem = mapCtrl
self:SetAcq(nFateCardId)
end
function VampireFateCardInfoCtrl:isExFateCard(nFateCardId)
for i, tbExFateCard in ipairs(self.tbExFateCard) do
if table.indexof(tbExFateCard, nFateCardId) > 0 then
return true, i
end
end
return false, 0
end
function VampireFateCardInfoCtrl:SetAcq(nFateCardId)
local bEx, nIdx = self:isExFateCard(nFateCardId)
if not bEx then
NovaAPI.SetTMPText(self._mapNode.TMPAcqDesc, ConfigTable.GetUIText("Vampire_FateCardAcqNormal"))
else
local nBundleId = self.tbBundle[nIdx]
if nBundleId == nil then
NovaAPI.SetTMPText(self._mapNode.TMPAcqDesc, ConfigTable.GetUIText("Vampire_FateCardAcqNormal"))
end
local mapBundle = ConfigTable.GetData("StarTowerBookFateCardBundle", nBundleId)
if mapBundle == nil then
NovaAPI.SetTMPText(self._mapNode.TMPAcqDesc, ConfigTable.GetUIText("Vampire_FateCardAcqNormal"))
end
local sName = mapBundle.Name
local mapVampireSurvivorCfgData = ConfigTable.GetData("VampireSurvivor", self.nLevelId)
if mapVampireSurvivorCfgData == nil then
return
end
local tbParam = {}
if mapVampireSurvivorCfgData.Type == GameEnum.vampireSurvivorType.Turn then
local nSeasonId = PlayerData.VampireSurvivor:GetCurSeason()
local mapSeason = ConfigTable.GetData("VampireRankSeason", nSeasonId)
if mapSeason ~= nil then
tbParam = decodeJson(mapSeason.SpeciaFateCardParam)
end
else
tbParam = decodeJson(mapVampireSurvivorCfgData.SpeciaFateCardParam)
end
if tbParam == nil then
NovaAPI.SetTMPText(self._mapNode.TMPAcqDesc, ConfigTable.GetUIText("Vampire_FateCardAcqNormal"))
end
local nParamIdx = table.indexof(self.tbExFateCard[nIdx], nFateCardId)
local nCount = 0
if tbParam[nIdx] ~= nil and tbParam[nIdx][nParamIdx] ~= nil then
nCount = tbParam[nIdx][nParamIdx]
end
NovaAPI.SetTMPText(self._mapNode.TMPAcqDesc, orderedFormat(ConfigTable.GetUIText("Vampire_FateCardAcqEx"), nCount, sName))
end
end
return VampireFateCardInfoCtrl
@@ -0,0 +1,22 @@
local VampireFateCardInfoPanel = class("VampireFateCardInfoPanel", BasePanel)
VampireFateCardInfoPanel._bIsMainPanel = false
VampireFateCardInfoPanel._bAddToBackHistory = false
VampireFateCardInfoPanel._tbDefine = {
{
sPrefabPath = "VampireLevelSelect/VampireFateCardInfoPanel.prefab",
sCtrlName = "Game.UI.VampireLevelSelect.VampireFateCardInfo.VampireFateCardInfoCtrl"
}
}
function VampireFateCardInfoPanel:Awake()
end
function VampireFateCardInfoPanel:OnEnable()
end
function VampireFateCardInfoPanel:OnAfterEnter()
end
function VampireFateCardInfoPanel:OnDisable()
end
function VampireFateCardInfoPanel:OnDestroy()
end
function VampireFateCardInfoPanel:OnRelease()
end
return VampireFateCardInfoPanel