首充引导修改
parent
b4de6d48c9
commit
d9e1951a83
|
@ -74,7 +74,7 @@ function FightEndLvUpPanel:OnOpen(...)
|
|||
oldLevel=data[1]
|
||||
curLevel=data[2]
|
||||
callBack = data[3]
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnLevelChange)
|
||||
--Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnLevelChange)
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend,FacePanelType.UpgradePac)
|
||||
this.ShowPanelData()
|
||||
SubmitExtraData({type = SDKSubMitType.TYPE_LEVEL_UP})
|
||||
|
|
|
@ -655,6 +655,8 @@ local battleTime=0
|
|||
local bossHp=0
|
||||
local curAttack=0
|
||||
local allAttacck=0
|
||||
local timer2=nil
|
||||
local timer1=nil
|
||||
function this.BattleLogic()
|
||||
if this.battleTimer then
|
||||
this.battleTimer:Stop()
|
||||
|
@ -700,8 +702,8 @@ function this.BattleLogic()
|
|||
if this.heroList[i].spine then
|
||||
this.heroList[i].effect.transform.position =this.heroList[i].pos.transform.position
|
||||
local seed= math.random(0,100)/100
|
||||
local timer1 = Timer.New(function()
|
||||
if this.heroList[i].spine and this.heroList[i].effect then
|
||||
timer1 = Timer.New(function()
|
||||
if this.heroList[i] and this.heroList[i].spine and this.heroList[i].effect then
|
||||
this.heroList[i].spine.AnimationState:SetAnimation(0, "touch", true)
|
||||
Util.ClearTrailRender(this.heroList[i].effect)
|
||||
this.heroList[i].effect:SetActive(true)
|
||||
|
@ -745,22 +747,25 @@ function this.BattleLogic()
|
|||
aaa.effect.transform.position =aaa.pos.transform.position
|
||||
--aaa.spine.AnimationState:SetAnimation(0, "touch", true)
|
||||
local seed1 = math.random(0,100)/100
|
||||
local timer2=Timer.New(function()
|
||||
timer2=Timer.New(function()
|
||||
if aaa.effect and aaa.spineAni then
|
||||
Util.ClearTrailRender(aaa.effect)
|
||||
aaa.effect:SetActive(true)
|
||||
aaa.spineAni.AnimationState:SetAnimation(0, "attack3",false)
|
||||
aaa.effect:GetComponent("RectTransform"):DOMove(bossPos, 0.6, false):OnComplete(function ()
|
||||
if aaa.effect then
|
||||
aaa.effect:SetActive(false)
|
||||
end
|
||||
local attack=math.floor(aaa.data.attributes[2].value*(1+add)+0.5)
|
||||
bossHp=bossHp-attack
|
||||
allAttacck=allAttacck+attack
|
||||
this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,attack)
|
||||
aaa.spineAni.AnimationState:SetAnimation(0, "move3",true)
|
||||
this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber)
|
||||
end)
|
||||
if aaa.effect and aaa.spineAni then
|
||||
aaa.effect:SetActive(true)
|
||||
aaa.spineAni.AnimationState:SetAnimation(0, "attack3",false)
|
||||
aaa.effect:GetComponent("RectTransform"):DOMove(bossPos, 0.6, false):OnComplete(function ()
|
||||
if aaa.effect then
|
||||
aaa.effect:SetActive(false)
|
||||
end
|
||||
local attack=math.floor(aaa.data.attributes[2].value*(1+add)+0.5)
|
||||
bossHp=bossHp-attack
|
||||
allAttacck=allAttacck+attack
|
||||
this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,attack)
|
||||
aaa.spineAni.AnimationState:SetAnimation(0, "move3",true)
|
||||
this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber)
|
||||
end)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end,seed1, 1, true)
|
||||
|
@ -1461,7 +1466,20 @@ function FightPointPassMainPanel:OnClose()
|
|||
-- fightMap:OnClose()
|
||||
-- hasMap = false
|
||||
-- end
|
||||
|
||||
if this.battleTimer then
|
||||
this.battleTimer:Stop()
|
||||
LogError("停止战斗---------------------------------")
|
||||
|
||||
this.battleTimer=nil
|
||||
end
|
||||
if timer1 then
|
||||
timer1:Stop()
|
||||
end
|
||||
if timer2 then
|
||||
timer2:Stop()
|
||||
end
|
||||
timer1=nil
|
||||
timer2=nil
|
||||
if this.animTimer then
|
||||
this.animTimer:Stop()
|
||||
end
|
||||
|
@ -1494,9 +1512,11 @@ end
|
|||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function FightPointPassMainPanel:OnDestroy()
|
||||
|
||||
orginLayer=0
|
||||
invadeMonster:OnDestroy()
|
||||
this.spLoader:Destroy()
|
||||
|
||||
-- poolManager:UnLoadAsset("GuideEffect", this.GuideEffectGo, PoolManager.AssetType.GameObject)
|
||||
-- poolManager:UnLoadAsset("GuideEffect", this.GuideJumpEffectGo, PoolManager.AssetType.GameObject)
|
||||
poolManager:UnLoadLive(fightAnimRes, this.animGo, PoolManager.AssetType.GameObject)
|
||||
|
@ -1529,12 +1549,7 @@ function FightPointPassMainPanel:OnDestroy()
|
|||
soliderPreList={}
|
||||
this.bossLiveGO=nil
|
||||
this.bossLiveName=nil
|
||||
if this.battleTimer then
|
||||
this.battleTimer:Stop()
|
||||
LogError("停止战斗---------------------------------")
|
||||
|
||||
this.battleTimer=nil
|
||||
end
|
||||
|
||||
this.Floater:Dispose()
|
||||
this.Floater=nil
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ local _FuncGuideList = {}
|
|||
--初始化
|
||||
function this.Initialize()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.FunctionCtrl.OnFunctionOpen, this.OnFunctionOpen)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange)
|
||||
--Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Player.OnPlayerLvChange, this.OnLevelChange)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Practice.PracticeGuide,this.PracticeGuideFun)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.EndLess.GuidePanel,this.EndlessGuideFun)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Mission.OnPassFight,this.OnFightPass)
|
||||
|
@ -58,19 +59,30 @@ end
|
|||
|
||||
function this.OnLevelChange()
|
||||
-- 提审服不再出发相关引导
|
||||
if SERVER_VERSION == 1 then
|
||||
return
|
||||
end
|
||||
LogError("1111111111111111111111111122222222222222等级辩护引导1111111111111 "..PlayerManager.level)
|
||||
-- if SERVER_VERSION == 1 then
|
||||
-- LogError("1111111111111111111111111122222222222222首充加入引导1111111111111")
|
||||
-- return
|
||||
-- end
|
||||
-- 首充引导特殊处理到十级开放
|
||||
if PlayerManager.level == 10 then
|
||||
table.insert(_FuncGuideList, 100200)
|
||||
--解开孙悟空封印的剧情
|
||||
--StoryMapManager.isShowStory = 1
|
||||
LogError(" 首充加入引导")
|
||||
--if CheckListIsContainValue1(_FuncGuideList,100200)==false then
|
||||
--table.insert(_FuncGuideList, 100200)
|
||||
if PlayerPrefs.GetInt(PlayerManager.uid.."isGMEsp")==0 then
|
||||
GuideManager.ShowGuide(100200)
|
||||
end
|
||||
|
||||
--end
|
||||
this.CheckFuncGuide()
|
||||
--解开孙悟空封印的剧情
|
||||
-- StoryMapManager.isShowStory = 1
|
||||
elseif PlayerManager.level == 15 then
|
||||
StoryMapManager.isShowStory = 3
|
||||
--StoryMapManager.isShowStory = 3
|
||||
elseif CheckFunctionOpen(FUNCTION_OPEN_TYPE.hunyin) then--魂印功能 引导商店魂印页签
|
||||
table.insert(_FuncGuideList, 101700)
|
||||
if CheckListIsContainValue1(_FuncGuideList,101700)==false then
|
||||
table.insert(_FuncGuideList, 101700)
|
||||
end
|
||||
this.CheckFuncGuide()
|
||||
elseif CheckFunctionOpen(FUNCTION_OPEN_TYPE.GodPrint) then
|
||||
-- body
|
||||
|
@ -128,7 +140,7 @@ function this.OnFightPass(fightId)
|
|||
if not guideId or guideId == 0 then
|
||||
return
|
||||
end
|
||||
if funcDic[guideId] then
|
||||
if funcDic and funcDic[guideId] then
|
||||
-- funcDic[guideId] = nil
|
||||
return
|
||||
end
|
||||
|
@ -222,10 +234,12 @@ end
|
|||
|
||||
-- 检测功能引导
|
||||
function GuideManager.CheckFuncGuide()
|
||||
LogError("GuideManager.IsInMainGuide()=="..tostring(GuideManager.IsInMainGuide()).." "..tostring(_IsFuncGuild).." #_FuncGuideList=="..#_FuncGuideList)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."MainRightBarSetting",1)--引导开始关闭右侧伸缩条
|
||||
if not GuideManager.IsInMainGuide() and not _IsFuncGuild and #_FuncGuideList > 0 then
|
||||
local guideId = _FuncGuideList[1]
|
||||
if not funcDic[guideId] then
|
||||
LogError("guideId======================================="..guideId)
|
||||
this.SyncFuncGuideServer(guideId)
|
||||
GuideManager.ShowGuide(guideId)
|
||||
end
|
||||
|
|
|
@ -662,7 +662,7 @@ function this:OnOpen(id, func, ...)
|
|||
LogError("id========================"..id)
|
||||
if id==1 then
|
||||
--疯体屏蔽创角奖励界面
|
||||
UIManager.OpenPanel(UIName.GMEspecially)
|
||||
--UIManager.OpenPanel(UIName.GMEspecially)
|
||||
end
|
||||
this.gameObject:GetComponent("Image").raycastTarget = true
|
||||
local delay = GuideConfig[id].DelayShow
|
||||
|
|
|
@ -170,7 +170,7 @@ function GMPanel.LVPlayer(lv)
|
|||
NetManager.GMEvent(string.format("7#%s#0",lv))
|
||||
local cor = coroutine.start(function()
|
||||
coroutine.wait(1)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnLevelChange)
|
||||
--Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnLevelChange)
|
||||
--LogGreen("升级了")
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -1171,7 +1171,20 @@ end
|
|||
function this:TabBtnAction(id,actType,data)
|
||||
if actType == 1 then
|
||||
if id == ActivityTypeDef.FirstRecharge then
|
||||
UIManager.OpenPanel(UIName.FirstRechargePanel)
|
||||
if PlayerPrefs.GetInt(PlayerManager.uid.."isGMEsp")==0 then
|
||||
local isOpen=CheckFunctionOpen(153)
|
||||
if isOpen then
|
||||
UIManager.OpenPanel(UIName.GMEspecially,function()
|
||||
UIManager.OpenPanel(UIName.FirstRechargePanel)
|
||||
PlayerPrefs.SetInt(PlayerManager.uid.."isGMEsp",1)
|
||||
end)
|
||||
else
|
||||
UIManager.OpenPanel(UIName.FirstRechargePanel)
|
||||
end
|
||||
|
||||
else
|
||||
UIManager.OpenPanel(UIName.FirstRechargePanel)
|
||||
end
|
||||
elseif id == ActivityTypeDef.SevenDayCarnival then
|
||||
UIManager.OpenPanel(UIName.SevenDayCarnivalPanelV2,SevenDayCarnivalManager.GetPriorityDayNumber())
|
||||
elseif id == ActivityTypeDef.WarPowerSort then
|
||||
|
|
Loading…
Reference in New Issue