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