探索提交
parent
0e0f209440
commit
b256c7a9c5
|
|
@ -2511,6 +2511,80 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &6139598646797747337
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7415597746592648156}
|
||||
- component: {fileID: 2230668621321211665}
|
||||
- component: {fileID: 5531707310480259410}
|
||||
m_Layer: 5
|
||||
m_Name: red
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7415597746592648156
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6139598646797747337}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 830083511673587919}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -36.6, y: -33.7}
|
||||
m_SizeDelta: {x: 30, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2230668621321211665
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6139598646797747337}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &5531707310480259410
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6139598646797747337}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &6628175028958009239
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -3103,7 +3177,8 @@ RectTransform:
|
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 7415597746592648156}
|
||||
m_Father: {fileID: 1731085366901955660}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
|
|||
|
|
@ -11890,7 +11890,7 @@ MonoBehaviour:
|
|||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u4E00\u952E\u9886\u53D6"
|
||||
m_Text: "\u4E00\u952E\u63A2\u7D22"
|
||||
--- !u!1 &8663067260245077426
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ function ExploreMainPanel:InitComponent()
|
|||
self.mapParent = Util.GetGameObject(self.gameObject, "Map")
|
||||
self.backBtn = Util.GetGameObject(self.gameObject, "btns/backBtn")
|
||||
self.oneKeyExploreBtn = Util.GetGameObject(self.gameObject, "btns/oneKeyExploreBtn")
|
||||
self.oneKeyExploreBtnRed = Util.GetGameObject(self.oneKeyExploreBtn, "red")
|
||||
self.formationBtn = Util.GetGameObject(self.gameObject, "btns/formationBtn")
|
||||
self.tip = Util.GetGameObject(self.gameObject, "btns/tip")
|
||||
self.tipPos = self.tip.transform.localPosition
|
||||
|
|
@ -113,6 +114,8 @@ function ExploreMainPanel:BindEvent()
|
|||
--选择队伍弹窗
|
||||
UIManager.OpenPanel(UIName.GeneralSizeFitterPopup,GENERALSIZEFITTER_TYPE.ExploreSelectFormation,ExploreManager.GetFormationData(0),1,ExploreManager.ExploreMapData[self.mapId])
|
||||
end)
|
||||
|
||||
BindRedPointObject(RedPointType.ExploreFunc,self.oneKeyExploreBtnRed)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
|
@ -224,6 +227,7 @@ function ExploreMainPanel:OnDestroy()
|
|||
SubUIManager.Close(self.upView)
|
||||
self.upView = nil
|
||||
self.spLoader:Destroy()
|
||||
ClearRedPointObject(RedPointType.ExploreFunc,self.oneKeyExploreBtnRed)
|
||||
end
|
||||
|
||||
return ExploreMainPanel
|
||||
|
|
@ -40,12 +40,15 @@ function this.Initialize()
|
|||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange)
|
||||
end
|
||||
|
||||
function this.OnLevelChange()
|
||||
function this.OnLevelChange()
|
||||
local isCheckRed = false
|
||||
for k,v in pairs(this.FormationData) do
|
||||
if v.state < 0 then
|
||||
if PlayerManager.level >= v.openLv then
|
||||
v.state = 0
|
||||
if PlayerManager.level == 20 then
|
||||
this.CopyStoryFormationToCurFormation(k)
|
||||
end
|
||||
isCheckRed = true
|
||||
end
|
||||
end
|
||||
|
|
@ -245,11 +248,15 @@ end
|
|||
|
||||
--红点检测
|
||||
function this.CheckRedPoint()
|
||||
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.Explore) then
|
||||
return false
|
||||
end
|
||||
for k,v in pairs(this.FormationData) do
|
||||
if v.state == 0 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
return this
|
||||
|
|
@ -27,10 +27,12 @@ end
|
|||
|
||||
--添加事件监听(用于子类重写)
|
||||
function ExploreRewardPopup:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Explore.UpdateFormation,this.OnShow)
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function ExploreRewardPopup:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Explore.UpdateFormation,this.OnShow)
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
|
|
@ -48,6 +50,10 @@ end
|
|||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function ExploreRewardPopup:OnShow()
|
||||
this.data = ExploreManager.GetFormationDataByMapId(this.mapId)
|
||||
if not this.data or #this.data < 1 then
|
||||
this:ClosePanel()
|
||||
return
|
||||
end
|
||||
local ishave = false
|
||||
for k,v in ipairs(this.data) do
|
||||
if #v.dropReward > 0 then
|
||||
|
|
@ -99,7 +105,16 @@ function this:Refresh(_item,_data)
|
|||
end
|
||||
end
|
||||
Util.AddOnceClick(_item.exploring,function()
|
||||
|
||||
if _data.state > 0 then
|
||||
NetManager.ExplorerMapRewardRequest(0,_data.formationId,function(drop)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
|
||||
_data.state = 0
|
||||
_data.exploreTime = 0
|
||||
_data.mapId = 0
|
||||
self:Refresh(_item,_data)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
@ -108,7 +123,7 @@ function this:TimeCountDown()
|
|||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
end
|
||||
this.timer = Timer.New(function()
|
||||
local s = function()
|
||||
for i = 1,#this.itemList do
|
||||
if this.itemList[i].data and this.itemList[i].data.state > 0 then
|
||||
local time = this.itemList[i].data.exploreTime - GetTimeStamp()
|
||||
|
|
@ -117,11 +132,13 @@ function this:TimeCountDown()
|
|||
this.itemList[i].data.exploreTime = 0
|
||||
this:Refresh(this.itemList[i],this.itemList[i].data)
|
||||
else
|
||||
this.itemList[i].time.text = string.format("%后结束",TimeStampToDateStr3new(time))
|
||||
this.itemList[i].time.text = string.format("%s后结束",TimeStampToDateStr3new(time))
|
||||
end
|
||||
end
|
||||
end
|
||||
end,1,-1,true)
|
||||
end
|
||||
s()
|
||||
this.timer = Timer.New(s,1,-1,true)
|
||||
this.timer:Start()
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -245,6 +245,17 @@ function this.GetWuJinFormationHeroIds(index)
|
|||
end
|
||||
return list
|
||||
end
|
||||
|
||||
function this.CopyStoryFormationToCurFormation(teamId)
|
||||
if #this.formationList[teamId].teamHeroInfos<=0 then
|
||||
for n = 1, #this.formationList[1].teamHeroInfos do
|
||||
table.insert(this.formationList[teamId].teamHeroInfos, this.formationList[1].teamHeroInfos[n])
|
||||
end
|
||||
--
|
||||
FormationManager.SaveFormation(teamId, this.formationList[teamId].teamHeroInfos, {})
|
||||
end
|
||||
end
|
||||
|
||||
-- 获取编队信息
|
||||
function this.GetFormationByID(teamId)
|
||||
if not teamId then
|
||||
|
|
@ -258,12 +269,8 @@ function this.GetFormationByID(teamId)
|
|||
--根据配置表 解锁功能时复制主线阵容 的配置
|
||||
for i, v in ipairs(string.split(specialConfig[47].Value,"#")) do
|
||||
local _v=tonumber(v)
|
||||
if teamId==_v and #this.formationList[teamId].teamHeroInfos<=0 then
|
||||
for n = 1, #this.formationList[1].teamHeroInfos do
|
||||
table.insert(this.formationList[teamId].teamHeroInfos, this.formationList[1].teamHeroInfos[n])
|
||||
end
|
||||
--
|
||||
FormationManager.SaveFormation(teamId, this.formationList[teamId].teamHeroInfos, {})
|
||||
if teamId ==_v and #this.formationList[teamId].teamHeroInfos<=0 then
|
||||
this.CopyStoryFormationToCurFormation(teamId)
|
||||
return this.formationList[teamId]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -228,8 +228,8 @@ function this.SetExploreCost(forId)
|
|||
this.itemList[this.formationList[forId].index].cost.gameObject:SetActive(true)
|
||||
this.itemList[this.formationList[forId].index].costIcon.sprite = this.spLoader:LoadSprite(GetSpriteNameByItemId(Explore[this.formationList[forId].mapId].Cost[1]))
|
||||
this.formationList[forId].costNum = Explore[this.formationList[forId].mapId].Cost[2] * (this.formationList[forId].exploreTime * 60)
|
||||
if this.formationList[forId].costNum >= this.haveNum then
|
||||
this.itemList[this.formationList[forId].index].costNum.text = string.format("<color=#%s>%s</color>","00ff00",this.formationList[forId].costNum)
|
||||
if this.formationList[forId].costNum > this.haveNum then
|
||||
this.itemList[this.formationList[forId].index].costNum.text = string.format("<color=#%s>%s</color>","ff0000",this.formationList[forId].costNum)
|
||||
else
|
||||
this.itemList[this.formationList[forId].index].costNum.text = this.formationList[forId].costNum
|
||||
end
|
||||
|
|
@ -241,8 +241,8 @@ function this.SetExploreCost(forId)
|
|||
num = num + v.costNum
|
||||
end
|
||||
end
|
||||
if num < this.haveNum then
|
||||
this.num.text = string.format("<color=#%s>%s/%s</color>","00ff00",num,this.haveNum)
|
||||
if num > this.haveNum then
|
||||
this.num.text = string.format("<color=#%s>%s/%s</color>","ff0000",num,this.haveNum)
|
||||
else
|
||||
this.num.text = string.format("<color=#%s>%s/%s</color>","ffddbb",num,this.haveNum)
|
||||
end
|
||||
|
|
@ -334,7 +334,6 @@ function this:Refresh(_data,_item,index)
|
|||
this.formationList[_data.formationId].exploreTime = this.mapDatas[1].exploreTime
|
||||
_item.targgetTimeBtn.gameObject:SetActive(false)
|
||||
end
|
||||
LogGreen("_data.formationId:".._data.formationId.." this.formationList[_data.formationId].mapId:"..this.formationList[_data.formationId].mapId)
|
||||
this.SetMapName(_data.formationId)
|
||||
this.SetExploreTime(_data.formationId)
|
||||
_item.selectIma.gameObject:SetActive(this.formationList[_data.formationId].select == 1)
|
||||
|
|
@ -379,7 +378,7 @@ function this:TimeCountDown()
|
|||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
end
|
||||
this.timer = Timer.New(function()
|
||||
local s = function()
|
||||
for i = 1,#this.itemList do
|
||||
if this.itemList[i].data and this.itemList[i].data.state > 0 then
|
||||
local time = this.itemList[i].data.exploreTime - GetTimeStamp()
|
||||
|
|
@ -392,7 +391,9 @@ function this:TimeCountDown()
|
|||
end
|
||||
end
|
||||
end
|
||||
end,1,-1,true)
|
||||
end
|
||||
s()
|
||||
this.timer = Timer.New(s,1,-1,true)
|
||||
this.timer:Start()
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ function this:InitComponent()
|
|||
-- 探索
|
||||
this.btnExplore = Util.GetGameObject(self.gameObject, "btnExplore")
|
||||
this.btnExplore.gameObject:SetActive(true)
|
||||
this.btnExploreRed = Util.GetGameObject(this.btnExplore, "redPoint")
|
||||
--鸿蒙
|
||||
this.btnHongMeng=Util.GetGameObject(self.gameObject,"RightDown/btnHongMeng")
|
||||
this.HongMengRedPoint = Util.GetGameObject(this.btnHongMeng,"redPoint")
|
||||
|
|
@ -731,6 +732,7 @@ function this.BindRedPoint()
|
|||
BindRedPointObject(RedPointType.RightUp2,this.rpRightUp2)
|
||||
BindRedPointObject(RedPointType.JumpServer_MainCity, this.rpJumpServer)
|
||||
BindRedPointObject(RedPointType.TaiChuMiJuan, this.taichumijuanRed)
|
||||
BindRedPointObject(RedPointType.ExploreFunc, this.btnExploreRed)
|
||||
end
|
||||
-- 绑定红点
|
||||
function this.ClearRedPoint()
|
||||
|
|
@ -755,6 +757,7 @@ function this.ClearRedPoint()
|
|||
ClearRedPointObject(RedPointType.RightUp2,this.rpRightUp2)
|
||||
ClearRedPointObject(RedPointType.JumpServer_MainCity, this.rpJumpServer)
|
||||
ClearRedPointObject(RedPointType.TaiChuMiJuan, this.taichumijuanRed)
|
||||
ClearRedPointObject(RedPointType.ExploreFunc, this.btnExploreRed)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
|
|
|||
|
|
@ -6352,7 +6352,6 @@ 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()
|
||||
|
|
|
|||
|
|
@ -647,6 +647,7 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.recruitTreasure_three,RecruitTreasureManager.GetRedPointStatus)
|
||||
--命格
|
||||
RPData:AddCheckFunc(RedPointType.Gem,GemManager.RedPointCheck,FUNCTION_OPEN_TYPE.Gem)
|
||||
RPData:AddCheckFunc(RedPointType.ExploreFunc,ExploreManager.CheckRedPoint)
|
||||
end
|
||||
|
||||
-- 向红点绑定物体
|
||||
|
|
|
|||
Loading…
Reference in New Issue