森罗环境 炸弹 终于完了
parent
f806272897
commit
ee4ecf49c2
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -22,8 +22,8 @@ local _PointerUpList = {}
|
|||
function this:InitComponent()
|
||||
|
||||
-- 通用图标
|
||||
this.BtnBack = Util.GetGameObject(self.gameObject, "rightUp/btnBack")
|
||||
this.BtnBack2 = Util.GetGameObject(self.gameObject, "centerDown/bg/btnBack")
|
||||
-- this.BtnBack = Util.GetGameObject(self.gameObject, "rightUp/btnBack")
|
||||
this.BtnBack = Util.GetGameObject(self.gameObject, "centerDown/bg/btnBack")
|
||||
this.btnAchive = Util.GetGameObject(self.gameObject, "rightDown/btnAchive")
|
||||
this.btnBag = Util.GetGameObject(self.gameObject, "rightUp/btnBag")
|
||||
this.btnTeam = Util.GetGameObject(self.gameObject, "rightUp/btnTeam")
|
||||
|
|
@ -35,8 +35,8 @@ function this:InitComponent()
|
|||
|
||||
this.item = Util.GetGameObject(self.gameObject, "item")
|
||||
-- 显示死亡计时时间
|
||||
this.deadRoot = Util.GetGameObject(self.gameObject, "RevivePanel")
|
||||
this.deadTime = Util.GetGameObject(self.gameObject, "RevivePanel/bg/Time"):GetComponent("Text")
|
||||
-- this.deadRoot = Util.GetGameObject(self.gameObject, "RevivePanel")
|
||||
-- this.deadTime = Util.GetGameObject(self.gameObject, "RevivePanel/bg/Time"):GetComponent("Text")
|
||||
|
||||
-- buff显示
|
||||
this.propList = Util.GetGameObject(self.transform, "centerDown/bufflist")
|
||||
|
|
@ -79,14 +79,14 @@ function this:BindEvent()
|
|||
this.SetEliteBackShow()
|
||||
this.SetEndlessShow()
|
||||
end)
|
||||
Util.AddClick(this.BtnBack2, function ()
|
||||
if ctrlView.GetCallListCount() > 1 then
|
||||
PopupTipPanel.ShowTip(Language[11232])
|
||||
return
|
||||
end
|
||||
this.SetEliteBackShow()
|
||||
this.SetEndlessShow()
|
||||
end)
|
||||
-- Util.AddClick(this.BtnBack2, function ()
|
||||
-- if ctrlView.GetCallListCount() > 1 then
|
||||
-- PopupTipPanel.ShowTip(Language[11232])
|
||||
-- return
|
||||
-- end
|
||||
-- this.SetEliteBackShow()
|
||||
-- this.SetEndlessShow()
|
||||
-- end)
|
||||
|
||||
-- 功绩按钮
|
||||
Util.AddClick(this.btnAchive, function ()
|
||||
|
|
@ -265,13 +265,13 @@ end
|
|||
|
||||
function this.InitCarbonSet()
|
||||
-- 死亡表现
|
||||
this.deadRoot:SetActive(false)
|
||||
-- this.deadRoot:SetActive(false)
|
||||
-- 面板遮罩
|
||||
this.Mask:SetActive(not MapManager.isOpen)
|
||||
|
||||
--如果是在序章
|
||||
local isStartMap = MapManager.curMapId == 100
|
||||
this.BtnBack2:SetActive(not isStartMap)
|
||||
this.BtnBack:SetActive(not isStartMap)
|
||||
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ function TrialMapPanel:InitComponent(root, mapPanel)
|
|||
this.upView = SubUIManager.Open(SubUIConfig.UpView, root.transform, { showType = UpViewOpenType.ShowLeft })
|
||||
this.helpBtn=Util.GetGameObject(root,"helpBtn")
|
||||
this.helpPos=this.helpBtn:GetComponent("RectTransform").localPosition
|
||||
--boss召唤特效
|
||||
this.bossEffect = Util.GetGameObject(root, "UI_effect_shilian_tab")
|
||||
end
|
||||
|
||||
|
||||
|
|
@ -127,7 +129,7 @@ end
|
|||
--界面打开时调用(用于子类重写)
|
||||
function TrialMapPanel:OnOpen()
|
||||
this.powerRoot:SetActive(CarbonManager.difficulty == 2)
|
||||
this.btnBomb:SetActive(false)--CarbonManager.difficulty == 2)
|
||||
this.btnBomb:SetActive(CarbonManager.difficulty == 2)
|
||||
-- 商店
|
||||
this.buffShop:SetActive(CarbonManager.difficulty == CARBON_TYPE.TRIAL)
|
||||
this.normalShop:SetActive(CarbonManager.difficulty == CARBON_TYPE.TRIAL)
|
||||
|
|
@ -140,8 +142,6 @@ function TrialMapPanel:OnOpen()
|
|||
end
|
||||
|
||||
function TrialMapPanel:OnShow()
|
||||
-- if CarbonManager.difficulty ~= 2 then return end
|
||||
-- this.InitShowState()
|
||||
end
|
||||
|
||||
function this.InitShowState()
|
||||
|
|
@ -207,7 +207,6 @@ function this.UpdatePowerValue()
|
|||
else
|
||||
this.levelNum.text = string.format(Language[11252], MapTrialManager.curTowerLevel)
|
||||
end
|
||||
|
||||
LogPink(Language[11253] .. MapTrialManager.curTowerLevel)
|
||||
powerValue = MapTrialManager.powerValue
|
||||
|
||||
|
|
@ -221,9 +220,15 @@ function this.UpdatePowerValue()
|
|||
|
||||
-- -1时召唤boss
|
||||
if powerValue == -1 then
|
||||
-- 停止自动寻路
|
||||
-- ctrlView.OnRoleDead()
|
||||
UIManager.OpenPanel(UIName.TrialOpPanel, 1)
|
||||
this.bossEffect:SetActive(true)--进图显示召唤boss
|
||||
-- 界面打开时删除所有小怪
|
||||
this.KillAllBitch()
|
||||
ctrlView.CallListPop()
|
||||
local timer1 = Timer.New(function ()
|
||||
MapTrialManager.canMove = true
|
||||
this.bossEffect:SetActive(false)
|
||||
end, 1.5)
|
||||
timer1:Start()
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -272,7 +277,7 @@ function this.InitBuffInfo()
|
|||
if CarbonManager.difficulty ~= 2 then return end
|
||||
-- 补给点数量显示
|
||||
local num = 0
|
||||
local buffList = FoodBuffManager.GetBuffPropList()--MapTrialManager.GetBuffList()
|
||||
local buffList = FoodBuffManager.GetBuffPropList()
|
||||
if buffList then
|
||||
num = #buffList
|
||||
end
|
||||
|
|
@ -301,7 +306,6 @@ end
|
|||
|
||||
-- 试炼副本任务初始化
|
||||
function this.InitTrialMission()
|
||||
-- this.leftLifeRoot:SetActive(istrialMap)
|
||||
this.powerRoot:SetActive(istrialMap)
|
||||
local imgDone = Util.GetGameObject(this.targetRoot, "imgDone")
|
||||
local imgDoing = Util.GetGameObject(this.targetRoot, "imgDoing")
|
||||
|
|
@ -395,7 +399,6 @@ function this.TrialShowTime()
|
|||
this.mapTime.text = TimeToHMS(t)..Language[11260]
|
||||
end, 1, -1, true)
|
||||
this.timer:Start()
|
||||
-- this.mapTime.text = this.FormatTime(time)
|
||||
end
|
||||
|
||||
-- 转换时间
|
||||
|
|
@ -419,9 +422,6 @@ function this.CheckTrialHeroInfo()
|
|||
this.SetSelectHero(true,d,false)
|
||||
end)
|
||||
else
|
||||
-- for i, v in ipairs(MapManager.trialHeroInfo) do
|
||||
-- LogPink(v.heroId.." "..v.tmpId.." "..v.star.." "..v.heroHp)
|
||||
-- end
|
||||
this.SetSelectHero(false,nil,true) --true从入口进入副本 默认选择第一个Hero
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,29 +10,27 @@ local ctrlView = require("Modules/Map/View/MapControllView")
|
|||
local go
|
||||
local canCallBoss = true
|
||||
-- 炸弹怪
|
||||
local theBombBitch = "live2d_m_hypd_0003"
|
||||
-- local theBombBitch = "live2d_m_hypd_0003"
|
||||
--初始化组件(用于子类重写)
|
||||
function TrialOpPanel:InitComponent()
|
||||
|
||||
this.btnCallBoss = Util.GetGameObject(self.gameObject, "UI_effect_shilian_tab/btnCallBoss")
|
||||
this.btnUseBomb = Util.GetGameObject(self.gameObject, "BombRoot/monsterRoot/btnUseBomb")
|
||||
-- this.btnCallBoss = Util.GetGameObject(self.gameObject, "UI_effect_shilian_tab/btnCallBoss")
|
||||
-- this.btnUseBomb = Util.GetGameObject(self.gameObject, "BombRoot/monsterRoot/btnUseBomb")
|
||||
--特效节点
|
||||
this.bossEffect = Util.GetGameObject(self.gameObject, "UI_effect_shilian_tab")
|
||||
this.bombRoot = Util.GetGameObject(self.gameObject, "BombRoot/monsterRoot")
|
||||
this.bombEffect = Util.GetGameObject(self.gameObject, "BombRoot/UI_effect_boom")
|
||||
-- this.bombRoot = Util.GetGameObject(self.gameObject, "BombRoot/monsterRoot")
|
||||
-- this.bombEffect = Util.GetGameObject(self.gameObject, "BombRoot/UI_effect_boom")
|
||||
-- 炮兵父节点
|
||||
this.live2dRoot = Util.GetGameObject(self.gameObject, "BombRoot/monsterRoot/live2dRoot")
|
||||
this.btnBack = Util.GetGameObject(self.gameObject, "BombRoot/monsterRoot/btnBack")
|
||||
-- this.live2dRoot = Util.GetGameObject(self.gameObject, "BombRoot/monsterRoot/live2dRoot")
|
||||
-- this.btnBack = Util.GetGameObject(self.gameObject, "BombRoot/monsterRoot/btnBack")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function TrialOpPanel:BindEvent()
|
||||
|
||||
-- Util.AddClick(this.btnCallBoss, this.CallBoss)
|
||||
Util.AddClick(this.btnUseBomb, this.UseBomb)
|
||||
Util.AddClick(this.btnBack, function ()
|
||||
self:ClosePanel()
|
||||
end)
|
||||
-- Util.AddClick(this.btnUseBomb, this.UseBomb)
|
||||
-- Util.AddClick(this.btnBack, function ()
|
||||
-- self:ClosePanel()
|
||||
-- end)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
|
@ -57,11 +55,9 @@ end
|
|||
|
||||
-- 初始化界面显示
|
||||
function this.InitBtnShow()
|
||||
-- ctrlView.BattleEnd()
|
||||
if panelType == 1 then
|
||||
-- if panelType == 1 then
|
||||
this.bossEffect:SetActive(true)--进图显示召唤boss
|
||||
this.bombRoot:SetActive(false)
|
||||
-- canCallBoss = true
|
||||
-- this.bombRoot:SetActive(false)
|
||||
-- 界面打开时删除所有小怪
|
||||
this.KillAllBitch()
|
||||
ctrlView.CallListPop()
|
||||
|
|
@ -70,84 +66,81 @@ function this.InitBtnShow()
|
|||
MapTrialManager.canMove = true
|
||||
end, 1.5)
|
||||
timer1:Start()
|
||||
elseif panelType == 2 then
|
||||
this.bossEffect:SetActive(false)
|
||||
this.bombRoot:SetActive(true)
|
||||
this.LoadTheBitch()
|
||||
end
|
||||
-- elseif panelType == 2 then
|
||||
-- this.bossEffect:SetActive(false)
|
||||
-- this.bombRoot:SetActive(true)
|
||||
-- this.LoadTheBitch()
|
||||
-- end
|
||||
end
|
||||
|
||||
function this.CallBoss()
|
||||
if canCallBoss then
|
||||
canCallBoss = false
|
||||
MapManager.MapUpdateEvent(-1000, function ()
|
||||
-- 初始化路径
|
||||
ctrlView.CallListPop()
|
||||
NetManager.RequestMapBoss(function (msg)
|
||||
Log(Language[11267] .. msg.type)
|
||||
local u, v = Map_Pos2UV(msg.monsterInfo.cellId)
|
||||
Log(Language[11268] .. u)
|
||||
Log(Language[11269] .. v)
|
||||
local pos = msg.monsterInfo.cellId
|
||||
local mapPoint = msg.monsterInfo.pointId
|
||||
MapTrialManager.bossType = msg.type
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointAdd, pos, mapPoint)
|
||||
-- function this.CallBoss()
|
||||
-- if canCallBoss then
|
||||
-- canCallBoss = false
|
||||
-- MapManager.MapUpdateEvent(-1000, function ()
|
||||
-- -- 初始化路径
|
||||
-- ctrlView.CallListPop()
|
||||
-- NetManager.RequestMapBoss(function (msg)
|
||||
-- Log(Language[11267] .. msg.type)
|
||||
-- local u, v = Map_Pos2UV(msg.monsterInfo.cellId)
|
||||
-- Log(Language[11268] .. u)
|
||||
-- Log(Language[11269] .. v)
|
||||
-- local pos = msg.monsterInfo.cellId
|
||||
-- local mapPoint = msg.monsterInfo.pointId
|
||||
-- MapTrialManager.bossType = msg.type
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointAdd, pos, mapPoint)
|
||||
|
||||
-- 更新精气值
|
||||
MapTrialManager.isHaveBoss = true
|
||||
MapTrialManager.UpdatePowerValue(-1)
|
||||
this.bossEffect:SetActive(false)
|
||||
this.bombRoot:SetActive(false)
|
||||
TrialOpPanel:ClosePanel()
|
||||
MapTrialManager.canMove = true
|
||||
-- 打开召唤的类界面
|
||||
UIManager.OpenPanel(UIName.TrialBossTipPopup, msg.type)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
end
|
||||
-- -- 更新精气值
|
||||
-- MapTrialManager.isHaveBoss = true
|
||||
-- MapTrialManager.UpdatePowerValue(-1)
|
||||
-- this.bossEffect:SetActive(false)
|
||||
-- this.bombRoot:SetActive(false)
|
||||
-- TrialOpPanel:ClosePanel()
|
||||
-- MapTrialManager.canMove = true
|
||||
-- -- 打开召唤的类界面
|
||||
-- UIManager.OpenPanel(UIName.TrialBossTipPopup, msg.type)
|
||||
-- end)
|
||||
-- end)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
function this.UseBomb()
|
||||
this.bombRoot:SetActive(false)
|
||||
this.bombEffect:SetActive(true)
|
||||
-- function this.UseBomb()
|
||||
-- this.bombRoot:SetActive(false)
|
||||
-- this.bombEffect:SetActive(true)
|
||||
|
||||
-- 等待特效播放完毕
|
||||
local timer = Timer.New(function ()
|
||||
this.I_Need_A_Bomb()
|
||||
end, 1.5)
|
||||
timer:Start()
|
||||
end
|
||||
-- -- 等待特效播放完毕
|
||||
-- local timer = Timer.New(function ()
|
||||
-- this.I_Need_A_Bomb()
|
||||
-- end, 1.5)
|
||||
-- timer:Start()
|
||||
-- end
|
||||
|
||||
-- 加载炮兵
|
||||
function this.LoadTheBitch()
|
||||
-- 加载炮兵
|
||||
go = poolManager:LoadLive(theBombBitch, this.live2dRoot.transform, Vector3.one, Vector3.zero)
|
||||
end
|
||||
-- function this.LoadTheBitch()
|
||||
-- -- 加载炮兵
|
||||
-- go = poolManager:LoadLive(theBombBitch, this.live2dRoot.transform, Vector3.one, Vector3.zero)
|
||||
-- end
|
||||
|
||||
-- 向服务器请求使用炸弹
|
||||
function this.I_Need_A_Bomb()
|
||||
-- 非事件同步坐标位置
|
||||
MapManager.MapUpdateEvent(-1000, function ()
|
||||
Log(Language[11270])
|
||||
NetManager.RequestUseBomb(function (msg)
|
||||
Log(Language[11271] .. #msg.drop.itemlist)
|
||||
ctrlView.CallListPop()
|
||||
-- 更新背包数量
|
||||
BagManager.DeleteTempBagCountById(43, 1)
|
||||
this.KillAllBitch()
|
||||
|
||||
showDrop = function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 2, function ()
|
||||
-- 回复精气值
|
||||
MapTrialManager.UpdatePowerValue(msg.essenceValue)
|
||||
--UIManager.OpenPanel(UIName.TrialOpPanel, 1)
|
||||
--showDrop = nil
|
||||
end)
|
||||
end
|
||||
TrialOpPanel:ClosePanel()
|
||||
end)
|
||||
end)
|
||||
end
|
||||
-- function this.I_Need_A_Bomb()
|
||||
-- -- 非事件同步坐标位置
|
||||
-- MapManager.MapUpdateEvent(-1000, function ()
|
||||
-- Log(Language[11270])
|
||||
-- NetManager.RequestUseBomb(function (msg)
|
||||
-- Log(Language[11271] .. #msg.drop.itemlist)
|
||||
-- ctrlView.CallListPop()
|
||||
-- -- 更新背包数量
|
||||
-- BagManager.DeleteTempBagCountById(43, 1)
|
||||
-- this.KillAllBitch()
|
||||
-- showDrop = function()
|
||||
-- UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 2, function ()
|
||||
-- -- 回复精气值
|
||||
-- MapTrialManager.UpdatePowerValue(msg.essenceValue)
|
||||
-- end)
|
||||
-- end
|
||||
-- TrialOpPanel:ClosePanel()
|
||||
-- end)
|
||||
-- end)
|
||||
-- end
|
||||
|
||||
-- 弄死所有的小怪
|
||||
function this.KillAllBitch()
|
||||
|
|
|
|||
|
|
@ -169,12 +169,12 @@ function this.RefreshOption()
|
|||
this.dialogueRoot:SetActive(false)
|
||||
|
||||
|
||||
-- 如果角色还在死亡
|
||||
if MapManager.deadTime > 0 then
|
||||
MapPanel.OnMapDeadOut(MapManager.deadTime)
|
||||
else
|
||||
MapPanel.deadRoot:SetActive(false)
|
||||
end
|
||||
-- -- 如果角色还在死亡
|
||||
-- if MapManager.deadTime > 0 then
|
||||
-- MapPanel.OnMapDeadOut(MapManager.deadTime)
|
||||
-- else
|
||||
-- MapPanel.deadRoot:SetActive(false)
|
||||
-- end
|
||||
|
||||
Util.AddOnceClick(this.NpcCloseOpBtn, function()
|
||||
this.NpcCloseOpBtn:SetActive(false)
|
||||
|
|
|
|||
|
|
@ -36,26 +36,17 @@ function this:BindEvent()
|
|||
if MapTrialManager.isHaveBoss then
|
||||
PopupTipPanel.ShowTip(Language[11248])
|
||||
return
|
||||
elseif MapTrialManager.curTowerLevel>10000 then
|
||||
PopupTipPanel.ShowTip("奖励层不可使用炸弹~")
|
||||
return
|
||||
else
|
||||
--向服务器请求使用炸弹
|
||||
MapManager.MapUpdateEvent(-1000, function ()
|
||||
Log(Language[11270])
|
||||
NetManager.RequestUseBomb(function (msg)
|
||||
Log(Language[11271] .. #msg.drop.itemlist)
|
||||
ctrlView.CallListPop()
|
||||
-- 更新背包数量
|
||||
BagManager.DeleteTempBagCountById(43, 1)
|
||||
this.KillAllBitch()
|
||||
local showDrop = function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 2, function ()
|
||||
-- 回复精气值
|
||||
MapTrialManager.UpdatePowerValue(msg.essenceValue)
|
||||
end)
|
||||
end
|
||||
parent:ClosePanel()
|
||||
NetManager.RequestUseBomb(function (msg)--请求使用炸弹
|
||||
parent:ClosePanel()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1,function()
|
||||
MapTrialManager.UpdatePowerValue(msg.essenceValue)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointAdd, msg.cell.cellId, msg.cell.pointId)
|
||||
end)
|
||||
end)
|
||||
|
||||
end
|
||||
else
|
||||
PopupTipPanel.ShowTip(Language[11249])
|
||||
|
|
|
|||
Loading…
Reference in New Issue