From 71496d39055e7665e192383cd20ff8ba2a7ff2d6 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Mon, 27 Dec 2021 15:42:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A2=E7=B4=A2=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Explore/ExploreMainPanel.lua | 2 +- .../Modules/Fight/View/ExploreMapView.lua | 27 ++++++++++++------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Explore/ExploreMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Explore/ExploreMainPanel.lua index 5ecffc741f..2852adfca9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Explore/ExploreMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Explore/ExploreMainPanel.lua @@ -19,7 +19,7 @@ function ExploreMainPanel:InitComponent() self.jinruBtn = Util.GetGameObject(self.tip, "jinruBtn") self.tansuoBtn = Util.GetGameObject(self.tip, "tansuoBtn") self.mapId = 0 - self.ctrl = Util.GetGameObject(self.gameObject, "btns/ctr") + self.ctrl = Util.GetGameObject(self.gameObject, "ctr") self.bg = Util.GetGameObject(self.gameObject, "Map") self.trigger = Util.GetEventTriggerListener(self.ctrl) self.bgTran = self.bg:GetComponent("RectTransform") diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/View/ExploreMapView.lua b/Assets/ManagedResources/~Lua/Modules/Fight/View/ExploreMapView.lua index cbe8c41d78..5c6a60a6f6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/View/ExploreMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/View/ExploreMapView.lua @@ -28,6 +28,14 @@ local monsterArea = { x_pos = {min = 8, max = 24}, y_pos = {min = 9, max = 23}, }, + [4001] = { + x_pos = {min = 8, max = 24}, + y_pos = {min = 9, max = 23}, + }, + [4004] = { + x_pos = {min = 8, max = 24}, + y_pos = {min = 9, max = 23}, + }, [5002] = { x_pos = {min = 9, max = 32}, y_pos = {min = 8, max = 16}, @@ -45,7 +53,9 @@ local monsterArea = { --自己角色的出生点 local startUV = { [5005] = {u = 15, v = 10}, + [4001] = {u = 15, v = 15}, [4002] = {u = 15, v = 15}, + [4004] = {u = 15, v = 15}, [5002] = {u = 15, v = 15}, [5003] = {u = 15, v = 10}, [5004] = {u = 15, v = 10}, @@ -58,9 +68,6 @@ local maxIcon = 9 local mapCtrl = "MapCtrl" local effectPath = "c_xy_0012_skeff_slidesk_ballistic" - --- 当前关卡地图编号 -local m_curMapId = 1011 local m_orginLayer = 0 local m_parent this.isClose = false @@ -97,11 +104,11 @@ function this:Init() -- 初始化加载地图块数据 this:LoadMapData() -- 加载一个小人 - local tempconfig = ConfigManager.GetConfigData(ConfigName.ChallengeMapConfig,m_curMapId) + local tempconfig = ConfigManager.GetConfigData(ConfigName.ChallengeMapConfig,m_parent.mapData.exploreMapId) NetManager.ExplorerMapPlayerInfoRequest(m_parent.mapData.mapId,function(msg) local NPCList = ExploreManager.InitMapUserInfosData(msg,m_parent.mapData.mapId) - local area = monsterArea[m_curMapId] - local suv = startUV[m_curMapId] + local area = monsterArea[m_parent.mapData.exploreMapId] + local suv = startUV[m_parent.mapData.exploreMapId] for k,v in pairs(NPCList) do local index1 = math.random(area.x_pos.min,suv.u - 3) local index2 = math.random(suv.u + 3,area.x_pos.max) @@ -144,9 +151,9 @@ function this:LoadMapData() index = math.floor((curChapter - 1) % 5 + 1) -- --Log(curChapter) -- --Log(index) - m_curMapId = mapIdList[index] - -- LogPink("#mapIdList:"..#mapIdList.." m_curMapId:"..m_curMapId.." curChapter:"..curChapter.." index:"..index.." State:"..tostring(FightPointPassManager.isOpenNewChapter)) - TileMapView.AwakeInit(this.mapRoot, m_curMapId, nil, Vector2.New(180, 180)) + m_parent.mapData.exploreMapId = mapIdList[index] + -- LogPink("#mapIdList:"..#mapIdList.." m_parent.mapData.exploreMapId:"..m_parent.mapData.exploreMapId.." curChapter:"..curChapter.." index:"..index.." State:"..tostring(FightPointPassManager.isOpenNewChapter)) + TileMapView.AwakeInit(this.mapRoot, m_parent.mapData.exploreMapId, nil, Vector2.New(180, 180)) TileMapView.isShowFog = false TileMapController.IsShieldDrag = function() --当栈中有逻辑,则拖动可以打断镜头跟随 @@ -306,7 +313,7 @@ function this.LoadPointIcon(useAnim) return end -- 随机一个坐标 - local area = monsterArea[m_curMapId] + local area = monsterArea[m_parent.mapData.exploreMapId] --Log("area.x_pos.min:"..tostring(area.x_pos.min).." area.x_pos.max:"..tostring(area.x_pos.max)) local u = math.random(area.x_pos.min, area.x_pos.max) --Log("area.y_pos.min:"..tostring(area.y_pos.min).." area.y_pos.max:"..tostring(area.y_pos.max))