Update - 1.13.0.124
EN: 1.13.0.124 CN: 1.13.0.124 JP: 1.13.0.128 KR: 1.13.0.130
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
local CookieBoardPanel = class("CookieBoardPanel", BasePanel)
|
||||
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
|
||||
CookieBoardPanel._sUIResRootPath = "UI_Activity/"
|
||||
CookieBoardPanel._bIsMainPanel = true
|
||||
CookieBoardPanel._tbDefine = {
|
||||
{
|
||||
sPrefabPath = "_400016/CookieBoardPanel.prefab",
|
||||
sCtrlName = "Game.UI.Play_Cookie.CookieBoardCtrl"
|
||||
}
|
||||
}
|
||||
function CookieBoardPanel:Awake()
|
||||
GamepadUIManager.EnterAdventure(true)
|
||||
end
|
||||
function CookieBoardPanel:OnEnable()
|
||||
end
|
||||
function CookieBoardPanel:OnAfterEnter()
|
||||
end
|
||||
function CookieBoardPanel:OnDisable()
|
||||
end
|
||||
function CookieBoardPanel:OnDestroy()
|
||||
GamepadUIManager.QuitAdventure()
|
||||
end
|
||||
function CookieBoardPanel:OnRelease()
|
||||
end
|
||||
return CookieBoardPanel
|
||||
@@ -0,0 +1,22 @@
|
||||
local CookieGamePanel = class("CookieGamePanel", BasePanel)
|
||||
CookieGamePanel._bIsMainPanel = true
|
||||
CookieGamePanel._sUIResRootPath = "UI_Activity/"
|
||||
CookieGamePanel._tbDefine = {
|
||||
{
|
||||
sPrefabPath = "_400016/CookieGamePanel.prefab",
|
||||
sCtrlName = "Game.UI.Play_Cookie.CookieGameCtrl"
|
||||
}
|
||||
}
|
||||
function CookieGamePanel:Awake()
|
||||
end
|
||||
function CookieGamePanel:OnEnable()
|
||||
end
|
||||
function CookieGamePanel:OnAfterEnter()
|
||||
end
|
||||
function CookieGamePanel:OnDisable()
|
||||
end
|
||||
function CookieGamePanel:OnDestroy()
|
||||
end
|
||||
function CookieGamePanel:OnRelease()
|
||||
end
|
||||
return CookieGamePanel
|
||||
@@ -0,0 +1,22 @@
|
||||
local CookieQuestPanel = class("CookieQuestPanel", BasePanel)
|
||||
CookieQuestPanel._bIsMainPanel = true
|
||||
CookieQuestPanel._sUIResRootPath = "UI_Activity/"
|
||||
CookieQuestPanel._tbDefine = {
|
||||
{
|
||||
sPrefabPath = "_400016/CookieQuestPanel.prefab",
|
||||
sCtrlName = "Game.UI.Play_Cookie.CookieQuestCtrl"
|
||||
}
|
||||
}
|
||||
function CookieQuestPanel:Awake()
|
||||
end
|
||||
function CookieQuestPanel:OnEnable()
|
||||
end
|
||||
function CookieQuestPanel:OnAfterEnter()
|
||||
end
|
||||
function CookieQuestPanel:OnDisable()
|
||||
end
|
||||
function CookieQuestPanel:OnDestroy()
|
||||
end
|
||||
function CookieQuestPanel:OnRelease()
|
||||
end
|
||||
return CookieQuestPanel
|
||||
@@ -588,7 +588,9 @@ function CookieBoardCtrl:NextBox()
|
||||
if self.timerBeat ~= nil then
|
||||
self.timerBeat:Cancel()
|
||||
end
|
||||
self.timerBeat = self:AddTimer(0, self.nBeatInterval, self.OnEvent_Beat, true, true, true)
|
||||
if self.bRhythmMode and self.nBeatInterval ~= nil then
|
||||
self.timerBeat = self:AddTimer(0, self.nBeatInterval, self.OnEvent_Beat, true, true, true)
|
||||
end
|
||||
if self.timerRound ~= nil then
|
||||
self.timerRound:Cancel()
|
||||
end
|
||||
@@ -889,7 +891,9 @@ function CookieBoardCtrl:GameTrigger()
|
||||
self:SetEnvironmentBeat(true)
|
||||
self.nPrevTime = CS.UnityEngine.Time.time
|
||||
self.timerRound = self:AddTimer(0, 0.034, self.OnEvent_Time, true, true, true)
|
||||
self.timerBeat = self:AddTimer(0, self.nBeatInterval, self.OnEvent_Beat, true, true, true)
|
||||
if self.bRhythmMode and self.nBeatInterval ~= nil then
|
||||
self.timerBeat = self:AddTimer(0, self.nBeatInterval, self.OnEvent_Beat, true, true, true)
|
||||
end
|
||||
local sEvent = self:GetSwitchBoxSoundEvent()
|
||||
CS.WwiseAudioManager.Instance:PostEvent(sEvent)
|
||||
self.bGameStarted = true
|
||||
@@ -1032,26 +1036,30 @@ function CookieBoardCtrl:PlayPathEffect()
|
||||
end
|
||||
function CookieBoardCtrl:PlayHitEffect(nHitType)
|
||||
self:ResetEff()
|
||||
local objNextCtrl = self.nextCtrl
|
||||
if objNextCtrl == nil or objNextCtrl.gameObject == nil then
|
||||
return
|
||||
end
|
||||
local nAnimLength = 0.75
|
||||
if nHitType == GameEnum.CookieRhythmlResult.Perfect or nHitType == GameEnum.CookieRhythmlResult.Excellent then
|
||||
NovaAPI.SetTMPText(self._mapNode.txtPerfectCombo, string.format("x%d", self.nPerfectCombo))
|
||||
self._mapNode.txtPerfectCombo.gameObject:SetActive(self.nPerfectCombo >= 2)
|
||||
self._mapNode.animPerfectEff.gameObject:SetActive(true)
|
||||
self._mapNode.animPerfectEff.transform:SetParent(self.nextCtrl.gameObject.transform, false)
|
||||
self._mapNode.animPerfectEff.transform:SetParent(objNextCtrl.gameObject.transform, false)
|
||||
nAnimLength = NovaAPI.GetAnimClipLength(self._mapNode.animPerfectEff, {
|
||||
"CookieBoard_HitEffect_perfect"
|
||||
})
|
||||
self._mapNode.animPerfectEff:Play("CookieBoard_HitEffect_perfect", 0, 0)
|
||||
elseif nHitType == GameEnum.CookieRhythmlResult.Good then
|
||||
self._mapNode.animExcellentEff.gameObject:SetActive(true)
|
||||
self._mapNode.animExcellentEff.transform:SetParent(self.nextCtrl.gameObject.transform, false)
|
||||
self._mapNode.animExcellentEff.transform:SetParent(objNextCtrl.gameObject.transform, false)
|
||||
nAnimLength = NovaAPI.GetAnimClipLength(self._mapNode.animExcellentEff, {
|
||||
"CookieBoard_HitEffect_excellent"
|
||||
})
|
||||
self._mapNode.animExcellentEff:Play("CookieBoard_HitEffect_excellent", 0, 0)
|
||||
elseif nHitType == GameEnum.CookieRhythmlResult.Miss then
|
||||
self._mapNode.animMissEff.gameObject:SetActive(true)
|
||||
self._mapNode.animMissEff.transform:SetParent(self.nextCtrl.gameObject.transform, false)
|
||||
self._mapNode.animMissEff.transform:SetParent(objNextCtrl.gameObject.transform, false)
|
||||
nAnimLength = NovaAPI.GetAnimClipLength(self._mapNode.animMissEff, {
|
||||
"CookieBoard_HitEffect_miss"
|
||||
})
|
||||
@@ -1261,7 +1269,7 @@ end
|
||||
function CookieBoardCtrl:OnBtn_ConfirmGameOver()
|
||||
local closePanel = function()
|
||||
CS.WwiseAudioManager.Instance:PostEvent("mode_cookie_1_stop")
|
||||
EventManager.Hit(EventId.ClosePanel, PanelId.CookieBoardPanel_400010)
|
||||
EventManager.Hit(EventId.ClosePanel, PanelId.CookieBoardPanel_400016)
|
||||
end
|
||||
local rewardChangeInfo = self.cookieData:GetLevelReward()
|
||||
if rewardChangeInfo ~= nil and #rewardChangeInfo.Props > 0 then
|
||||
@@ -1467,6 +1475,11 @@ end
|
||||
function CookieBoardCtrl:OnEnable()
|
||||
GamepadUIManager.EnableGamepadUI("CookieBoardCtrl", self.tbGamepadUINode)
|
||||
self.mapLevelConfig = ConfigTable.GetData("CookieLevel", self.nLevelId)
|
||||
if self.mapLevelConfig == nil or self.mapLevelConfig.Id ~= self.nLevelId then
|
||||
printError("CookieLevel config missing or level id mismatch, levelId:" .. tostring(self.nLevelId))
|
||||
EventManager.Hit(EventId.CloesCurPanel)
|
||||
return
|
||||
end
|
||||
self.nPackModel = self.mapLevelConfig.PackModel
|
||||
self.tbFloor = {}
|
||||
ForEachTableLine(ConfigTable.Get("CookieFloor"), function(tbData)
|
||||
@@ -1474,6 +1487,11 @@ function CookieBoardCtrl:OnEnable()
|
||||
table.insert(self.tbFloor, tbData)
|
||||
end
|
||||
end)
|
||||
if self.tbFloor == nil or #self.tbFloor == 0 then
|
||||
printError("CookieFloor config missing, levelId:" .. tostring(self.nLevelId) .. ", floorId:" .. tostring(self.mapLevelConfig.FloorId))
|
||||
EventManager.Hit(EventId.CloesCurPanel)
|
||||
return
|
||||
end
|
||||
self.tbPathGroup = {}
|
||||
ForEachTableLine(ConfigTable.Get("CookiePackagePathsGroup"), function(tbData)
|
||||
table.insert(self.tbPathGroup, tbData)
|
||||
|
||||
@@ -144,11 +144,13 @@ function CookieGameCtrl:RefreshQuestInfo()
|
||||
if self.tbQuestGroupId == 0 then
|
||||
return
|
||||
end
|
||||
local questActData = PlayerData.Activity:GetActivityDataById(nQuestActId)
|
||||
local mapActivityTaskDatas = questActData and questActData.mapActivityTaskDatas or nil
|
||||
local func_Parse_ActivityTask = function(mapData)
|
||||
if mapData.ActivityTaskGroupId == self.tbQuestGroupId then
|
||||
self.nTotalMiniGameQuest = self.nTotalMiniGameQuest + 1
|
||||
local _nTaskId = mapData.Id
|
||||
local taskData = PlayerData.Activity:GetActivityDataById(nQuestActId).mapActivityTaskDatas[_nTaskId]
|
||||
local taskData = mapActivityTaskDatas and mapActivityTaskDatas[_nTaskId] or nil
|
||||
if taskData ~= nil and taskData.nStatus == AllEnum.ActQuestStatus.Received then
|
||||
self.nCompletedMiniGameQuest = self.nCompletedMiniGameQuest + 1
|
||||
end
|
||||
@@ -396,7 +398,7 @@ function CookieGameCtrl:OnBtnClick_Enter()
|
||||
end
|
||||
local nScoreNeedToPass = levelData.FirstCompletionScore
|
||||
local openPanel = function()
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CookieBoardPanel_400010, self.nLevelId, bRhythmlMode, bPipeLineMode, levelData.CountDownLimit, self.nActId, nScoreNeedToPass or 0)
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CookieBoardPanel_400016, self.nLevelId, bRhythmlMode, bPipeLineMode, levelData.CountDownLimit, self.nActId, nScoreNeedToPass or 0)
|
||||
end
|
||||
local nRandom = math.random(46, 47)
|
||||
EventManager.Hit(EventId.SetTransition, nRandom, openPanel)
|
||||
|
||||
@@ -13,10 +13,10 @@ local CookieShapeEnum = {
|
||||
Lens = 4
|
||||
}
|
||||
local IconPathDefault = {
|
||||
[CookieShapeEnum.Gear] = "UI_Activity/_400010/SpriteAtlas/Sprite/zs_cookie_01",
|
||||
[CookieShapeEnum.Lens] = "UI_Activity/_400010/SpriteAtlas/Sprite/zs_cookie_04",
|
||||
[CookieShapeEnum.Ruler] = "UI_Activity/_400010/SpriteAtlas/Sprite/zs_cookie_03",
|
||||
[CookieShapeEnum.Wrench] = "UI_Activity/_400010/SpriteAtlas/Sprite/zs_cookie_02"
|
||||
[CookieShapeEnum.Gear] = "UI_Activity/_400016/SpriteAtlas/Sprite/zs_cookie_01",
|
||||
[CookieShapeEnum.Lens] = "UI_Activity/_400016/SpriteAtlas/Sprite/zs_cookie_04",
|
||||
[CookieShapeEnum.Ruler] = "UI_Activity/_400016/SpriteAtlas/Sprite/zs_cookie_03",
|
||||
[CookieShapeEnum.Wrench] = "UI_Activity/_400016/SpriteAtlas/Sprite/zs_cookie_02"
|
||||
}
|
||||
local nPerfectTiming = 0.33
|
||||
local colorPerfect = Color(1.0, 0.302, 0.796, 1.0)
|
||||
|
||||
Reference in New Issue
Block a user