Hotfix - 1.4.0.74
EN: 1.4.0.74 CN: 1.4.0.75 JP: 1.4.0.78 KR: 1.4.0.81
This commit is contained in:
@@ -255,7 +255,7 @@ local CheckEnable = function()
|
||||
local sBool = LocalData.GetPlayerLocalData("BubbleVoiceEnable")
|
||||
return sBool == nil or sBool == "true"
|
||||
end
|
||||
local anim, TMP, nCurIndex, timer, nCharIdx
|
||||
local anim, TMP, nCurIndex, timer, nCharIdx, trL2D
|
||||
local function SetBubble()
|
||||
if anim == nil or TMP == nil then
|
||||
return
|
||||
@@ -275,6 +275,8 @@ local function SetBubble()
|
||||
if sAnim ~= "" then
|
||||
if RUNNING_BBV_EDITOR == true then
|
||||
Actor2DManager.PlayL2DAnim_InBBVEditor(sAnim)
|
||||
elseif trL2D ~= nil and trL2D:IsNull() == false then
|
||||
Actor2DManager.PlayL2DAnim(trL2D, sAnim, false, true)
|
||||
else
|
||||
Actor2DManager.PlayAnim(sAnim, true, nCharIdx)
|
||||
end
|
||||
@@ -297,6 +299,7 @@ local function SetBubble()
|
||||
anim = nil
|
||||
TMP = nil
|
||||
timer = nil
|
||||
trL2D = nil
|
||||
end
|
||||
end
|
||||
function BubbleVoiceManager.Init(bEditor)
|
||||
@@ -308,7 +311,7 @@ function BubbleVoiceManager.Init(bEditor)
|
||||
end
|
||||
end
|
||||
end
|
||||
function BubbleVoiceManager.PlayBubbleAnim(goBubbleRoot, sVoResName, nCharSkinId, bIsCG, nCharIndex)
|
||||
function BubbleVoiceManager.PlayBubbleAnim(goBubbleRoot, sVoResName, nCharSkinId, bIsCG, nCharIndex, trL2DInstance)
|
||||
if nCharIndex == nil then
|
||||
nCharIndex = 1
|
||||
end
|
||||
@@ -344,6 +347,7 @@ function BubbleVoiceManager.PlayBubbleAnim(goBubbleRoot, sVoResName, nCharSkinId
|
||||
anim = tr:GetComponent("Animator")
|
||||
TMP = tr:GetComponentInChildren(typeof(CS.TMPro.TMP_Text))
|
||||
nCurIndex = 0
|
||||
trL2D = trL2DInstance
|
||||
SetBubble()
|
||||
end
|
||||
end
|
||||
@@ -363,7 +367,12 @@ function BubbleVoiceManager.StopBubbleAnim(bNoAnim)
|
||||
timer = nil
|
||||
end
|
||||
TMP = nil
|
||||
Actor2DManager.PlayAnim("idle", true, nCharIdx)
|
||||
if trL2D ~= nil and trL2D:IsNull() == false then
|
||||
Actor2DManager.PlayL2DAnim(trL2D, "idle", true, true)
|
||||
trL2D = nil
|
||||
else
|
||||
Actor2DManager.PlayAnim("idle", true, nCharIdx)
|
||||
end
|
||||
end
|
||||
function BubbleVoiceManager.PauseBubbleAnim()
|
||||
if CheckEnable() == false then
|
||||
@@ -381,7 +390,7 @@ function BubbleVoiceManager.ResumeBubbleAnim()
|
||||
timer:Pause(false)
|
||||
end
|
||||
end
|
||||
function BubbleVoiceManager.PlayFixedBubbleAnim(goBubbleRoot, sVoResName, nCharIndex)
|
||||
function BubbleVoiceManager.PlayFixedBubbleAnim(goBubbleRoot, sVoResName, nCharIndex, trL2DInstance)
|
||||
if nCharIndex == nil then
|
||||
nCharIndex = 1
|
||||
end
|
||||
@@ -397,6 +406,7 @@ function BubbleVoiceManager.PlayFixedBubbleAnim(goBubbleRoot, sVoResName, nCharI
|
||||
anim = goBubbleRoot:GetComponent("Animator")
|
||||
TMP = goBubbleRoot:GetComponentInChildren(typeof(CS.TMPro.TMP_Text))
|
||||
nCurIndex = 0
|
||||
trL2D = trL2DInstance
|
||||
SetBubble()
|
||||
end
|
||||
end
|
||||
@@ -425,15 +435,16 @@ function BubbleVoiceManager.GetBubbleText(sVoResName)
|
||||
return tb
|
||||
end
|
||||
function BubbleVoiceManager.GetVoResLen(sVoResName)
|
||||
local nDuration = 0
|
||||
if type(map_VoResLen) == "table" then
|
||||
local nCurVoLanIndex = GetLanguageIndex(Settings.sCurrentVoLanguage)
|
||||
local sLanFolder = GetLanguageSurfixByIndex(nCurVoLanIndex)
|
||||
local nDuration = map_VoResLen[sVoResName .. sLanFolder]
|
||||
nDuration = map_VoResLen[sVoResName .. sLanFolder]
|
||||
if nDuration == nil then
|
||||
nDuration = 0
|
||||
end
|
||||
return nDuration
|
||||
end
|
||||
return nDuration
|
||||
end
|
||||
function BubbleVoiceManager.GetL2DAnim(sVoResName)
|
||||
local data = map_BubbleData[sVoResName]
|
||||
|
||||
@@ -172,9 +172,11 @@ function ChristmasThemeCtrl:OnEnable()
|
||||
self._mapNode.redDotEntrance1:SetActive(false)
|
||||
else
|
||||
local nQuestActId = tonumber(tostring(self.nActId) .. "03")
|
||||
RedDotManager.RegisterNode(RedDotDefine.Activity_Group_Task, {
|
||||
local nMiniGameQuestActId = tonumber(tostring(self.nActId) .. "04")
|
||||
RedDotManager.RegisterNode(RedDotDefine.Activity_Group_Task_Group, {
|
||||
self.nActId,
|
||||
nQuestActId
|
||||
nQuestActId,
|
||||
nMiniGameQuestActId
|
||||
}, self._mapNode.redDotEntrance1)
|
||||
end
|
||||
elseif i == AllEnum.ActivityThemeFuncIndex.Story then
|
||||
|
||||
@@ -5046,7 +5046,7 @@ return {
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
"You could tall it that~ But for the Loong people living in Philae, we have kept the traditional versions as well.",
|
||||
"You could call it that~ But for the Loong people living in Philae, we have kept the traditional versions as well.",
|
||||
""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5501,7 +5501,7 @@ return {
|
||||
"",
|
||||
false,
|
||||
"",
|
||||
"But there must be at least one kid who's having it, right?",
|
||||
"But there must be at least one kid who has it, right?",
|
||||
""
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5269,7 +5269,7 @@ return {
|
||||
false,
|
||||
"",
|
||||
"ふーん?==RT==それじゃあおねえちゃんの意見もメモしとくね。",
|
||||
"ふーん?==RT==それじゃあおいにちゃんの意見もメモしとくね。"
|
||||
"ふーん?==RT==それじゃあおにいちゃんの意見もメモしとくね。"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
local LayoutRebuilder = CS.UnityEngine.UI.LayoutRebuilder
|
||||
local WwiseAudioMgr = CS.WwiseAudioManager.Instance
|
||||
local BubbleVoiceManager = require("Game.Actor2D.BubbleVoiceManager")
|
||||
local AvgBubbleCtrl = class("AvgBubbleCtrl", BaseCtrl)
|
||||
AvgBubbleCtrl._mapNodeConfig = {
|
||||
cg1 = {
|
||||
@@ -64,8 +65,6 @@ AvgBubbleCtrl._mapNodeConfig = {
|
||||
}
|
||||
AvgBubbleCtrl._mapEventConfig = {
|
||||
[EventId.AvgBubbleShutDown] = "CloseBubble",
|
||||
[EventId.AvgVoiceDuration] = "OnEvent_GetAvgVoiceDuration",
|
||||
AvgVoiceResNotFound = "OnEvent_AvgVoiceResNotFound",
|
||||
[EventId.PasueAvgBubble] = "OnEvent_Pause"
|
||||
}
|
||||
function AvgBubbleCtrl:OnEnable()
|
||||
@@ -160,23 +159,6 @@ function AvgBubbleCtrl:EndAvgBubble(bCovered)
|
||||
end
|
||||
NovaAPI.DispatchEventWithData("AVG_BB_END", nil, string.format("%s|%s", self.sAvgId, tostring(self.sGroupId)))
|
||||
end
|
||||
function AvgBubbleCtrl:OnEvent_GetAvgVoiceDuration(time)
|
||||
self.nTIME = time
|
||||
if self.timer ~= nil then
|
||||
self.timer:Cancel()
|
||||
self.timer = nil
|
||||
end
|
||||
local tb = {
|
||||
"PopupBubble",
|
||||
"ShowAvgBubbleInPrologue",
|
||||
"PopupBubble3"
|
||||
}
|
||||
local sFuncName = tb[self._panel.nBubbleType]
|
||||
self.timer = self:AddTimer(1, self.nTIME + 0.5, sFuncName, true, false, true)
|
||||
end
|
||||
function AvgBubbleCtrl:OnEvent_AvgVoiceResNotFound()
|
||||
self:OnEvent_GetAvgVoiceDuration(2)
|
||||
end
|
||||
function AvgBubbleCtrl:OnEvent_Pause(bPause)
|
||||
self.bPause = bPause
|
||||
if self.bPause == true then
|
||||
@@ -354,6 +336,8 @@ function AvgBubbleCtrl:PopupBubble3()
|
||||
self.sPreSpeakerAvgCharId = sAvgCharId
|
||||
if type(sVoiceName) == "string" and sVoiceName ~= "" then
|
||||
WwiseAudioMgr:WwiseVoice_PlayInAVG(sVoiceName)
|
||||
self.nTIME = BubbleVoiceManager.GetVoResLen(sVoiceName) + 0.5
|
||||
self.timer = self:AddTimer(1, self.nTIME, "PopupBubble3", true, false, true)
|
||||
else
|
||||
self.nTIME = CalcTextAnimDuration(sContent, self._panel.nCurLanguageIdx, true)
|
||||
self.timer = self:AddTimer(1, self.nTIME, "PopupBubble3", true, false, true)
|
||||
|
||||
@@ -600,9 +600,9 @@ function BattleDashboardCtrl:Remove_SupportSkill_EntityEvent(nPlayerId, nIdx)
|
||||
EventManager.RemoveEntityEvent("SkillBind", nPlayerId, self, self.OnEvent_SkillBind)
|
||||
EventManager.RemoveEntityEvent("SyncSkillBtnToLua", nPlayerId, self, self.OnEvent_SyncSkillBtnToLua)
|
||||
if nIdx == 1 then
|
||||
EventManager.AddEntityEvent("SkillUseableByActionKey", nPlayerId, self, self.OnEvent_Support1SkillEnableByActionKey)
|
||||
EventManager.RemoveEntityEvent("SkillUseableByActionKey", nPlayerId, self, self.OnEvent_Support1SkillEnableByActionKey)
|
||||
else
|
||||
EventManager.AddEntityEvent("SkillUseableByActionKey", nPlayerId, self, self.OnEvent_Support2SkillEnableByActionKey)
|
||||
EventManager.RemoveEntityEvent("SkillUseableByActionKey", nPlayerId, self, self.OnEvent_Support2SkillEnableByActionKey)
|
||||
end
|
||||
end
|
||||
function BattleDashboardCtrl:OnEvent_SkillBind(nActionId, nSkillId, nCharId)
|
||||
|
||||
@@ -384,14 +384,14 @@ function DiscSampleCtrl:SwitchSkill()
|
||||
self._mapNode.DiscSkill:SetActive(self.nCurTab == 1)
|
||||
self._mapNode.DiscNote:SetActive(self.nCurTab == 2)
|
||||
end
|
||||
function DiscSampleCtrl:PlayBGM()
|
||||
function DiscSampleCtrl:PlayBGM(bFirst)
|
||||
self.bPrevDisc = WwiseAudioMgr.IsPrevDiscBgm
|
||||
local mapCfg = ConfigTable.GetData("DiscIP", self.nId)
|
||||
if mapCfg == nil then
|
||||
return
|
||||
end
|
||||
local sState = mapCfg.VoFile
|
||||
if not self.bPrevDisc then
|
||||
if not self.bPrevDisc and bFirst then
|
||||
WwiseAudioMgr:PostEvent("music_outfit_enter")
|
||||
end
|
||||
WwiseAudioMgr:SetState("outfit", sState)
|
||||
@@ -428,7 +428,7 @@ function DiscSampleCtrl:OnEnable()
|
||||
self:RefreshData()
|
||||
self:Refresh()
|
||||
self:RefreshMiddle()
|
||||
self:PlayBGM()
|
||||
self:PlayBGM(true)
|
||||
end
|
||||
function DiscSampleCtrl:OnDisable()
|
||||
self:QuitBGM()
|
||||
|
||||
@@ -143,7 +143,9 @@ GachaCtrl._mapEventConfig = {
|
||||
GachaNewbieReplaceRecord = "OnEvent_GachaNewbieReplaceRecord",
|
||||
GachaNewbieReplaceRecordOver = "OnEvent_GachaNewbieReplaceRecordOver",
|
||||
GachaNewbieObtainRecordOver = "OnEvent_GachaNewbieObtainRecordOver",
|
||||
GachaProcessStart = "OnEvent_GachaProcessStart"
|
||||
GachaProcessStart = "OnEvent_GachaProcessStart",
|
||||
[EventId.UIHomeConfirm] = "OnEvent_Home",
|
||||
[EventId.UIBackConfirm] = "OnEvent_Back"
|
||||
}
|
||||
function GachaCtrl:Awake()
|
||||
self.bGachaProcess = false
|
||||
@@ -172,15 +174,17 @@ function GachaCtrl:OnEnable()
|
||||
if type(tbParam) == "table" then
|
||||
self.curPoolId = tbParam[1]
|
||||
end
|
||||
local bOpen = true
|
||||
if self._panel.nCurPool ~= nil and self._panel.nCurPool ~= 0 then
|
||||
self.curPoolId = self._panel.nCurPool
|
||||
self._panel.nCurPool = 0
|
||||
bOpen = false
|
||||
end
|
||||
self.mapCover = {}
|
||||
local callback = function()
|
||||
local wait = function()
|
||||
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
|
||||
self:RefreshAll()
|
||||
self:RefreshAll(bOpen)
|
||||
end
|
||||
cs_coroutine.start(wait)
|
||||
EventManager.Hit("Guide_GachaOpen")
|
||||
@@ -211,7 +215,7 @@ function GachaCtrl:OnDestroy()
|
||||
end
|
||||
function GachaCtrl:OnRelease()
|
||||
end
|
||||
function GachaCtrl:RefreshAll()
|
||||
function GachaCtrl:RefreshAll(bOpen)
|
||||
self.tbOpenedPool = PlayerData.Gacha:GetOpenedPool()
|
||||
self:LoadCover()
|
||||
self:RefreshTab()
|
||||
@@ -221,17 +225,24 @@ function GachaCtrl:RefreshAll()
|
||||
self:SetTabSelect(self.curPoolId, true)
|
||||
self:RefreshInfo()
|
||||
EventManager.Hit(EventId.SetTransition)
|
||||
if self.mapCover[self.curPoolId] ~= nil then
|
||||
self.mapCover[self.curPoolId].gameObject:SetActive(true)
|
||||
local gachaData = ConfigTable.GetData("Gacha", self.curPoolId)
|
||||
if gachaData ~= nil then
|
||||
CS.WwiseAudioManager.Instance:PostEvent(gachaData.Voice)
|
||||
local wait = function()
|
||||
if self.mapCover[self.curPoolId] ~= nil then
|
||||
self.mapCover[self.curPoolId].gameObject:SetActive(true)
|
||||
local gachaData = ConfigTable.GetData("Gacha", self.curPoolId)
|
||||
if gachaData ~= nil then
|
||||
CS.WwiseAudioManager.Instance:PostEvent(gachaData.Voice)
|
||||
end
|
||||
end
|
||||
self._mapNode.rootAnim:Play("GachaPanel_in")
|
||||
if self.mapCover[self.curPoolId] then
|
||||
self.mapCover[self.curPoolId]:PlayInAnim()
|
||||
self.mapCover[self.curPoolId]:EnableCover()
|
||||
end
|
||||
end
|
||||
self._mapNode.rootAnim:Play("GachaPanel_in")
|
||||
if self.mapCover[self.curPoolId] then
|
||||
self.mapCover[self.curPoolId]:PlayInAnim()
|
||||
self.mapCover[self.curPoolId]:EnableCover()
|
||||
if bOpen == true then
|
||||
self:AddTimer(1, 0.3, wait, true, true, true)
|
||||
else
|
||||
wait()
|
||||
end
|
||||
end
|
||||
function GachaCtrl:RefreshTab()
|
||||
@@ -1410,4 +1421,16 @@ function GachaCtrl:OnBtnClick_NewBieJumpRecord()
|
||||
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("Gacha_NewBieNoRecordTip"))
|
||||
end
|
||||
end
|
||||
function GachaCtrl:OnEvent_Back(nPanelId)
|
||||
if self._panel._nPanelId ~= nPanelId or self.bGachaProcess then
|
||||
return
|
||||
end
|
||||
EventManager.Hit(EventId.CloesCurPanel)
|
||||
end
|
||||
function GachaCtrl:OnEvent_Home(nPanelId)
|
||||
if self._panel._nPanelId ~= nPanelId or self.bGachaProcess then
|
||||
return
|
||||
end
|
||||
PanelManager.Home()
|
||||
end
|
||||
return GachaCtrl
|
||||
|
||||
@@ -80,6 +80,7 @@ end
|
||||
function GuideGroup_7:Step_3()
|
||||
self.msg = {
|
||||
BindIcon = "LevelMenuPanel/----SafeAreaRoot----/---Resource---/svResource/Viewport/Content/btnTimes",
|
||||
ScrollView = "LevelMenuPanel/----SafeAreaRoot----/---Resource---/svResource",
|
||||
Deviation = {0, 0},
|
||||
Head = "Icon/Head/head_11101",
|
||||
Desc = "Guide_7_3",
|
||||
|
||||
@@ -875,8 +875,8 @@ function MainViewCtrl:CheckOpenPanel()
|
||||
NovaAPI.SetCanvasGroupBlocksRaycasts(self._mapNode.cgRoot, true)
|
||||
if self.nViewState == view_state.show_login then
|
||||
PlayerVoiceData:PlayMainViewOpenVoice()
|
||||
self:ChangeViewState(view_state.show_normal)
|
||||
end
|
||||
self:ChangeViewState(view_state.show_normal)
|
||||
end
|
||||
PopUpManager.StartShowPopUp(callbackFunc)
|
||||
end
|
||||
|
||||
@@ -21,14 +21,22 @@ function DatingCharItemCtrl:SetDatingCharItem(nCharId)
|
||||
if mapSkin ~= nil then
|
||||
self:SetPngSprite(self._mapNode.imgHeadIcon, mapSkin.Icon, AllEnum.CharHeadIconSurfix.S)
|
||||
end
|
||||
NovaAPI.SetTMPText(self._mapNode.txtCharName[1], mapCharacter.Name)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtCharName[2], mapCharacter.Name)
|
||||
local sName = self:_temp_proc_name(mapCharacter.Name)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtCharName[1], sName)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtCharName[2], sName)
|
||||
end
|
||||
self:SetSelect(false)
|
||||
self:RegisterRedDot()
|
||||
local bDating = PlayerData.Dating:CheckDating(self.nCharId)
|
||||
self._mapNode.imgDating.gameObject:SetActive(bDating)
|
||||
end
|
||||
function DatingCharItemCtrl:_temp_proc_name(sName)
|
||||
local _sName = string.gsub(sName, "%(", [[
|
||||
|
||||
(]])
|
||||
local _sName = string.gsub(_sName, "(", "\n(")
|
||||
return _sName
|
||||
end
|
||||
function DatingCharItemCtrl:RegisterRedDot()
|
||||
RedDotManager.RegisterNode(RedDotDefine.Phone_Dating_Char, self.nCharId, self._mapNode.redDotDatingItem)
|
||||
end
|
||||
|
||||
@@ -105,7 +105,6 @@ DatingCtrl._mapEventConfig = {
|
||||
DatingEventFinish = "OnEvent_DatingEventFinish",
|
||||
DatingSendGiftFinish = "OnEvent_DatingSendGiftFinish",
|
||||
CloseDatingPanel = "OnEvent_CloseDatingPanel",
|
||||
[EventId.AvgVoiceDuration] = "OnEvent_AvgVoiceDuration",
|
||||
DatingOptionSelected = "OnEvent_DatingOptionSelected",
|
||||
DatingShowImgMsg = "OnBtnClick_DatingShowImgMsg"
|
||||
}
|
||||
@@ -443,11 +442,6 @@ function DatingCtrl:OnDisable()
|
||||
if self.goL2D ~= nil and self.goL2D.tbRenderer ~= nil then
|
||||
Actor2DManager.UnSetActor2DWithRender(self.goL2D.tbRenderer)
|
||||
end
|
||||
if self.charVoiceTimer ~= nil then
|
||||
self.charVoiceTimer:Cancel()
|
||||
self.charVoiceTimer = nil
|
||||
end
|
||||
BubbleVoiceManager.StopBubbleAnim(true)
|
||||
end
|
||||
function DatingCtrl:OnDestroy()
|
||||
end
|
||||
@@ -514,14 +508,31 @@ function DatingCtrl:OnEvent_DatingEventFinish()
|
||||
end
|
||||
function DatingCtrl:OnEvent_DatingSendGiftFinish(sVoiceKey, msgData)
|
||||
self.msgData = msgData
|
||||
self.bPlayCharVoice = false
|
||||
self.nGiftVoiceId = PlayerData.Voice:PlayCharVoice(sVoiceKey, self._panel.nCharId)
|
||||
self.charVoiceTimer = self:AddTimer(1, 0.5, function()
|
||||
if not self.bPlayCharVoice then
|
||||
if type(self.nGiftVoiceId) == "number" and self.nGiftVoiceId ~= 0 then
|
||||
local mapVoiceCfg = ConfigTable.GetData("VoDirectory", self.nGiftVoiceId)
|
||||
if mapVoiceCfg == nil then
|
||||
self:ShowReward()
|
||||
return
|
||||
end
|
||||
self.charVoiceTimer = nil
|
||||
end, true, true, true)
|
||||
self._mapNode.goBubble.gameObject:SetActive(true)
|
||||
local sVoResName = mapVoiceCfg.voResource
|
||||
local trL2DInstance
|
||||
if self.goL2D ~= nil then
|
||||
trL2DInstance = self.goL2D.tbRenderer.trL2DIns.transform
|
||||
end
|
||||
BubbleVoiceManager.PlayFixedBubbleAnim(self._mapNode.goBubble, sVoResName, nil, trL2DInstance)
|
||||
local nVoiceDuration = BubbleVoiceManager.GetVoResLen(sVoResName)
|
||||
if 0 < nVoiceDuration then
|
||||
self.timerWaitVoice = self:AddTimer(1, nVoiceDuration, function()
|
||||
self:ShowReward()
|
||||
self.timerWaitVoice = nil
|
||||
end, true, true, true)
|
||||
self._mapNode.btnSkipVoice.gameObject:SetActive(true)
|
||||
end
|
||||
else
|
||||
self:ShowReward()
|
||||
end
|
||||
end
|
||||
function DatingCtrl:OnEvent_CloseDatingPanel()
|
||||
local nCharId = self._panel.nCharId
|
||||
@@ -546,47 +557,11 @@ function DatingCtrl:OnEvent_CloseDatingPanel()
|
||||
PlayerData.Dating:SetCharFavourLevelUpDelay(mapDelay)
|
||||
end
|
||||
end
|
||||
function DatingCtrl:OnEvent_AvgVoiceDuration(nDuration)
|
||||
if self.nGiftVoiceId ~= nil then
|
||||
local mapVoiceCfg = ConfigTable.GetData("VoDirectory", self.nGiftVoiceId)
|
||||
if mapVoiceCfg == nil then
|
||||
return
|
||||
end
|
||||
self.bPlayCharVoice = true
|
||||
if self.goL2D ~= nil then
|
||||
local tbAnim = BubbleVoiceManager.GetL2DAnim(mapVoiceCfg.voResource)
|
||||
if tbAnim ~= nil then
|
||||
local sAnim = tbAnim[1]
|
||||
for k, v in pairs(tbAnim) do
|
||||
if v ~= "" then
|
||||
sAnim = v
|
||||
break
|
||||
end
|
||||
end
|
||||
Actor2DManager.PlayL2DAnim(self.goL2D.tbRenderer.trL2DIns.transform, sAnim, false, true)
|
||||
end
|
||||
end
|
||||
self._mapNode.goBubble.gameObject:SetActive(true)
|
||||
BubbleVoiceManager.PlayFixedBubbleAnim(self._mapNode.goBubble, mapVoiceCfg.voResource)
|
||||
if nDuration ~= nil and 0 < nDuration then
|
||||
self.timerWaitVoice = self:AddTimer(1, nDuration, function()
|
||||
self:ShowReward()
|
||||
end, true, true, true)
|
||||
self._mapNode.btnSkipVoice.gameObject:SetActive(true)
|
||||
else
|
||||
self:ShowReward()
|
||||
end
|
||||
end
|
||||
end
|
||||
function DatingCtrl:OnBtnClick_SkipVoice()
|
||||
self.nSkipClickedCount = self.nSkipClickedCount + 1
|
||||
if self.nSkipClickedCount < 2 then
|
||||
return
|
||||
end
|
||||
if self.charVoiceTimer ~= nil then
|
||||
self.charVoiceTimer:Cancel()
|
||||
self.charVoiceTimer = nil
|
||||
end
|
||||
if self.timerWaitVoice ~= nil then
|
||||
self.timerWaitVoice:Cancel()
|
||||
self.timerWaitVoice = nil
|
||||
|
||||
@@ -363,9 +363,11 @@ function CookieGameCtrl:OnEnable()
|
||||
EventManager.Hit(EventId.SetTransition)
|
||||
self:Refresh()
|
||||
local nQuestActId = tonumber(tostring(self.nMainActId) .. "03")
|
||||
RedDotManager.RegisterNode(RedDotDefine.Activity_Group_Task, {
|
||||
local nMiniGameQuestActId = tonumber(tostring(self.nMainActId) .. "04")
|
||||
RedDotManager.RegisterNode(RedDotDefine.Activity_Group_Task_Group, {
|
||||
self.nMainActId,
|
||||
nQuestActId
|
||||
nQuestActId,
|
||||
nMiniGameQuestActId
|
||||
}, self._mapNode.redDotQuest)
|
||||
end
|
||||
function CookieGameCtrl:OnDisable()
|
||||
|
||||
@@ -116,7 +116,8 @@ local mapConfig = {
|
||||
[PanelId.TowerDefenseCharacterDetailPanel] = {bEvent = true},
|
||||
[PanelId.MallSkinPreview] = {bEvent = true},
|
||||
[PanelId.StorySet] = {bEvent = true},
|
||||
[PanelId.BdConvertPanel] = {bEvent = true}
|
||||
[PanelId.BdConvertPanel] = {bEvent = true},
|
||||
[PanelId.GachaSpin] = {bEvent = true}
|
||||
}
|
||||
function TopBarCtrl:CreateCoin(tbCoin, bHideCoinAdd)
|
||||
self.mapCoinIndex, self.mapItemIndex = nil, nil
|
||||
|
||||
@@ -539,9 +539,20 @@ function BaseCtrl:_AutoFitIcon(imgObj, sPath, sSurfix)
|
||||
if mapAutoFix == nil then
|
||||
return sPath .. sSurfix
|
||||
end
|
||||
local nGlobalScale = 0
|
||||
local v3GlobalScale = imgObj.transform.lossyScale
|
||||
if v3GlobalScale.x < v3GlobalScale.y then
|
||||
nGlobalScale = v3GlobalScale.x
|
||||
else
|
||||
nGlobalScale = v3GlobalScale.y
|
||||
end
|
||||
nGlobalScale = nGlobalScale / Settings.CANVAS_SCALE
|
||||
if nGlobalScale <= 0 then
|
||||
nGlobalScale = 1
|
||||
end
|
||||
local rectTransform = imgObj.gameObject:GetComponent("RectTransform")
|
||||
local nTargetWidth = rectTransform.rect.width
|
||||
local nTargetHeight = rectTransform.rect.height
|
||||
local nTargetWidth = rectTransform.rect.width * nGlobalScale
|
||||
local nTargetHeight = rectTransform.rect.height * nGlobalScale
|
||||
local sAutoFit, nRange
|
||||
for k, v in pairs(mapAutoFix) do
|
||||
local nMultiple_W = math.abs(nTargetWidth - v.w) / v.w
|
||||
@@ -556,8 +567,14 @@ function BaseCtrl:_AutoFitIcon(imgObj, sPath, sSurfix)
|
||||
end
|
||||
end
|
||||
if sAutoFit == nil then
|
||||
if NovaAPI.IsEditorPlatform() == true then
|
||||
printLog("【抽卡角色头像 icon 自适应】未自适应")
|
||||
end
|
||||
return sPath .. sSurfix
|
||||
else
|
||||
if NovaAPI.IsEditorPlatform() == true then
|
||||
printLog(string.format("【抽卡角色头像 icon 自适应】全局缩放:x%f,y%f,最终取%f,应用处算上全局缩放后的尺寸:w%f,h%f,自适应至后缀:%s,宽%f,高%f。", v3GlobalScale.x, v3GlobalScale.y, nGlobalScale, nTargetWidth, nTargetHeight, sAutoFit, mapAutoFix[sAutoFit].w, mapAutoFix[sAutoFit].h))
|
||||
end
|
||||
local _sPath = sPath .. sAutoFit
|
||||
local bExist = GameResourceLoader.ExistsAsset(sRootPath .. _sPath .. ".png")
|
||||
if bExist == false then
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
local JointDrillRoomInfo = class("JointDrillRoomInfo", BaseCtrl)
|
||||
JointDrillRoomInfo._mapNodeConfig = {
|
||||
canvasGroup = {
|
||||
sNodeName = "----SafeAreaRoot----",
|
||||
sComponentName = "CanvasGroup"
|
||||
}
|
||||
}
|
||||
JointDrillRoomInfo._mapEventConfig = {
|
||||
InputEnable = "OnEvent_InputEnable"
|
||||
}
|
||||
function JointDrillRoomInfo:Awake()
|
||||
end
|
||||
function JointDrillRoomInfo:OnEnable()
|
||||
end
|
||||
function JointDrillRoomInfo:OnDisable()
|
||||
end
|
||||
function JointDrillRoomInfo:OnEvent_InputEnable(bEnable)
|
||||
NovaAPI.SetCanvasGroupAlpha(self._mapNode.canvasGroup, bEnable and 1 or 0)
|
||||
end
|
||||
return JointDrillRoomInfo
|
||||
Reference in New Issue
Block a user