无尽副本提交

dev_chengFeng
jiaoyangna 2021-05-24 11:51:11 +08:00
parent 7cc12e74a8
commit a10ec722e5
8 changed files with 118 additions and 121 deletions

View File

@ -2418,7 +2418,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 81.4, y: 0}
m_AnchoredPosition: {x: 99, y: -10}
m_SizeDelta: {x: 262.8, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3333102989217380818
@ -2571,7 +2571,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -183.1, y: -2}
m_AnchoredPosition: {x: -183.1, y: -18}
m_SizeDelta: {x: 235.7, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3901255681791354113

View File

@ -148,15 +148,9 @@ end
function this.EnterMap()
-- 进入地图编队,重新赋值一遍
CarbonManager.difficulty = CARBON_TYPE.ENDLESS
local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ENDLESS_MAP)
local tempList = {}
for k,v in pairs(curFormation.teamHeroInfos) do
if EndLessMapManager.GetSingleCanUseHeroData(v.heroId) then
table.insert(tempList,v)
end
end
--UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, MapManager.curMapId)
if #tempList < 1 then
if not EndLessMapManager.IsMapTeamAlive() then
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, MapManager.curMapId)
else
MapManager.curMapId = EndLessMapManager.openMapId

View File

@ -174,18 +174,6 @@ function this.DeleteDeadRole()
end
-- 判断队伍是否还有活着的人
function this.IsMapTeamAlive()
--LogGreen("编队人数:"..#MapManager.formationList)
for i = 1, #MapManager.formationList do
if MapManager.formationList[i].allProVal[2] > 0 then
return true
end
end
return false
end
-- 刷新编队界面得到的编队以及地图中的编队数据, 只有打开编队界面才刷新地图编队
function this.RrefreshFormation()
@ -736,6 +724,25 @@ function this.IsAllDead()
end
return true
end
-- 判断队伍是否还有活着的人
function this.IsMapTeamAlive()
local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ENDLESS_MAP)
local tempList = {}
for k,v in pairs(curFormation.teamHeroInfos) do
if EndLessMapManager.GetSingleCanUseHeroData(v.heroId) then
LogGreen("EndLessMapManager.allHeroBlood[v.heroId].percentHp:"..EndLessMapManager.allHeroBlood[v.heroId].percentHp)
if EndLessMapManager.allHeroBlood[v.heroId].percentHp > 0 then
table.insert(tempList,v)
end
end
end
if #tempList < 1 then
return false
else
return true
end
end
---------------------------------------------------------任务-----------------------------------
function this.InitMissionData()
this.mission = {}

View File

