小兵关卡添加开服天数限制===========================================
(cherry picked from commit 5ad8eb50b8
)
tcx_xiyou_dev
parent
a556953bd9
commit
195fb8bfd4
|
@ -69497,7 +69497,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 0, y: -108}
|
m_AnchoredPosition: {x: 0, y: -98}
|
||||||
m_SizeDelta: {x: 183.07, y: 34.09}
|
m_SizeDelta: {x: 183.07, y: 34.09}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &6762569256055711093
|
--- !u!222 &6762569256055711093
|
||||||
|
@ -132676,6 +132676,86 @@ MonoBehaviour:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||||
Culture=neutral, PublicKeyToken=null
|
Culture=neutral, PublicKeyToken=null
|
||||||
|
--- !u!1 &4333677257680589380
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 708783856290733406}
|
||||||
|
- component: {fileID: 7386864981625236406}
|
||||||
|
- component: {fileID: 8664151615818570441}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: openTip
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &708783856290733406
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4333677257680589380}
|
||||||
|
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: 3829532297210306968}
|
||||||
|
m_RootOrder: 7
|
||||||
|
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: 0, y: 55}
|
||||||
|
m_SizeDelta: {x: 183.07, y: 34.09}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &7386864981625236406
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4333677257680589380}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &8664151615818570441
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4333677257680589380}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: ebfe0e44da74fbd44b1b744995de2324, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 0.7607844, b: 0.5019608, a: 1}
|
||||||
|
m_RaycastTarget: 0
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||||
|
m_FontSize: 35
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 2
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 4
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 1
|
||||||
|
m_VerticalOverflow: 1
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: "\u7B80\u535510-20"
|
||||||
|
LanguageIndex: 10523
|
||||||
--- !u!1 &4356458383648976209
|
--- !u!1 &4356458383648976209
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -184790,7 +184870,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 50, y: 0}
|
||||||
m_SizeDelta: {x: 100, y: 100}
|
m_SizeDelta: {x: 100, y: 100}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &109213283015355470
|
--- !u!114 &109213283015355470
|
||||||
|
@ -222055,12 +222135,13 @@ RectTransform:
|
||||||
- {fileID: 2039730614}
|
- {fileID: 2039730614}
|
||||||
- {fileID: 2835335463341580670}
|
- {fileID: 2835335463341580670}
|
||||||
- {fileID: 5303319522292383812}
|
- {fileID: 5303319522292383812}
|
||||||
|
- {fileID: 708783856290733406}
|
||||||
m_Father: {fileID: 7718967529276036518}
|
m_Father: {fileID: 7718967529276036518}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: -5, y: 161}
|
m_AnchoredPosition: {x: -5, y: 143}
|
||||||
m_SizeDelta: {x: 362, y: 166.7}
|
m_SizeDelta: {x: 362, y: 166.7}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &2897602842919898169
|
--- !u!222 &2897602842919898169
|
||||||
|
@ -258054,11 +258135,6 @@ PrefabInstance:
|
||||||
m_Modification:
|
m_Modification:
|
||||||
m_TransformParent: {fileID: 5391497229806396012}
|
m_TransformParent: {fileID: 5391497229806396012}
|
||||||
m_Modifications:
|
m_Modifications:
|
||||||
- target: {fileID: 4537954547819557299, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
|
||||||
type: 3}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: UI_Effect_MuBiaoJiangLi
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 8645003667159546895, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
- target: {fileID: 8645003667159546895, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
|
@ -258164,6 +258240,11 @@ PrefabInstance:
|
||||||
propertyPath: m_Pivot.y
|
propertyPath: m_Pivot.y
|
||||||
value: 0.5
|
value: 0.5
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4537954547819557299, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: UI_Effect_MuBiaoJiangLi
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7667894851207529766, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
- target: {fileID: 7667894851207529766, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
|
@ -258191,15 +258272,15 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 45fb9a1ded4a71146ba636b09e5dabcf, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 45fb9a1ded4a71146ba636b09e5dabcf, type: 3}
|
||||||
--- !u!1 &1533186584701823329 stripped
|
|
||||||
GameObject:
|
|
||||||
m_CorrespondingSourceObject: {fileID: 7582181376025013934, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
|
||||||
type: 3}
|
|
||||||
m_PrefabInstance: {fileID: 8971074634032498639}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
--- !u!224 &830511510176938944 stripped
|
--- !u!224 &830511510176938944 stripped
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_CorrespondingSourceObject: {fileID: 8645003667159546895, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
m_CorrespondingSourceObject: {fileID: 8645003667159546895, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
||||||
type: 3}
|
type: 3}
|
||||||
m_PrefabInstance: {fileID: 8971074634032498639}
|
m_PrefabInstance: {fileID: 8971074634032498639}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1 &1533186584701823329 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 7582181376025013934, guid: 45fb9a1ded4a71146ba636b09e5dabcf,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 8971074634032498639}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
|
|
@ -3091,6 +3091,15 @@ function GetFunctionOpenTip(_funId)
|
||||||
return tip
|
return tip
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--获取开服天数
|
||||||
|
function GetOpenServerDayNum()
|
||||||
|
local serverOpenTime = PlayerManager.GetServerOpenTime()
|
||||||
|
local openDay = math.ceil(math.max(0, GetTimeStamp() - serverOpenTime)/(60*60*24))--当前是开服第几天
|
||||||
|
-- LogError("当前是开服第几天了:"..openDay)
|
||||||
|
return openDay
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---获取神尊等级
|
---获取神尊等级
|
||||||
function GetShenzunLv()
|
function GetShenzunLv()
|
||||||
|
|
|
@ -197,6 +197,7 @@ function FightPointPassMainPanel:InitComponent()
|
||||||
--解锁功能
|
--解锁功能
|
||||||
this.openFun = Util.GetGameObject(self.gameObject, "Bg/RightUpVertical/openFun")
|
this.openFun = Util.GetGameObject(self.gameObject, "Bg/RightUpVertical/openFun")
|
||||||
this.openFunNeedInfo = Util.GetGameObject(self.gameObject, "Bg/btnDown/btnFight/needInfo"):GetComponent("Text")
|
this.openFunNeedInfo = Util.GetGameObject(self.gameObject, "Bg/btnDown/btnFight/needInfo"):GetComponent("Text")
|
||||||
|
this.openTip = Util.GetGameObject(self.gameObject, "Bg/btnDown/btnFight/openTip"):GetComponent("Text")
|
||||||
this.openFunFunInfo = Util.GetGameObject(self.gameObject, "Bg/RightUpVertical/openFun/funInfo"):GetComponent("Text")
|
this.openFunFunInfo = Util.GetGameObject(self.gameObject, "Bg/RightUpVertical/openFun/funInfo"):GetComponent("Text")
|
||||||
--世界等级
|
--世界等级
|
||||||
Util.GetGameObject(self.gameObject, "Bg/RightUpVertical/worldLv/Text"):GetComponent("Text").text = "世界等级:"
|
Util.GetGameObject(self.gameObject, "Bg/RightUpVertical/worldLv/Text"):GetComponent("Text").text = "世界等级:"
|
||||||
|
@ -651,7 +652,7 @@ function this.ShowBattleInfo()
|
||||||
curSoliderStageConfig=ConfigManager.GetConfigData(ConfigName.SoldierStageConfig,FightPointPassManager.soldierLayerId)
|
curSoliderStageConfig=ConfigManager.GetConfigData(ConfigName.SoldierStageConfig,FightPointPassManager.soldierLayerId)
|
||||||
local heroData = ConfigManager.GetConfigData(ConfigName.HeroConfig,curSoliderStageConfig.Hero)
|
local heroData = ConfigManager.GetConfigData(ConfigName.HeroConfig,curSoliderStageConfig.Hero)
|
||||||
local bossName=GetResourcePath(heroData.Live)
|
local bossName=GetResourcePath(heroData.Live)
|
||||||
|
this.openTip.text=curSoliderStageConfig.OpenTips
|
||||||
if bossName~=this.bossLiveName then
|
if bossName~=this.bossLiveName then
|
||||||
poolManager:UnLoadLive(this.bossLiveName, this.bossLiveGO, PoolManager.AssetType.GameObject)
|
poolManager:UnLoadLive(this.bossLiveName, this.bossLiveGO, PoolManager.AssetType.GameObject)
|
||||||
this.bossLiveName=bossName
|
this.bossLiveName=bossName
|
||||||
|
@ -914,6 +915,8 @@ function this.BattleLogic()
|
||||||
if bossHp<=0 then
|
if bossHp<=0 then
|
||||||
LogError("boss被击败")
|
LogError("boss被击败")
|
||||||
this.battleTimer:Stop()
|
this.battleTimer:Stop()
|
||||||
|
--判断当前开服天数是否开启当前关卡
|
||||||
|
if curSoliderStageConfig.OpenRule[1][2]<=GetOpenServerDayNum() then
|
||||||
NetManager.SoldierFightCheckRequest(1,function(msg)
|
NetManager.SoldierFightCheckRequest(1,function(msg)
|
||||||
--战斗成功
|
--战斗成功
|
||||||
if msg.result==1 then
|
if msg.result==1 then
|
||||||
|
@ -961,6 +964,19 @@ function this.BattleLogic()
|
||||||
this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber)
|
this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber)
|
||||||
this.RefreshBossInfo()
|
this.RefreshBossInfo()
|
||||||
end)
|
end)
|
||||||
|
else
|
||||||
|
if this.battleTimer then
|
||||||
|
this.battleTimer:Start()
|
||||||
|
end
|
||||||
|
cd=0
|
||||||
|
battleTime=curSoliderStageConfig.Time
|
||||||
|
bossHp=curSoliderStageConfig.Hp
|
||||||
|
--this.hpBar.fillAmount=bossHp/curSoliderStageConfig.Hp
|
||||||
|
this.SetHp(curSoliderStageConfig.Hp,bossHp,curSoliderStageConfig.HpNumber)
|
||||||
|
this.RefreshBossInfo()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
battleTime=battleTime-1
|
battleTime=battleTime-1
|
||||||
end, 1, -1, true)
|
end, 1, -1, true)
|
||||||
|
@ -1121,6 +1137,8 @@ end
|
||||||
|
|
||||||
-- 从战斗出来会加载两次
|
-- 从战斗出来会加载两次
|
||||||
function FightPointPassMainPanel:OnShow()
|
function FightPointPassMainPanel:OnShow()
|
||||||
|
local dayNum=GetOpenServerDayNum()
|
||||||
|
LogError("daynum============================="..dayNum)
|
||||||
GuideManager.CheckFuncGuide()
|
GuideManager.CheckFuncGuide()
|
||||||
--LogError("SmallSoldierManager.changeSolider.type=========="..SmallSoldierManager.changeSolider.type)
|
--LogError("SmallSoldierManager.changeSolider.type=========="..SmallSoldierManager.changeSolider.type)
|
||||||
this.RefreshSoliderInfo()
|
this.RefreshSoliderInfo()
|
||||||
|
|
Loading…
Reference in New Issue