探索提交
parent
21e5b0846b
commit
5f9f7da264
|
@ -40,12 +40,11 @@ function ExploreMainPanel:BindEvent()
|
|||
UIManager.OpenPanel(UIName.GeneralInfoPopup,GENERALINFO_TYPE.ExploreMapTip,ExploreManager.GetExploreMapTipData(self.mapId))
|
||||
end)
|
||||
Util.AddClick(self.jinruBtn,function()
|
||||
-- if LengthOfTable(self.data[self.mapId].formations) > 0 then
|
||||
-- UIManager.OpenPanel(UIName.ExplorePanel,ExploreManager.ExploreMapData[self.mapId])
|
||||
-- else
|
||||
-- PopupTipPanel.ShowTip("目标区域无探索队伍,无法进入!")
|
||||
-- end
|
||||
if LengthOfTable(self.data[self.mapId].formations) > 0 then
|
||||
UIManager.OpenPanel(UIName.ExplorePanel,ExploreManager.ExploreMapData[self.mapId])
|
||||
else
|
||||
PopupTipPanel.ShowTip("目标区域无探索队伍,无法进入!")
|
||||
end
|
||||
end)
|
||||
Util.AddClick(self.tansuoBtn,function()
|
||||
--选择队伍弹窗
|
||||
|
@ -55,10 +54,12 @@ end
|
|||
|
||||
--添加事件监听(用于子类重写)
|
||||
function ExploreMainPanel:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Explore.UpdateFormation,self.OnShow,self)
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function ExploreMainPanel:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Explore.UpdateFormation,self.OnShow,self)
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
|
@ -105,6 +106,7 @@ function ExploreMainPanel:SetMapData()
|
|||
self.mapList[k].data = v
|
||||
self.mapList[k].go.gameObject:SetActive(true)
|
||||
self.mapList[k].go.transform.localPosition = v.pos
|
||||
self.mapList[k].mapBg.gameObject:SetActive(false)
|
||||
self.mapList[k].mapBgIma.sprite = self.spLoader:LoadSprite(v.iconName)
|
||||
self.mapList[k].mapBgIma:SetNativeSize()
|
||||
SetNumShow(self.mapList[k].minForce,self.mapList[k].force.gameObject,v.force)
|
||||
|
|
|
@ -69,6 +69,7 @@ function this.UpdateFormationsData(_data)
|
|||
for i = 1,#_data do
|
||||
this.UpdateFormationData(_data[i])
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Explore.UpdateFormation)
|
||||
end
|
||||
|
||||
--刷新编队
|
||||
|
|
|
@ -120,7 +120,6 @@ function this:Init()
|
|||
this.playerViews[v.formationId]:SetData((index3 == 1 and index1 or index2),index4,false,v)
|
||||
end
|
||||
end
|
||||
end)
|
||||
-- 设置相机初始化位置
|
||||
local v4 = this.playerViews[0].transform.localPosition
|
||||
v4.z = -50
|
||||
|
@ -128,6 +127,7 @@ function this:Init()
|
|||
-- 初始化两个地图标志
|
||||
this.LoadMapIcon()
|
||||
this.SetPlayerViewWalk()
|
||||
end)
|
||||
end
|
||||
|
||||
function this:LoadMapData()
|
||||
|
|
|
@ -60,7 +60,6 @@ function this.On_Btn2_Click()
|
|||
FormationManager.SaveFormation(k, v.formationinfo,
|
||||
FormationManager.formationList[k].teamPokemonInfos)
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Explore.UpdateFormation)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ local sorting = 0
|
|||
local contentScripts = {
|
||||
[GENERALSIZEFITTER_TYPE.ExploreSelectFormation] = {view = require("Modules/GeneralPanel/GeneralSizeFitterPopup_ExploreSelectFormation"), panelName = "GeneralSizeFitterPopup_ExploreSelectFormation"},
|
||||
[GENERALSIZEFITTER_TYPE.OneKeyExplore] = {view = require("Modules/GeneralPanel/GeneralSizeFitterPopup_OneKeyExplore"), panelName = "GeneralSizeFitterPopup_OneKeyExplore"},
|
||||
|
||||
}
|
||||
--子模块预设
|
||||
local contentPrefabs={}
|
||||
|
|
|
@ -25,12 +25,12 @@ end
|
|||
|
||||
--添加事件监听(用于子类重写)
|
||||
function this:AddListener()
|
||||
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Explore.UpdateFormation,this.RefreshData)
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function this:RemoveListener()
|
||||
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Explore.UpdateFormation,this.RefreshData)
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
|
@ -44,6 +44,16 @@ function this:OnOpen(_parent,...)
|
|||
this.mapData = args[3]
|
||||
end
|
||||
|
||||
function this.RefreshData()
|
||||
if this.typeIndex == 0 then
|
||||
this.data = ExploreManager.GetFormationData(1)
|
||||
else
|
||||
this.data = ExploreManager.GetFormationData(0)
|
||||
end
|
||||
this.mapData = ExploreManager.ExploreMapData[this.mapData.mapId]
|
||||
this:OnShow()
|
||||
end
|
||||
|
||||
function this:OnShow()
|
||||
for i = 1,math.max(#this.itemList,#this.data) do
|
||||
if not this.data[i] then
|
||||
|
|
|
@ -6302,6 +6302,7 @@ function NetManager.ExplorerMapRewardRequest(typeId,teamId,fun)
|
|||
data.type = typeId
|
||||
data.teamId = teamId
|
||||
local msg = data:SerializeToString()
|
||||
LogGreen("data.type:"..data.type.." data.teamId:"..data.teamId)
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.ExplorerMapRewardRequest, MessageTypeProto_pb.ExplorerMapRewardResponse, msg, function(buffer)
|
||||
local data = buffer:DataByte()
|
||||
local msg = PlayerInfoProto_pb.ExplorerMapRewardResponse()
|
||||
|
|
Loading…
Reference in New Issue