山河社稷图提交开放章节提示

dev_chengFeng
PC-202302260912\Administrator 2023-06-14 18:12:47 +08:00
parent 795c3e52f0
commit 6c6a7d19f7
2 changed files with 90 additions and 0 deletions

View File

@ -43634,6 +43634,85 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
--- !u!1 &1252199351641677490
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5972340744719157198}
- component: {fileID: 2468755917181465753}
- component: {fileID: 8808037916056582895}
m_Layer: 5
m_Name: hintTxt
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5972340744719157198
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1252199351641677490}
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: 2461825146493731649}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 57.700012}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2468755917181465753
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1252199351641677490}
m_CullTransparentMesh: 0
--- !u!114 &8808037916056582895
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1252199351641677490}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.081538945, g: 0.9245283, b: 0.056692798, a: 1}
m_RaycastTarget: 1
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: 40
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 4
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: New Text
--- !u!1 &1918020961565828180 --- !u!1 &1918020961565828180
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -44070,6 +44149,7 @@ RectTransform:
- {fileID: 2461572105942810881} - {fileID: 2461572105942810881}
- {fileID: 5508372000661152921} - {fileID: 5508372000661152921}
- {fileID: 1647788101} - {fileID: 1647788101}
- {fileID: 5972340744719157198}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@ -1,6 +1,7 @@
require("Base/BasePanel") require("Base/BasePanel")
FightLevelChapterPanel = Inherit(BasePanel) FightLevelChapterPanel = Inherit(BasePanel)
local this = FightLevelChapterPanel local this = FightLevelChapterPanel
local chapterConfig=ConfigManager.GetConfig(ConfigName.HardStageChapter)
local orginLayer local orginLayer
local curChapterId = 0 local curChapterId = 0
local npc local npc
@ -9,6 +10,7 @@ local npc
function FightLevelChapterPanel:InitComponent() function FightLevelChapterPanel:InitComponent()
this.spLoader = SpriteLoader.New() this.spLoader = SpriteLoader.New()
self.btnBack = Util.GetGameObject(self.gameObject, "btnBack") self.btnBack = Util.GetGameObject(self.gameObject, "btnBack")
this.hintTxt = Util.GetGameObject(self.gameObject, "hintTxt"):GetComponent("Text")
self.sortBtn = Util.GetGameObject(self.gameObject, "sortBtn") self.sortBtn = Util.GetGameObject(self.gameObject, "sortBtn")
self.helpBtn = Util.GetGameObject(self.gameObject, "helpBtn") self.helpBtn = Util.GetGameObject(self.gameObject, "helpBtn")
self.helpPos = self.helpBtn:GetComponent("RectTransform").localPosition self.helpPos = self.helpBtn:GetComponent("RectTransform").localPosition
@ -94,7 +96,15 @@ function FightLevelChapterPanel:OnShow()
this.OnShowPanel() this.OnShowPanel()
end end
function this.OnShowPanel() function this.OnShowPanel()
local curTime=GetTimeStamp()
local hint
for _, config in ConfigPairs(chapterConfig) do
if curTime>PlayerManager.GetServerOpenTime()+config.OpenTime*24*60*60 then
hint=config.OpenNumber
end
end
this.hintTxt.text=hint
SoundManager.PlayMusic(SoundConfig.BGM_Main) SoundManager.PlayMusic(SoundConfig.BGM_Main)
this.starNumText.text = FightLevelManager.GetAllChapterStars() this.starNumText.text = FightLevelManager.GetAllChapterStars()
curChapterId = FightLevelManager.GetCurChapterId() curChapterId = FightLevelManager.GetCurChapterId()