山河设计图添加关卡提示

dev_fengTi_And hotfix/you_gu/cdn_yougu_andTest/1.1.4
wangzhenxing 2023-07-24 11:31:36 +08:00
parent d4585f2c97
commit 5ac2ed1220
2 changed files with 106 additions and 2 deletions

View File

@ -43668,7 +43668,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} m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0}
m_AnchoredPosition: {x: 0, y: 57.700012} m_AnchoredPosition: {x: -444, y: 1819}
m_SizeDelta: {x: 160, y: 30} m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2468755917181465753 --- !u!222 &2468755917181465753
@ -43706,7 +43706,7 @@ MonoBehaviour:
m_BestFit: 0 m_BestFit: 0
m_MinSize: 4 m_MinSize: 4
m_MaxSize: 40 m_MaxSize: 40
m_Alignment: 4 m_Alignment: 3
m_AlignByGeometry: 0 m_AlignByGeometry: 0
m_RichText: 1 m_RichText: 1
m_HorizontalOverflow: 1 m_HorizontalOverflow: 1
@ -44150,6 +44150,7 @@ RectTransform:
- {fileID: 5508372000661152921} - {fileID: 5508372000661152921}
- {fileID: 1647788101} - {fileID: 1647788101}
- {fileID: 5972340744719157198} - {fileID: 5972340744719157198}
- {fileID: 3492279594617188233}
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}
@ -46064,3 +46065,82 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
--- !u!1 &7279998188306281387
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3492279594617188233}
- component: {fileID: 982289915022788493}
- component: {fileID: 2562656429533855085}
m_Layer: 5
m_Name: maxTxt2
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3492279594617188233
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7279998188306281387}
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: 8
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: -391.8, y: 1779.3}
m_SizeDelta: {x: 264.3, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &982289915022788493
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7279998188306281387}
m_CullTransparentMesh: 0
--- !u!114 &2562656429533855085
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7279998188306281387}
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.8396226, g: 0.10428036, b: 0.059407253, 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: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u4ECA\u65E5\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u5173\u5361\u5C06\u4E0E\u6B21\u65E5\u5F00\u542F"

View File

@ -11,6 +11,8 @@ 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") this.hintTxt = Util.GetGameObject(self.gameObject, "hintTxt"):GetComponent("Text")
this.maxTxt = Util.GetGameObject(self.gameObject, "maxTxt2"):GetComponent("Text")
this.maxTxt.gameObject:SetActive(true)
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
@ -98,16 +100,38 @@ end
function this.OnShowPanel() function this.OnShowPanel()
local curTime=GetTimeStamp() local curTime=GetTimeStamp()
local hint local hint
local maxChapterId=0
local day=0
local allChapterId=0
for _, config in ConfigPairs(chapterConfig) do for _, config in ConfigPairs(chapterConfig) do
if curTime>PlayerManager.GetServerOpenTime()+config.OpenTime*24*60*60 then if curTime>PlayerManager.GetServerOpenTime()+config.OpenTime*24*60*60 then
hint=config.OpenNumber hint=config.OpenNumber
--if maxChapterId==0 then
if day~=config.OpenTime-1 then
day=config.OpenTime-1
maxChapterId=config.Id
end
allChapterId=config.Id
--maxChapterId=config.Id
--end
end end
end end
this.hintTxt.text=hint 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()
LogError("curChapterId========="..curChapterId.." maxChapterId=="..maxChapterId)
this.maxTxt.gameObject:SetActive(false)
if curChapterId==maxChapterId then
LogError("11111111111111111111111111111111111111")
this.maxTxt.gameObject:SetActive(true)
this.maxTxt.text="今日已达上限,关卡将与次日开启"
end
if curChapterId==allChapterId then
this.maxTxt.gameObject:SetActive(true)
this.maxTxt.text="已达最终关卡"
end
local allData = FightLevelManager.GetChapterData() local allData = FightLevelManager.GetChapterData()
this.ScrollView:SetData(allData, function (index, go) this.ScrollView:SetData(allData, function (index, go)
this.SingleChapterDataShow(go, allData[index],index) this.SingleChapterDataShow(go, allData[index],index)