111 lines
4.4 KiB
Lua
111 lines
4.4 KiB
Lua
------------------------------------------------
|
|
--作者: 杨全福
|
|
--日期: 2021-09-16
|
|
--文件: ChangeJobBoss1CopyLogic.lua
|
|
--模块: ChangeJobBoss1CopyLogic
|
|
--描述: 金丹大天魔副本
|
|
------------------------------------------------
|
|
|
|
local ChangeJobBoss1CopyLogic = {
|
|
Parent = nil,
|
|
IsFinish = false,
|
|
LeaveTimer = 0,
|
|
}
|
|
|
|
function ChangeJobBoss1CopyLogic:OnEnterScene(parent)
|
|
self.Parent = parent
|
|
|
|
--设置开关
|
|
GameCenter.MapLogicSwitch.CanRide = false
|
|
GameCenter.MapLogicSwitch.CanFly = false
|
|
GameCenter.MapLogicSwitch.CanRollDoge = true
|
|
GameCenter.MapLogicSwitch.CanMandate = true
|
|
GameCenter.MapLogicSwitch.CanOpenTeam = false
|
|
GameCenter.MapLogicSwitch.ShowNewFunction = false
|
|
GameCenter.MapLogicSwitch.UseAutoStrikeBack = true
|
|
GameCenter.MapLogicSwitch.CanTeleport = false
|
|
GameCenter.MapLogicSwitch.IsCopyMap = true
|
|
GameCenter.MapLogicSwitch.IsPlaneCopyMap = true
|
|
|
|
self.IsFinish = false
|
|
self.LeaveTimer = 0
|
|
|
|
--关掉菜单
|
|
GameCenter.PushFixEvent(LogicEventDefine.EID_EVENT_CLOSE_MAINMENU)
|
|
--打开副本主界面
|
|
GameCenter.PushFixEvent(UIEventDefine.UIPlaneCopyMainForm_OPEN, self.Parent.MapCfg.MapId);
|
|
GameCenter.RegFixEventHandle(LogicEventDefine.EID_EVENT_ON_LP_DEAD, self.OnLPDead, self)
|
|
GameCenter.BlockingUpPromptSystem:AddForceGuideByID(307, function()
|
|
GameCenter.MandateSystem:Start()
|
|
GameCenter.MapLogicSwitch.HoldFighting = true
|
|
end, false)
|
|
end
|
|
|
|
function ChangeJobBoss1CopyLogic:OnLeaveScene()
|
|
GameCenter.UnRegFixEventHandle(LogicEventDefine.EID_EVENT_ON_LP_DEAD, self.OnLPDead, self)
|
|
GameCenter.PushFixEvent(UIEventDefine.UIPlaneCopyMainForm_CLOSE);
|
|
--进入就开始挂机
|
|
GameCenter.MandateSystem:End();
|
|
GameCenter.MapLogicSwitch.HoldFighting = true
|
|
GameCenter.MapLogicSwitch.CanMandate = true
|
|
end
|
|
|
|
function ChangeJobBoss1CopyLogic:OnMsgHandle(msg)
|
|
if msg.MsgID == GameCenter.Network.GetMsgID("MSG_copyMap.ResCopyMapBitFinish") then
|
|
self.IsFinish = true
|
|
self.LeaveTimer = 0.5
|
|
end
|
|
end
|
|
|
|
function ChangeJobBoss1CopyLogic:OnLPDead(obj, sender)
|
|
GameCenter.PushFixEvent(LogicEventDefine.EID_EVENT_INITIATIVE_EXIT_PLANECOPY)
|
|
GameCenter.PushFixEvent(UILuaEventDefine.UIPanelCopyFailedForm_OPEN)
|
|
GameCenter.TaskController:Stop()
|
|
end
|
|
|
|
function ChangeJobBoss1CopyLogic:Update(dt)
|
|
if self.IsFinish then
|
|
self.LeaveTimer = self.LeaveTimer - dt
|
|
if self.LeaveTimer <= 0 then
|
|
--if GameCenter.MapLogicSwitch:PlaneEndEffectIsFinish(false) then
|
|
self.IsFinish = false
|
|
GameCenter.MapLogicSystem:SendLeaveMapMsg(false)
|
|
--end
|
|
end
|
|
end
|
|
end
|
|
|
|
function ChangeJobBoss1CopyLogic:GetMainUIState()
|
|
return {
|
|
[MainFormSubPanel.PlayerHead] = true, --主角头像
|
|
[MainFormSubPanel.TargetHead] = true, --目标头像
|
|
[MainFormSubPanel.TopMenu] = true, --顶部菜单
|
|
[MainFormSubPanel.MiniMap] = true, --小地图
|
|
[MainFormSubPanel.FlySwordGrave] = true, --境界
|
|
[MainFormSubPanel.TaskAndTeam] = true, --任务和组队
|
|
[MainFormSubPanel.Joystick] = true, --摇杆
|
|
[MainFormSubPanel.Exp] = true, --经验
|
|
[MainFormSubPanel.MiniChat] = true, --小聊天框
|
|
[MainFormSubPanel.Skill] = true, --技能
|
|
[MainFormSubPanel.SelectPkMode] = true, --选择PK模式
|
|
[MainFormSubPanel.FunctionFly] = true, --新功能开启飞行界面
|
|
[MainFormSubPanel.FastPrompt] = true, --快速提醒界面
|
|
[MainFormSubPanel.FastBts] = true, --快速操作按钮界面
|
|
[MainFormSubPanel.Ping] = true, --ping
|
|
[MainFormSubPanel.SkillWarning] = false, --技能释放警示
|
|
[MainFormSubPanel.CustomBtn] = true, --自定义按钮
|
|
[MainFormSubPanel.SitDown] = false, --打坐
|
|
[MainFormSubPanel.RemotePlayerHead] = true, --远程玩家头像
|
|
[MainFormSubPanel.ChangeSkill] = true, --变身技能
|
|
}
|
|
end
|
|
|
|
function ChangeJobBoss1CopyLogic:GetMainLeftUIState()
|
|
return {
|
|
[MainLeftSubPanel.Task] = true, --任务分页
|
|
[MainLeftSubPanel.Team] = true, --队伍分页
|
|
[MainLeftSubPanel.Other] = false, --其他分页
|
|
}
|
|
end
|
|
|
|
return ChangeJobBoss1CopyLogic; |