探索提交
parent
b9a86b402c
commit
71496d3905
|
@ -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")
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue