逍遥游修改
parent
b0650bbb20
commit
4ca9009932
|
@ -21,6 +21,7 @@ local bossNum=0
|
|||
local isPlayMove=0
|
||||
local targetBtn
|
||||
local costNum --每次摇骰子消耗道具数量
|
||||
local isRuning=false
|
||||
local saiziImage={"x_xiaoyaoyou_saizi_01","x_xiaoyaoyou_saizi_02","x_xiaoyaoyou_saizi_03","x_xiaoyaoyou_saizi_04","x_xiaoyaoyou_saizi_05","x_xiaoyaoyou_saizi_06"}
|
||||
--初始化组件(用于子类重写)
|
||||
function this:InitComponent()
|
||||
|
@ -88,7 +89,11 @@ function this:BindEvent()
|
|||
Util.AddClick(this.addItmBtn, function ()
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.XiaoYaoYouItemExchange,98)
|
||||
end)
|
||||
Util.AddClick(this.btn_shop, function ()
|
||||
Util.AddClick(this.btn_shop, function ()
|
||||
if isRuning then
|
||||
PopupTipPanel.ShowTip("移动中,无法跳转商店")
|
||||
return
|
||||
end
|
||||
JumpManager.GoJump(40081)
|
||||
end)
|
||||
Util.AddClick(this.btnBack, function ()
|
||||
|
@ -196,6 +201,7 @@ end
|
|||
|
||||
---播放骰子动效
|
||||
function this.PlaySaiziAnim(_data)
|
||||
isRuning=true
|
||||
this.startBtn:GetComponent("Button").enabled=false
|
||||
Log("当前骰子数:"..#_data.pointes)
|
||||
-- 骰子音效
|
||||
|
@ -266,7 +272,8 @@ function this.MoveTT(targetIndex,_data)
|
|||
Log("待机动画")
|
||||
-- this.SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
|
||||
this.liveNode:SetWalkDir(WALK_DIR.IDLE_FRONT)
|
||||
this.startBtn:GetComponent("Button").enabled=true
|
||||
this.startBtn:GetComponent("Button").enabled=true
|
||||
isRuning=false
|
||||
this.EventTrigger(_data)
|
||||
if curGridIndex>=#allGridData then
|
||||
this.StopAuto()
|
||||
|
@ -695,6 +702,7 @@ function this:OnShow()
|
|||
isAutoRun=false
|
||||
isPlayMove=0
|
||||
this.startBtn:GetComponent("Button").enabled=true
|
||||
isRuning=false
|
||||
isAuto=XiaoYaoManager.isAutoYouli
|
||||
this.toggle.gameObject:SetActive(isAuto)
|
||||
end
|
||||
|
@ -719,9 +727,6 @@ function this:OnClose()
|
|||
-- poolManager:UnLoadLive(npc, this.liveNode)
|
||||
-- this.liveNode = nil
|
||||
-- end
|
||||
if this.liveNode then
|
||||
this.liveNode:OnClose()
|
||||
end
|
||||
if this.timer then
|
||||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
|
@ -740,6 +745,9 @@ function this:OnDestroy()
|
|||
eventTimer:Stop()
|
||||
eventTimer = nil
|
||||
end
|
||||
if this.liveNode then
|
||||
this.liveNode:OnClose()
|
||||
end
|
||||
if this.liveNode then
|
||||
poolManager:UnLoadLive(npc, this.liveNode)
|
||||
this.liveNode = nil
|
||||
|
|
Loading…
Reference in New Issue