Update - 1.14.0.129
EN: 1.14.0.129 CN: 1.14.0.129 JP: 1.14.0.133 KR: 1.14.0.135
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
local ThrowGiftLevelSelectPanel_400015 = class("ThrowGiftLevelSelectPanel_400015", BasePanel)
|
||||
ThrowGiftLevelSelectPanel_400015._sUIResRootPath = "UI_Activity/"
|
||||
ThrowGiftLevelSelectPanel_400015._tbDefine = {
|
||||
{
|
||||
sPrefabPath = "_400015/ThrowGiftsLevelSelectPanel.prefab",
|
||||
sCtrlName = "Game.UI.Activity.ThrowGifts.ThrowGiftLevelSelectCtrl"
|
||||
}
|
||||
}
|
||||
function ThrowGiftLevelSelectPanel_400015:Awake()
|
||||
self.nTransition = 52
|
||||
self.nLevelPanelId = PanelId.ThrowGiftLevelPanel_400015
|
||||
self.nQuestPanelId = PanelId.Task_10110
|
||||
end
|
||||
function ThrowGiftLevelSelectPanel_400015:OnEnable()
|
||||
end
|
||||
function ThrowGiftLevelSelectPanel_400015:OnAfterEnter()
|
||||
end
|
||||
function ThrowGiftLevelSelectPanel_400015:OnDisable()
|
||||
end
|
||||
function ThrowGiftLevelSelectPanel_400015:OnDestroy()
|
||||
end
|
||||
function ThrowGiftLevelSelectPanel_400015:OnRelease()
|
||||
end
|
||||
return ThrowGiftLevelSelectPanel_400015
|
||||
@@ -0,0 +1,30 @@
|
||||
local ThrowGiftPanel_400015 = class("ThrowGiftPanel_400015", BasePanel)
|
||||
ThrowGiftPanel_400015._sUIResRootPath = "UI_Activity/"
|
||||
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
|
||||
ThrowGiftPanel_400015._tbDefine = {
|
||||
{
|
||||
sPrefabPath = "_400015/ThrowGiftsPanel.prefab",
|
||||
sCtrlName = "Game.UI.Activity.ThrowGifts.ThrowGiftCtrl"
|
||||
}
|
||||
}
|
||||
function ThrowGiftPanel_400015:Awake()
|
||||
self.nLevelPanelId = PanelId.ThrowGiftLevelPanel_400015
|
||||
self.sGamepadPanelName = "ThrowGiftPanel_400015"
|
||||
self.nTransition = 52
|
||||
self._rootPath = "UI_Activity/_400015/GoalPerfab/Goal%s.prefab"
|
||||
GamepadUIManager.EnterAdventure(true)
|
||||
GamepadUIManager.EnableGamepadUI(self.sGamepadPanelName, {}, nil, true)
|
||||
end
|
||||
function ThrowGiftPanel_400015:OnEnable()
|
||||
end
|
||||
function ThrowGiftPanel_400015:OnAfterEnter()
|
||||
end
|
||||
function ThrowGiftPanel_400015:OnDisable()
|
||||
end
|
||||
function ThrowGiftPanel_400015:OnDestroy()
|
||||
GamepadUIManager.DisableGamepadUI(self.sGamepadPanelName)
|
||||
GamepadUIManager.QuitAdventure()
|
||||
end
|
||||
function ThrowGiftPanel_400015:OnRelease()
|
||||
end
|
||||
return ThrowGiftPanel_400015
|
||||
@@ -1061,6 +1061,17 @@ function ThrowGiftsLevelCtrl:OnUpdate()
|
||||
self._mapNode.rtScene.anchoredPosition = Vector2(nFinX, rtScenePos.y)
|
||||
end
|
||||
end
|
||||
function ThrowGiftsLevelCtrl:CheckSpeed(nVy, nAngle)
|
||||
local bSpeedCheck = true
|
||||
if nAngle < 45 or 315 < nAngle then
|
||||
bSpeedCheck = nVy <= 0
|
||||
elseif nAngle < 135 or 225 < nAngle then
|
||||
bSpeedCheck = true
|
||||
else
|
||||
bSpeedCheck = 0 <= nVy
|
||||
end
|
||||
return bSpeedCheck
|
||||
end
|
||||
function ThrowGiftsLevelCtrl:NormalGoalCheck(nCurPosX, nCurPosY)
|
||||
local nSumX = nCurPosX - self.curGiftPenguin.mapStartPos.x
|
||||
local nSumY = nCurPosY - self.curGiftPenguin.mapStartPos.y
|
||||
@@ -1072,10 +1083,11 @@ function ThrowGiftsLevelCtrl:NormalGoalCheck(nCurPosX, nCurPosY)
|
||||
local hitPos
|
||||
for nId, mapAciveGoal in pairs(self.activeGoal) do
|
||||
local GoalParentPos = mapAciveGoal.rtGoal.anchoredPosition
|
||||
local nGoalParentAngle = mapAciveGoal.rtGoal.localEulerAngles.z % 360
|
||||
local bHitGoal = self:CheckCollision(self.curGiftPenguin.tbBounds, mapAciveGoal.tbBoundsHitArea, nSumX, nSumY, mapAciveGoal.OffsetX, mapAciveGoal.OffsetY)
|
||||
if bHitGoal then
|
||||
local curVy = self.curGiftPenguin.nVelocityY
|
||||
if 0 < curVy and self.curGiftPenguin.nSpecialType ~= 106 and self.curGiftPenguin.nSpecialType ~= 107 then
|
||||
if not self:CheckSpeed(curVy, nGoalParentAngle) and self.curGiftPenguin.nSpecialType ~= 106 and self.curGiftPenguin.nSpecialType ~= 107 then
|
||||
print("hit goal edge")
|
||||
self:DestroyPenguin()
|
||||
self.curGiftPenguin = nil
|
||||
@@ -1165,8 +1177,9 @@ function ThrowGiftsLevelCtrl:BouncePenguinGoalCheck(nCurPosX, nCurPosY)
|
||||
for nId, mapAciveGoal in pairs(self.activeGoal) do
|
||||
local GoalParentPos = mapAciveGoal.rtGoal.anchoredPosition
|
||||
local bHitGoal, bestNX, bestNY, minDepth = self:CheckCollision(self.curGiftPenguin.tbBounds, mapAciveGoal.tbBoundsHitArea, nSumX, nSumY, mapAciveGoal.OffsetX, mapAciveGoal.OffsetY)
|
||||
local nGoalParentAngle = mapAciveGoal.rtGoal.localEulerAngles.z % 360
|
||||
if bHitGoal then
|
||||
if 0 < curVy then
|
||||
if not self:CheckSpeed(curVy, nGoalParentAngle) then
|
||||
if self.curGiftPenguin.nHitCount < 3 then
|
||||
WwiseAudioMgr:PostEvent("Mode_Present_spring")
|
||||
self.curGiftPenguin.nHitCount = self.curGiftPenguin.nHitCount + 1
|
||||
|
||||
Reference in New Issue
Block a user