Major Update - 2.0.0.143
EN: 2.0.0.143 CN: 2.0.0.142 JP: 2.0.0.145 KR: 2.0.0.150
This commit is contained in:
@@ -676,7 +676,7 @@ function BattleDashboardCtrl:Refresh(nCurPlayerId)
|
||||
self.tbDefine_SupportUltraBtn[i].skillBtnCtrl:SetEmptySkillBtn()
|
||||
self.tbDefine_SupportUltraBtn[i].skillBtnCtrl:SetBtnEnable(false)
|
||||
end
|
||||
local nSkinId = PlayerCharData:GetCharSkinId(nSupportCharId)
|
||||
local nSkinId = PlayerData.Build:GetBattleCharSkinId(nSupportCharId)
|
||||
local mapCfgData_Skin = ConfigTable.GetData_CharacterSkin(nSkinId)
|
||||
local img
|
||||
if i == 1 then
|
||||
|
||||
@@ -114,6 +114,8 @@ function ChapterPauseCtrl:Refresh(sAim)
|
||||
for i = 1, 3 do
|
||||
self._mapNode.goChar[i].gameObject:SetActive(self.tbChar[i])
|
||||
if self.tbChar[i] then
|
||||
local nTrialId = self.tbChar[i].nTrialId
|
||||
self._mapNode.btnChar[i].interactable = not nTrialId or not (0 < nTrialId)
|
||||
self._mapNode.goChar[i]:SetChar(self.tbChar[i].nTid, false, false, self.tbChar[i].nTrialId)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -114,6 +114,8 @@ function MainBattlePauseCtrl:Refresh(sAim)
|
||||
for i = 1, 3 do
|
||||
self._mapNode.goChar[i].gameObject:SetActive(self.tbChar[i])
|
||||
if self.tbChar[i] then
|
||||
local nTrialId = self.tbChar[i].nTrialId
|
||||
self._mapNode.btnChar[i].interactable = not nTrialId or not (0 < nTrialId)
|
||||
self._mapNode.goChar[i]:SetChar(self.tbChar[i].nTid, false, false, self.tbChar[i].nTrialId)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -107,11 +107,11 @@ function BossSkillHintIndicator:OnEvent_SkillCancel()
|
||||
self.endTimer = nil
|
||||
end
|
||||
function BossSkillHintIndicator:OnEvent_HintShow()
|
||||
local indicatorBase = self.gameObject:GetComponent("IndicatorBase")
|
||||
local indicatorBase = self.gameObject:GetComponent(typeof(CS.IndicatorBase))
|
||||
indicatorBase:SetLogicHide(false)
|
||||
end
|
||||
function BossSkillHintIndicator:OnEvent_HintHide()
|
||||
local indicatorBase = self.gameObject:GetComponent("IndicatorBase")
|
||||
local indicatorBase = self.gameObject:GetComponent(typeof(CS.IndicatorBase))
|
||||
indicatorBase:SetLogicHide(true)
|
||||
end
|
||||
function BossSkillHintIndicator:MonsterDied()
|
||||
|
||||
@@ -102,11 +102,11 @@ function MonsterSkillHintIndicator:OnEvent_SkillCancel()
|
||||
self.endTimer = nil
|
||||
end
|
||||
function MonsterSkillHintIndicator:OnEvent_HintShow()
|
||||
local indicatorBase = self.gameObject:GetComponent("IndicatorBase")
|
||||
local indicatorBase = self.gameObject:GetComponent(typeof(CS.IndicatorBase))
|
||||
indicatorBase:SetLogicHide(false)
|
||||
end
|
||||
function MonsterSkillHintIndicator:OnEvent_HintHide()
|
||||
local indicatorBase = self.gameObject:GetComponent("IndicatorBase")
|
||||
local indicatorBase = self.gameObject:GetComponent(typeof(CS.IndicatorBase))
|
||||
indicatorBase:SetLogicHide(true)
|
||||
end
|
||||
function MonsterSkillHintIndicator:MonsterDied()
|
||||
|
||||
@@ -46,7 +46,7 @@ function SkillDisplayCtrl:ShowSkillTips(nSkillId, nCharId, callback)
|
||||
else
|
||||
NovaAPI.SetTMPText(self._mapNode.TMP_SkillName, mapSkillCfgData.Title)
|
||||
end
|
||||
local nSkinId = PlayerData.Char:GetCharSkinId(nCharId)
|
||||
local nSkinId = PlayerData.Build:GetBattleCharSkinId(nCharId)
|
||||
local mapSkin = ConfigTable.GetData_CharacterSkin(nSkinId)
|
||||
self:SetPngSprite(self._mapNode.imgSubSkillIcon, mapSkin.Icon .. AllEnum.CharHeadIconSurfix.XXL)
|
||||
self.ShowEndCallback = callback
|
||||
|
||||
@@ -55,7 +55,7 @@ function UltimateDisplayCtrl:ShowSkill(nCharId, nIdx, callback)
|
||||
self.gameObject.transform.localScale = Vector3.one
|
||||
self.gameObject.transform:SetAsFirstSibling()
|
||||
self.nIdx = nIdx
|
||||
local nSkinId = PlayerData.Char:GetCharSkinId(nCharId)
|
||||
local nSkinId = PlayerData.Build:GetBattleCharSkinId(nCharId)
|
||||
Actor2DManager.SetActor2D_ForSubSKill(PanelId.SubSkillDisplay, self._mapNode.DisplayL2d, nCharId, nSkinId, nil, nIdx)
|
||||
Actor2DManager.PlayAnim("ultra", true, nIdx)
|
||||
self.callback = callback
|
||||
@@ -123,7 +123,7 @@ function UltimateDisplayCtrl:InterrputAnim()
|
||||
self.nIdx = 0
|
||||
end
|
||||
function UltimateDisplayCtrl:InitL2dRes(nCharId, nIdx)
|
||||
local nSkinId = PlayerData.Char:GetCharSkinId(nCharId)
|
||||
local nSkinId = PlayerData.Build:GetBattleCharSkinId(nCharId)
|
||||
local mapSkin = ConfigTable.GetData_CharacterSkin(nSkinId)
|
||||
local sBodyName = string.format("%s_001", nSkinId)
|
||||
local mapCharCfgData = ConfigTable.GetData_Character(nCharId)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
local EnergyBattleCtrl = class("EnergyBattleCtrl", BaseCtrl)
|
||||
local leftMaxX = -16.9
|
||||
local leftMinX = -224.9
|
||||
local rightMaxX = 2.46
|
||||
local rightMinX = 210.8
|
||||
local img_Man = "Icon/Head/head_9101_SS"
|
||||
local img_Female = "Icon/Head/head_9100_SS"
|
||||
local leftMaxX = 0
|
||||
local leftMinX = -210.8
|
||||
local rightMaxX = 210.8
|
||||
local rightMinX = 0
|
||||
EnergyBattleCtrl._mapNodeConfig = {
|
||||
imgChrIcon = {sComponentName = "Image"},
|
||||
imgEnergyFill1 = {
|
||||
@@ -14,25 +16,36 @@ EnergyBattleCtrl._mapNodeConfig = {
|
||||
sComponentName = "RectTransform"
|
||||
},
|
||||
imgEnergyFillLight2 = {},
|
||||
imgEnergyFillGlow2 = {}
|
||||
imgEnergyFillGlow2 = {},
|
||||
rtContent = {
|
||||
sComponentName = "CanvasGroup"
|
||||
}
|
||||
}
|
||||
EnergyBattleCtrl._mapEventConfig = {
|
||||
MoWangEnergyChange = "TD_Battle_MoWangEnergyChange",
|
||||
BossEnergyChange = "TD_Battle_BossEnergyChange"
|
||||
MoWangPerfumeChange = "TD_Battle_MoWangEnergyChange",
|
||||
BossPerfumeChange = "TD_Battle_BossEnergyChange",
|
||||
InputEnable = "OnEvent_InputEnable"
|
||||
}
|
||||
EnergyBattleCtrl._mapRedDotConfig = {}
|
||||
function EnergyBattleCtrl:Awake()
|
||||
self.gameObject:SetActive(false)
|
||||
self._mapNode.rtContent.gameObject:SetActive(false)
|
||||
if PlayerData.Base:GetPlayerSex() then
|
||||
self:SetPngSprite(self._mapNode.imgChrIcon, img_Man)
|
||||
else
|
||||
self:SetPngSprite(self._mapNode.imgChrIcon, img_Female)
|
||||
end
|
||||
end
|
||||
function EnergyBattleCtrl:OnEvent_InputEnable(bEnable)
|
||||
NovaAPI.SetCanvasGroupAlpha(self._mapNode.rtContent, bEnable == true and 1 or 0)
|
||||
end
|
||||
function EnergyBattleCtrl:TD_Battle_MoWangEnergyChange(nCurEnergy, nMaxEnergy)
|
||||
self.gameObject:SetActive(true)
|
||||
self._mapNode.rtContent.gameObject:SetActive(true)
|
||||
self._mapNode.imgEnergyFillLight1:SetActive(nCurEnergy == nMaxEnergy)
|
||||
self._mapNode.imgEnergyFillGlow1:SetActive(nCurEnergy == nMaxEnergy)
|
||||
self._mapNode.imgEnergyFillGlow1:SetActive(false)
|
||||
self._mapNode.imgEnergyFill1.anchoredPosition = Vector2(leftMinX + (leftMaxX - leftMinX) * (nCurEnergy / nMaxEnergy), self._mapNode.imgEnergyFill1.anchoredPosition.y)
|
||||
self._mapNode.imgEnergyFill1.anchoredPosition = Vector2(leftMinX + math.abs(leftMaxX - leftMinX) * (nCurEnergy / nMaxEnergy), self._mapNode.imgEnergyFill1.anchoredPosition.y)
|
||||
end
|
||||
function EnergyBattleCtrl:TD_Battle_BossEnergyChange(nCurEnergy, nMaxEnergy)
|
||||
self.gameObject:SetActive(true)
|
||||
self._mapNode.rtContent.gameObject:SetActive(true)
|
||||
self._mapNode.imgEnergyFillLight2:SetActive(nCurEnergy == nMaxEnergy)
|
||||
self._mapNode.imgEnergyFillGlow2:SetActive(nCurEnergy == nMaxEnergy)
|
||||
self._mapNode.imgEnergyFill2.anchoredPosition = Vector2(rightMaxX - math.abs(rightMaxX - rightMinX) * (nCurEnergy / nMaxEnergy), self._mapNode.imgEnergyFill2.anchoredPosition.y)
|
||||
|
||||
@@ -58,12 +58,8 @@ function VampireSurvivorBattlePanel:Awake()
|
||||
EventManager.Add("VampireSurvivorChangeArea", self, self.OnEvent_ChangeArea)
|
||||
GamepadUIManager.EnterAdventure()
|
||||
GamepadUIManager.EnableGamepadUI("BattleMenu", {})
|
||||
self.tbTeam = self._tbParam[1]
|
||||
self.nLevelId = self._tbParam[2]
|
||||
self.mapCharData = {}
|
||||
for _, nCharId in ipairs(self.tbTeam) do
|
||||
self.mapCharData[nCharId] = clone(PlayerData.Char:GetCharDataByTid(nCharId))
|
||||
end
|
||||
self:RefreshCharData(self._tbParam[1], self._tbParam[3])
|
||||
end
|
||||
function VampireSurvivorBattlePanel:SetTop(goCanvas)
|
||||
local nTopLayer = 0
|
||||
@@ -97,11 +93,35 @@ function VampireSurvivorBattlePanel:OnDisable()
|
||||
GamepadUIManager.DisableGamepadUI("BattleMenu")
|
||||
GamepadUIManager.QuitAdventure()
|
||||
end
|
||||
function VampireSurvivorBattlePanel:OnEvent_ChangeArea(tbTeam)
|
||||
function VampireSurvivorBattlePanel:RefreshCharData(tbTeam, mapBuildData)
|
||||
self.tbTeam = tbTeam
|
||||
local nBuildSource = PlayerData.Build:GetBuildSourceByData(mapBuildData)
|
||||
self._bTrialBuild = nBuildSource == AllEnum.BuildSource.Trial or nBuildSource == AllEnum.BuildSource.LimitedTrial
|
||||
local mapTrialId = {}
|
||||
if self._bTrialBuild then
|
||||
for _, mapBuildChar in ipairs(mapBuildData.tbChar) do
|
||||
mapTrialId[mapBuildChar.nTid] = mapBuildChar.nTrialId
|
||||
end
|
||||
end
|
||||
self.mapCharData = {}
|
||||
for _, nCharId in ipairs(self.tbTeam) do
|
||||
self.mapCharData[nCharId] = clone(PlayerData.Char:GetCharDataByTid(nCharId))
|
||||
local mapChar
|
||||
local nTrialId = mapTrialId[nCharId]
|
||||
if nBuildSource == AllEnum.BuildSource.LimitedTrial then
|
||||
mapChar = clone(PlayerData.Char:GetLimitedTrialCharById(nTrialId))
|
||||
mapChar.tbAttrEffect = PlayerData.Talent:GetLimitedTrialTalentEffect(nTrialId)
|
||||
mapChar.tbSkillAddedLvs = PlayerData.Char:GetLimitedTrialCharSkillAddedLevel(nTrialId)
|
||||
elseif nBuildSource == AllEnum.BuildSource.Trial then
|
||||
mapChar = clone(PlayerData.Char:GetTrialCharById(nTrialId))
|
||||
mapChar.tbAttrEffect = PlayerData.Talent:GetTrialTalentEffect(nTrialId)
|
||||
mapChar.tbSkillAddedLvs = PlayerData.Char:GetTrialCharSkillAddedLevel(nTrialId)
|
||||
else
|
||||
mapChar = clone(PlayerData.Char:GetCharDataByTid(nCharId))
|
||||
end
|
||||
self.mapCharData[nCharId] = mapChar
|
||||
end
|
||||
end
|
||||
function VampireSurvivorBattlePanel:OnEvent_ChangeArea(tbTeam, mapBuildData)
|
||||
self:RefreshCharData(tbTeam, mapBuildData)
|
||||
end
|
||||
return VampireSurvivorBattlePanel
|
||||
|
||||
Reference in New Issue
Block a user