@ -86,12 +86,12 @@ function this:InitComponent()
playerView.InitComponent(self.gameObject, this)
ctrlView.InitComponent(self.gameObject, this, playerView)
trialPanel:InitComponent(self.gameObject, this)
endLessMapView.InitComponent(self.gameObject, this)
endLessMapView:InitComponent(self.gameObject, this)
end
function this:OnSortingOrderChange()
trialPanel.OnSortingOrderChange()
endLessMapView.OnSortingOrderChange()
endLessMapView:OnSortingOrderChange()
end
--绑定事件(用于子类重写)
function this:BindEvent()
@ -101,6 +101,7 @@ function this:BindEvent()
PopupTipPanel.ShowTip(Language[11258])
return
end
--this:ClosePanel()
this.SetEliteBackShow()
this.SetEndlessShow()
end)
@ -145,7 +146,7 @@ function this:BindEvent()
--missionView.BindEvent()
trialPanel:BindEvent()
endLessMapView.BindEvent()
endLessMapView:BindEvent()
end
@ -186,7 +187,7 @@ function this:AddListener()
ctrlView.AddListener()
trialPanel:AddListener()
endLessMapView.AddListener()
endLessMapView:AddListener()
pointHandleView.AddListener()
end
@ -206,7 +207,7 @@ function this:RemoveListener()
ctrlView.RemoveListener()
trialPanel:RemoveListener()
endLessMapView.RemoveListener()
endLessMapView:RemoveListener()
pointHandleView.RemoveListener()
end
@ -222,7 +223,7 @@ function this:OnShow()
end
playerView.OnShow()
endLessMapView.OnShow()
endLessMapView:OnShow()
pointHandleView.OnShow()
trialPanel:OnShow()
this:SetActiveGameObj()
@ -230,6 +231,7 @@ end
function this:SetActiveGameObj()
local isShow = MapManager.curCarbonType == CarBonTypeId.TRIAL
LogGreen("MapManager.curCarbonType:"..MapManager.curCarbonType)
this.helpBtn.gameObject:SetActive(isShow)
this.leftUp.gameObject:SetActive(isShow)
this.btnRank.gameObject:SetActive(isShow)
@ -278,7 +280,7 @@ function this:OnOpen(...)
EndLessMapManager.srcMapId = MapManager.curMapId
--missionView.Init()
trialPanel:OnOpen()
endLessMapView.OnOpen()
endLessMapView:OnOpen()
-- 副本相关的初始化设置
this.InitCarbonSet()
-- 如果100%,弹出离开界面
@ -401,7 +403,7 @@ function this:OnClose()
UIManager.camera.clearFlags = CameraClearFlags.Skybox
trialPanel:OnClose()
endLessMapView.OnClose()
endLessMapView:OnClose()
MapTrialManager.firstEnter = false
-- 记录界面关闭但是没有注销
@ -492,7 +494,7 @@ function this:OnDestroy()
this.Dispose()
trialPanel:OnDestroy()
endLessMapView.OnDestroy()
endLessMapView:OnDestroy()
_PropItemList = {}
@ -536,6 +538,7 @@ function this.BackHome()
triggerCallBack = function (panelType, panel)
if panelType == UIName.MapPanel then
this.Dispose()
this:ClosePanel()
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnClose, triggerCallBack)
end
-- BagManager.InBagGetMapBag()
@ -622,7 +625,7 @@ function this.ChangeMap(nextMapId)
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
-- 更新行动力
Log("传送一下")
endLessMapView.OnRoleTransport(function ()
endLessMapView:OnRoleTransport(function ()
end)
end
SwitchPanel.OpenPanel(UIName.MapPanel)
@ -688,7 +691,7 @@ function this.OnEndLessDead(lastPos)
ctrlView.SetCtrlState(false)
-- 无尽副本中死亡扣行动力
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
endLessMapView.OnRoleDead()
endLessMapView:OnRoleDead()
end
end
@ -718,7 +721,7 @@ function this.OnDeadCount(startTime, lastPos)
-- 无尽副本中死亡扣行动力
if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
endLessMapView.OnRoleDead()
endLessMapView:OnRoleDead()
end
end

View File

@ -187,15 +187,6 @@ function this.InitShowState()
if istrialMap then this.InitTrial() end
this.upView.gameObject:SetActive(CarbonManager.difficulty ~= 4)
this.upView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
this.helpBtn:SetActive(istrialMap)
MapPanel.btnBag.gameObject:SetActive(false)
MapPanel.btnTeam.gameObject:SetActive(false)
MapPanel.btnSetting.gameObject:SetActive(true)
MapPanel.btnRank.gameObject:SetActive(true)
MapPanel.btnXingYao.gameObject:SetActive(true)
MapPanel.btnReward.gameObject:SetActive(true)
-- MapPanel.warnRoot:SetActive(false)
-- MapPanel.warn:SetActive(false)
this.CheckTrialHeroInfo()
this.InitTrialMission()
@ -251,7 +242,7 @@ function this.UpdatePowerValue()
end
powerValue = MapTrialManager.powerValue
this.SetTargetState(powerValue)
--this.SetTargetState(powerValue)
local _value= powerValue--表现值
_value= _value <= 0 and 0 or _value
_value = _value >= 100 and 100 or _value
@ -458,12 +449,13 @@ function TrialMapPanel:OnClose()
this.timer:Stop()
this.timer = nil
end
Util.ClearChild(this.s_grid.transform)
heroList={}
end
function TrialMapPanel:OnDestroy()
ClearRedPointObject(RedPointType.TrialReward)
SubUIManager.Close(this.upView)
heroList={}
end
@ -471,7 +463,7 @@ end
function this.SetSelectHero(isFirstIn,isFirstData,isMainIn)
local itemId=trialSetting[1].HealingId[1]
local itemNum=trialSetting[1].HealingId[2]
this.selectHero:SetActive((true) and (MapManager.curCarbonType == CarBonTypeId.TRIAL))
this.selectHero:SetActive(true)
local d = MapManager.trialHeroInfo
for k = 1, this.s_grid.transform.childCount do
this.s_grid.transform:GetChild(k-1).gameObject:SetActive(false)

View File

@ -33,7 +33,7 @@ local deadCost = 0
local walkCost = 0
function this.InitComponent(gameObject, mapPanel)
function EndLessMapView:InitComponent(gameObject, mapPanel)
MapPanel = mapPanel
-- 地图名字显示
this.areaName = Util.GetGameObject(gameObject, "endLessTitle/AreaImg/mapName"):GetComponent("Text")
@ -92,11 +92,11 @@ function this.InitComponent(gameObject, mapPanel)
this.endLessTreasureRed = Util.GetGameObject(this.endLessTreasure ,"redPoint")
end
function this.OnSortingOrderChange()
function EndLessMapView:OnSortingOrderChange()
end
function this.BindEvent()
function EndLessMapView:BindEvent()
-- --帮助按钮
-- Util.AddClick(this.helpBtn,function()
-- if ctrlView.GetCallListCount() > 1 then
@ -111,7 +111,7 @@ function this.BindEvent()
-- PopupTipPanel.ShowTip(Language[11259])
-- return
-- end
-- if not this.CanClick() then return end
-- if not this:CanClick() then return end
-- -- 复位角色的状态
-- MsgPanel.ShowTwo(Language[11277], nil, function()
-- this.ResetRoleState()
@ -123,7 +123,7 @@ function this.BindEvent()
PopupTipPanel.ShowTip(Language[11259])
return
end
if not this.CanClick() then return end
if not this:CanClick() then return end
local u = function(pro)
local str = ""
for i = 1,#pro do
@ -182,7 +182,7 @@ function this.BindEvent()
PopupTipPanel.ShowTip(Language[11259])
return
end
if not this.CanClick() then return end
if not this:CanClick() then return end
local data = EndLessMapManager.treasureData
UIManager.OpenPanel(UIName.EndLessTreasurePanel,data)
end)
@ -192,7 +192,7 @@ function this.BindEvent()
PopupTipPanel.ShowTip(Language[11259])
return
end
if not this.CanClick() then return end
if not this:CanClick() then return end
NetManager.RequestAllHeroHp(function ()
-- UIManager.OpenPanel(UIName.FormationPanel, FORMATION_TYPE.CARBON, MapManager.curMapId)
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.CARBON, MapManager.curMapId)
@ -204,7 +204,7 @@ function this.BindEvent()
if this.curMission.state == 1 then
NetManager.TakeMissionRewardRequest(TaskTypeDef.wujinfuben,this.curMission.Id,function(msg)
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function (msg)
this.RefreshTargetRoote()
this:RefreshTargetRoote()
end)
end)
else
@ -212,11 +212,11 @@ function this.BindEvent()
PopupTipPanel.ShowTip(Language[11259])
return
end
if not this.CanClick() then return end
if not this:CanClick() then return end
UIManager.OpenPanel(UIName.TrialRewardPopup,EndLessMapManager.SetRewardData(),function(id,rewardFunc)
NetManager.TakeMissionRewardRequest(TaskTypeDef.wujinfuben,id,function (msg)
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
this.RefreshTargetRoote()
this:RefreshTargetRoote()
if rewardFunc then
rewardFunc()
end
@ -234,7 +234,7 @@ function this.BindEvent()
return
end
Log("行走路径长度 ----- " .. #MapManager.stepList)
if not this.CanClick() then return end
if not this:CanClick() then return end
if #MapManager.stepList > 0 then
MapManager.MapUpdateEvent(-1000, function ()
Log("购买之前同步位置!!")
@ -246,7 +246,7 @@ function this.BindEvent()
end)
end
function this.AddListener()
function EndLessMapView:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Map.OnAddNotePoint, this.SetNoteShow)
Game.GlobalEvent:AddEvent(GameEvent.Map.OnRemoveNotePoint, this.SetNoteShow)
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, this.GetBagEnergy)
@ -254,7 +254,7 @@ function this.AddListener()
Game.GlobalEvent:AddEvent(GameEvent.EndLess.MissonChange,this.RefreshTargetRoote)
end
function this.RemoveListener()
function EndLessMapView:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Map.OnAddNotePoint, this.SetNoteShow)
Game.GlobalEvent:RemoveEvent(GameEvent.Map.OnRemoveNotePoint, this.SetNoteShow)
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.GetBagEnergy)
@ -264,21 +264,21 @@ end
function this.OnOpen()
function EndLessMapView:OnOpen()
-- 初始化组件显示
this.InitCompShow(CarbonManager.difficulty)
if not this.IsEndLessMap() then return end
this:InitCompShow(CarbonManager.difficulty)
if not this:IsEndLessMap() then return end
-- 初始化各种标志的状态
this.InitBoolState()
this:InitBoolState()
-- 开始探索请求
-- this.StartExplore()
-- MapPanel.SetRoleShow(MapManager.mapScale, MapManager.roleInitPos,0)
-- 设置任务显示
this.SetTipShow()
this:SetTipShow()
-- 初始化行动力消耗的类型数值
this.InitCostValue()
this.RefreshEnergyValue(true, 0)
this.RefreshEnergyShow()
this:InitCostValue()
this:RefreshEnergyValue(true, 0)
this:RefreshEnergyShow()
Util.GetGameObject(MapPanel.gameObject, "centerDown/selectHero"):SetActive(false)
this.helpBtn:SetActive(false)
@ -286,18 +286,18 @@ function this.OnOpen()
GuideManager.CheckCarbonGuild(CARBON_TYPE.ENDLESS)
end
function this.OnShow()
if not this.IsEndLessMap() then return end
function EndLessMapView:OnShow()
if not this:IsEndLessMap() then return end
-- 避免其他界面打开时不刷新问题
-- 界面再次打开时,如果没有主动刷新过,则不需要刷新显示
--if not EndLessMapManager.isUpdateOnClose and not EndLessMapManager.openedFormat then
-- this.GetBagEnergy()
-- this:GetBagEnergy()
-- EndLessMapManager.isUpdateOnClose = false
--end
-- 如果全屏界面打开时刷新过,重新激活界面需要刷新一次
if EndLessMapManager.isUpdateOnClose then
this.GetBagEnergy()
this:GetBagEnergy()
EndLessMapManager.isUpdateOnClose = false
end
@ -311,16 +311,17 @@ function this.OnShow()
this.isPanelClose = false
-- 刷新倒计时显示
this.ShowCountTime()
this.RefreshTargetRoote()
this.ShowHeroData()
this:ShowCountTime()
this:RefreshTargetRoote()
this:ShowHeroData()
end
function this.ShowHeroData()
function EndLessMapView:ShowHeroData()
local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ENDLESS_MAP)
if not this.heroList then
this.heroList = {}
end
LogGreen("this.heroList:"..#this.heroList)
for k = 1, #this.heroList do
this.heroList[k].go.gameObject:SetActive(false)
end
@ -341,19 +342,19 @@ function this.ShowHeroData()
this.heroList[i].go.gameObject:SetActive(true)
this.heroList[i].heroId = v.heroId
local heroData = HeroManager.GetSingleHeroData(v.heroId)
this.heroList[i].frame.sprite=Util.LoadSprite(GetHeroQuantityImageByquality(heroConfig[v.tmpId].Quality, v.star))
SetHeroIcon(v,this.heroList[i].icon,heroConfig[v.tmpId])
this.heroList[i].pro.sprite=Util.LoadSprite(GetProStrImageByProNum(heroConfig[v.tmpId].PropertyName))
this.heroList[i].lv.text=v.level
SetHeroStars(this.heroList[i].star, v.star)
this.heroList[i].frame.sprite=Util.LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality, v.star))
SetHeroIcon(v,this.heroList[i].icon,heroData.heroConfig)
this.heroList[i].pro.sprite=Util.LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
this.heroList[i].lv.text=heroData.lv
SetHeroStars(this.heroList[i].star, heroData.star)
--血量相关
this.heroList[i].hpExp.value=v.heroHp/10000
Util.SetGray(this.heroList[i].go,v.heroHp<=0)--死啦
this.heroList[i].hpExp.value=heroData.hp/10000
Util.SetGray(this.heroList[i].go,heroData.hp<=0)--死啦
end
end
function this.RefreshTargetRoote()
function EndLessMapView:RefreshTargetRoote()
this.curMission = EndLessMapManager.GetRewardData()
if this.curMission.state == 0 then
this.TargetBtn1.gameObject:SetActive(true)
@ -370,7 +371,7 @@ function this.RefreshTargetRoote()
end
end
function this.SetShiQiValue()
function EndLessMapView:SetShiQiValue()
local cursinglePro
local itemCount = BagManager.GetItemCountById(this.shiQiValue)
local id, lv = EndLessMapManager.GetShiQiValue()
@ -428,7 +429,7 @@ function this.SetShiQiValue()
end
end
function this.InitCompShow(carbonType)
function EndLessMapView:InitCompShow(carbonType)
if carbonType ~= CARBON_TYPE.ENDLESS then
return
end
@ -450,20 +451,20 @@ function this.InitCompShow(carbonType)
end
-- ================================================
-- ============ 初始化设置 =========================
function this.IsEndLessMap()
function EndLessMapView:IsEndLessMap()
return CarbonManager.difficulty == CARBON_TYPE.ENDLESS
end
function this.SetTipShow()
function EndLessMapView:SetTipShow()
Log("MapManager.curMapId ========== " .. MapManager.curMapId)
-- if not this.IsEndLessMap() then return end
-- if not this:IsEndLessMap() then return end
if not endLessData[MapManager.curMapId] then Log(Language[11278]) return end
this.areaName.text = GetLanguageStrById(endLessData[MapManager.curMapId].Info)
EndLessMapManager.curMapName = GetLanguageStrById(endLessData[MapManager.curMapId].Info)
end
function this.InitBoolState()
function EndLessMapView:InitBoolState()
EndLessMapManager.isCanNote = false
EndLessMapManager.justEnterMap = true
EndLessMapManager.isReset = false
@ -471,8 +472,8 @@ end
-- ===================================================
-- ========= 各种按键操作的设置 =========================
-- 复位设置
function this.ResetRoleState()
--if not this.CanClick() then return end
function EndLessMapView:ResetRoleState()
--if not this:CanClick() then return end
-- 重置角色位置(目前没有表现,做一下延迟)
Timer.New(function ()
-- 通信一次
@ -502,7 +503,7 @@ function this.ResetRoleState()
end
-- 标记设置
function this.SetNoteShow()
function EndLessMapView:SetNoteShow()
-- 进入标记状态
EndLessMapManager.isCanNote = not EndLessMapManager.isCanNote
local canNote = EndLessMapManager.isCanNote
@ -514,7 +515,7 @@ function this.SetNoteShow()
end
-- 按钮可点击的判断
function this.CanClick()
function EndLessMapView:CanClick()
local canClick = true
-- 如果正在触发事件,不可复位
@ -532,20 +533,20 @@ function this.CanClick()
end
--- ============= 行动力刷新显示 ==============================
function this.OnRoleMove(u, v)
function EndLessMapView:OnRoleMove(u, v)
-- 只有无尽副本才执行
if not this.IsEndLessMap() then return end
this.RefreshEnergyValue(false, COST_TYPE.WALK)
if not this:IsEndLessMap() then return end
this:RefreshEnergyValue(false, COST_TYPE.WALK)
end
-- 初始化数值
function this.InitCostValue()
function EndLessMapView:InitCostValue()
local mapData = endLessData[MapManager.curMapId]
walkCost = mapData.WalkCost
deadCost = mapData.DeathCost
-- 同步一次道具数据
this.GetBagEnergy()
this:GetBagEnergy()
-- 显示你有多少钱钱
this.moneyNum:GetComponent("Text").text = BagManager.GetTotalItemNum(1201)
@ -553,7 +554,7 @@ function this.InitCostValue()
end
-- 根据类型刷新行动力数值
function this.RefreshEnergyValue(isInit, costType)
function EndLessMapView:RefreshEnergyValue(isInit, costType)
-- 只是初始化返回
-- LogBlue("两次吧")
if isInit then return end
@ -593,19 +594,19 @@ function this.RefreshEnergyValue(isInit, costType)
EndLessMapManager.leftEnergy = curEnergy
EndLessMapManager.isHungery()
this.RefreshEnergyShow()
this:RefreshEnergyShow()
-- 行动力从满状态切换到不满时启动定时器, 告诉服务器我走了
if preEnergy == EndLessMapManager.GetTotalEnergy() and curEnergy < EndLessMapManager.GetTotalEnergy() then
MapManager.MapUpdateEvent(-1000, function ()
Log("满行动力状态切换同步倒计时")
this.ShowCountTime()
this:ShowCountTime()
end)
end
end
-- 刷新行动力组件显示
function this.RefreshEnergyShow()
function EndLessMapView:RefreshEnergyShow()
local curEnergy = EndLessMapManager.leftEnergy
if curEnergy <= 0 then
ctrlView.StopWalk()
@ -626,36 +627,36 @@ function this.RefreshEnergyShow()
end
-- 刷新数值
function this.GetBagEnergy()
function EndLessMapView:GetBagEnergy()
-- 无尽副本才刷新
if not this.IsEndLessMap() then return end
if not this:IsEndLessMap() then return end
EndLessMapManager.leftEnergy = BagManager.GetItemCountById(1)
Log("获取背包剩余行动力" .. BagManager.GetItemCountById(1))
EndLessMapManager.isHungery()
this.RefreshEnergyShow()
this:RefreshEnergyShow()
-- 显示你有多少钱钱
this.moneyNum:GetComponent("Text").text = BagManager.GetTotalItemNum(1201)
this.moneyIcon:GetComponent("Image").sprite = SetIcon(1201)
this.SetShiQiValue()
this:SetShiQiValue()
end
-- 无尽副本中角色死翘翘
function this.OnRoleDead()
this.RefreshEnergyValue(false, COST_TYPE.DEAD)
function EndLessMapView:OnRoleDead()
this:RefreshEnergyValue(false, COST_TYPE.DEAD)
-- 死亡退出触发事件状态
EndLessMapManager.isTrigger = false
-- 看看是否是死光光了
if EndLessMapManager.IsAllDead() then
PopupTipPanel.ShowTip(Language[11282])
this.ResetRoleState()
this:ResetRoleState()
end
end
-- 无尽副本在地图之间传送
function this.OnRoleTransport(func)
function EndLessMapView:OnRoleTransport(func)
EndLessMapManager.GetLeftEnergy(function ()
this.RefreshEnergyValue(false, COST_TYPE.TRANSPORT)
this:RefreshEnergyValue(false, COST_TYPE.TRANSPORT)
if func then func() end
end)
end
@ -671,7 +672,7 @@ end
-- end
-- 行动力是否显示倒计时
function this.ShowCountTime()
function EndLessMapView:ShowCountTime()
this.timer = nil
this.actCountTime.text = ""
this.bgTime:SetActive(not EndLessMapManager.EnergyEnough())
@ -699,8 +700,8 @@ end
--- ==========================================================
function this.OnClose()
if not this.IsEndLessMap() then return end
function EndLessMapView:OnClose()
if not this:IsEndLessMap() then return end
-- this.warn:SetActive(false)
this.isPanelClose = true
EndLessMapManager.isUpdateOnClose = false
@ -708,11 +709,13 @@ function this.OnClose()
this.timer:Stop()
this.timer = nil
end
Util.ClearChild(this.selectHeroGrid.transform)
this.heroList = {}
LogGreen("this.heroList:"..#this.heroList)
end
function this.OnDestroy()
if not this.IsEndLessMap() then return end
this.heroList = {}
function EndLessMapView:OnDestroy()
if not this:IsEndLessMap() then return end
ClearRedPointObject(RedPointType.wujinTreasure,this.endLessTreasureRed)
ClearRedPointObject(RedPointType.wujinMission,this.btnNoteRed)
end

View File

@ -42,7 +42,6 @@ function this.Init()
TileMapView.OnInit = this.OnInit
TileMapView.fogSize = MapManager.fogSize
LogGreen("MapManager.curMapId:"..tostring(MapManager.curMapId))
TileMapView.AwakeInit(this.Ctrl, MapManager.curMapId, MapManager.wakeCells)
TileMapController.IsShieldDrag = function()

View File

@ -45,7 +45,6 @@ function this.InitComponent(gameObject, mapPanel)
MapPanel = mapPanel
this.DragCtrl = Util.GetGameObject(gameObject, "Ctrl")
this.floatblood = Util.GetGameObject(gameObject, "FloatBlood")
end
function this.AddListener()