Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c
commit
24ccf53511
|
@ -31,6 +31,9 @@ end
|
||||||
function FightMiddleChoosePanel:BindEvent()
|
function FightMiddleChoosePanel:BindEvent()
|
||||||
|
|
||||||
Util.AddClick(self.btnBack, function()
|
Util.AddClick(self.btnBack, function()
|
||||||
|
if fightMap:GetIsWalk() then
|
||||||
|
return
|
||||||
|
end
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -67,6 +70,9 @@ end
|
||||||
function FightMiddleChoosePanel:OnRefreshMiddleClick()
|
function FightMiddleChoosePanel:OnRefreshMiddleClick()
|
||||||
|
|
||||||
for i = 1, FightPointPassManager.maxChapterNum do
|
for i = 1, FightPointPassManager.maxChapterNum do
|
||||||
|
if fightMap:GetIsWalk() then
|
||||||
|
return
|
||||||
|
end
|
||||||
fightMap.AddPointFunc(i, function ()
|
fightMap.AddPointFunc(i, function ()
|
||||||
local ChapterSate = FightPointPassManager.GetDifficultAndChapter(difficultType,i)
|
local ChapterSate = FightPointPassManager.GetDifficultAndChapter(difficultType,i)
|
||||||
if ChapterSate == SingleFightState.Pass then
|
if ChapterSate == SingleFightState.Pass then
|
||||||
|
@ -89,7 +95,6 @@ function FightMiddleChoosePanel:OnRefreshMiddleClick()
|
||||||
end
|
end
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function FightMiddleChoosePanel:OnClose()
|
function FightMiddleChoosePanel:OnClose()
|
||||||
|
|
||||||
fightMap:Dispose()
|
fightMap:Dispose()
|
||||||
if func then
|
if func then
|
||||||
func()
|
func()
|
||||||
|
|
|
@ -7,6 +7,7 @@ require("Modules/Map/Logic/TileMapView")
|
||||||
local this = {}
|
local this = {}
|
||||||
local flagEventPool = {}
|
local flagEventPool = {}
|
||||||
local mapCtrl = "MapCtrl"
|
local mapCtrl = "MapCtrl"
|
||||||
|
local isWalk = true
|
||||||
-- 当前关卡地图编号
|
-- 当前关卡地图编号
|
||||||
local m_curMapId = 5001
|
local m_curMapId = 5001
|
||||||
local mainLevelSettingConFig = ConfigManager.GetConfig(ConfigName.MainLevelSettingConfig)
|
local mainLevelSettingConFig = ConfigManager.GetConfig(ConfigName.MainLevelSettingConfig)
|
||||||
|
@ -17,6 +18,7 @@ local rootParent = nil
|
||||||
local curMiddleFightId = 0
|
local curMiddleFightId = 0
|
||||||
|
|
||||||
function this:InitComponent(root)
|
function this:InitComponent(root)
|
||||||
|
isWalk = true
|
||||||
this.spLoader = SpriteLoader.New()
|
this.spLoader = SpriteLoader.New()
|
||||||
-- 地图点击拖动
|
-- 地图点击拖动
|
||||||
rootParent = root
|
rootParent = root
|
||||||
|
@ -39,10 +41,13 @@ function this:Init(_curSmallFightId,_IsPlayAni,_openPanel)
|
||||||
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
|
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
|
||||||
this:LoadMapData()
|
this:LoadMapData()
|
||||||
if IsPlayAni then
|
if IsPlayAni then
|
||||||
|
isWalk = true
|
||||||
local time3 = Timer.New(function ()
|
local time3 = Timer.New(function ()
|
||||||
this.SetRoleWalk(curMiddleFightId)
|
this.SetRoleWalk(curMiddleFightId)
|
||||||
end, 1.5)
|
end, 1.5)
|
||||||
time3:Start()
|
time3:Start()
|
||||||
|
else
|
||||||
|
isWalk = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function this:LoadMapData()
|
function this:LoadMapData()
|
||||||
|
@ -247,6 +252,7 @@ function this.SelectRenPos(_parent,ChapterRolePosition)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function this:Dispose()
|
function this:Dispose()
|
||||||
|
isWalk = false
|
||||||
if this.liveNode then
|
if this.liveNode then
|
||||||
this.liveNode:OnClose()
|
this.liveNode:OnClose()
|
||||||
this.liveNode = nil
|
this.liveNode = nil
|
||||||
|
@ -265,4 +271,8 @@ function this:Dispose()
|
||||||
openPanel = nil
|
openPanel = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this:GetIsWalk()
|
||||||
|
return isWalk
|
||||||
|
end
|
||||||
|
|
||||||
return this
|
return this
|
|
@ -26,9 +26,13 @@ function UnlockCheckpointPopup:BindEvent()
|
||||||
|
|
||||||
Util.AddClick(this.closeBtn, function()
|
Util.AddClick(this.closeBtn, function()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
UIManager.OpenPanel(UIName.FightPointPassMainPanel, function()
|
if UIManager.IsOpen(UIName.FightPointPassMainPanel) then
|
||||||
|
UIManager.ClosePanel(UIName.FightPointPassMainPanel)
|
||||||
|
end
|
||||||
-- 章节解锁时添加对话
|
-- 章节解锁时添加对话
|
||||||
StoryManager.EventTrigger(curChapterId)
|
StoryManager.EventTrigger(curChapterId, function()
|
||||||
|
LogGreen("打开挂机界面")
|
||||||
|
UIManager.OpenPanel(UIName.FightPointPassMainPanel)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.btnGo, function()
|
Util.AddClick(this.btnGo, function()
|
||||||
|
|
Loading…
Reference in New Issue