main
parent
2dc9aec0c3
commit
9efc94a1b9
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a80743b461c168c489236d98add97e3a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -12,7 +12,7 @@ GameObject:
|
|||
- component: {fileID: 7028339234026246339}
|
||||
- component: {fileID: 8758270532293125771}
|
||||
m_Layer: 5
|
||||
m_Name: Image_MapLogo03
|
||||
m_Name: Image_daynight
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
|
@ -35,7 +35,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 71.8, y: -32.2}
|
||||
m_SizeDelta: {x: 30, y: 30}
|
||||
m_SizeDelta: {x: 36, y: 36}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7028339234026246339
|
||||
CanvasRenderer:
|
||||
|
|
@ -87,7 +87,7 @@ GameObject:
|
|||
- component: {fileID: 542152304975477997}
|
||||
- component: {fileID: 7813746681417611893}
|
||||
m_Layer: 5
|
||||
m_Name: Image_MapLogo01
|
||||
m_Name: Image_environment
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
|
@ -110,7 +110,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -168.7, y: -32.2}
|
||||
m_SizeDelta: {x: 40, y: 26}
|
||||
m_SizeDelta: {x: 36, y: 36}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &542152304975477997
|
||||
CanvasRenderer:
|
||||
|
|
@ -162,7 +162,7 @@ GameObject:
|
|||
- component: {fileID: 6857145142002830545}
|
||||
- component: {fileID: 1529667544153567090}
|
||||
m_Layer: 5
|
||||
m_Name: Image_MapLogo02
|
||||
m_Name: Image_weather
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
|
@ -251,7 +251,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3170856815980966444}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
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_ConstrainProportionsScale: 0
|
||||
|
|
@ -26,7 +26,7 @@ RectTransform:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 825517735300292526}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
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_ConstrainProportionsScale: 0
|
||||
|
|
@ -142,7 +142,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &5809271896188866902
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -352,7 +352,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &6018499151382314743
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -487,7 +487,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1792493640014958905
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -0,0 +1,613 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &24324533638341318
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2330714686021790642}
|
||||
m_Layer: 5
|
||||
m_Name: Button_StarReward
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2330714686021790642
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 24324533638341318}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 8349768811946533182}
|
||||
- {fileID: 9157103532284352682}
|
||||
- {fileID: 235012330040306570}
|
||||
- {fileID: 3702442272593275958}
|
||||
- {fileID: 6014702135059069963}
|
||||
- {fileID: 8590468945958214799}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 27, y: 34.2}
|
||||
m_SizeDelta: {x: 54, y: 48}
|
||||
m_Pivot: {x: 1, y: 0.5}
|
||||
--- !u!1 &968964676910788284
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 235012330040306570}
|
||||
- component: {fileID: 7914821220723466665}
|
||||
- component: {fileID: 4355371478263916915}
|
||||
m_Layer: 5
|
||||
m_Name: target_green
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &235012330040306570
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 968964676910788284}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2330714686021790642}
|
||||
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: -11.8, y: -48.62}
|
||||
m_SizeDelta: {x: 50, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7914821220723466665
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 968964676910788284}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &4355371478263916915
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 968964676910788284}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 12
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: c06fb088272c9a1439e7cabe6d54f3d7, type: 2}
|
||||
m_sharedMaterial: {fileID: 4565336450146555445, guid: c06fb088272c9a1439e7cabe6d54f3d7,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4279344272
|
||||
m_fontColor: {r: 0.564459, g: 0.6132076, b: 0.06652725, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 26
|
||||
m_fontSizeBase: 26
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: -40
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: -2.6057873, z: 1.4383888, w: 2.0104694}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &4503126097381724087
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8590468945958214799}
|
||||
- component: {fileID: 3847549827508557826}
|
||||
- component: {fileID: 1798954845313393939}
|
||||
m_Layer: 5
|
||||
m_Name: target_white
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8590468945958214799
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4503126097381724087}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2330714686021790642}
|
||||
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: -11.799999, y: -48.62}
|
||||
m_SizeDelta: {x: 50, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3847549827508557826
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4503126097381724087}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1798954845313393939
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4503126097381724087}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 12
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: c06fb088272c9a1439e7cabe6d54f3d7, type: 2}
|
||||
m_sharedMaterial: {fileID: 4565336450146555445, guid: c06fb088272c9a1439e7cabe6d54f3d7,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 26
|
||||
m_fontSizeBase: 26
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: -40
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: -2.6057873, z: 1.4383888, w: 2.0104694}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &4676153055595072125
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 9157103532284352682}
|
||||
- component: {fileID: 9100728343614579027}
|
||||
- component: {fileID: 7905250341571342793}
|
||||
m_Layer: 5
|
||||
m_Name: star_green
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &9157103532284352682
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4676153055595072125}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2330714686021790642}
|
||||
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: 12.7, y: -45.719757}
|
||||
m_SizeDelta: {x: 38, y: 37}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &9100728343614579027
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4676153055595072125}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7905250341571342793
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4676153055595072125}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: ad139e97a51329545b3fd1e1d989ff86, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &6024881153281179828
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8349768811946533182}
|
||||
- component: {fileID: 7995226454768315795}
|
||||
- component: {fileID: 7991509596477369296}
|
||||
m_Layer: 5
|
||||
m_Name: starReward_green
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8349768811946533182
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6024881153281179828}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2330714686021790642}
|
||||
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: 0}
|
||||
m_SizeDelta: {x: 54, y: 48}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7995226454768315795
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6024881153281179828}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &7991509596477369296
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6024881153281179828}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 0c9ba3dd25aa45d40b322dfe5ee4e0b9, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &6130617782867956384
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3702442272593275958}
|
||||
- component: {fileID: 2057901278263947244}
|
||||
- component: {fileID: 1106982556343384388}
|
||||
m_Layer: 5
|
||||
m_Name: starReward_white
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3702442272593275958
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6130617782867956384}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.7, y: 0.7, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2330714686021790642}
|
||||
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: 0}
|
||||
m_SizeDelta: {x: 54, y: 48}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2057901278263947244
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6130617782867956384}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1106982556343384388
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6130617782867956384}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: b81c8a3eb850ca04dae40b00c3a3f020, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &9123867599176432845
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6014702135059069963}
|
||||
- component: {fileID: 8070539715383404229}
|
||||
- component: {fileID: 499365284811695142}
|
||||
m_Layer: 5
|
||||
m_Name: star_white
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6014702135059069963
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9123867599176432845}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2330714686021790642}
|
||||
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: 11.6, y: -45.719757}
|
||||
m_SizeDelta: {x: 28, y: 28}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8070539715383404229
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9123867599176432845}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &499365284811695142
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9123867599176432845}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 7ff7a2f641a77b64996e106538231749, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 13e5b38985785d346a456a73f615e65a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -47,7 +47,7 @@ public partial class UIManager
|
|||
_WindowMeta(UINameConst.UINewLogin, UIWindowLayer.Normal);
|
||||
_WindowMeta(UINameConst.UIGiftCode, UIWindowLayer.Normal);
|
||||
_WindowMeta(UINameConst.UI_MainPanel, UIWindowLayer.Normal);
|
||||
|
||||
_WindowMeta(UINameConst.UI_LevelSelect,UIWindowLayer.Normal);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -107,5 +107,5 @@ public static class UINameConst
|
|||
public static readonly string UINewLogin = "StartScene/UINewLogin";
|
||||
public static readonly string UIGiftCode = "MainScene/GiftCode/UIGiftCode";
|
||||
public static readonly string UI_MainPanel = "MainPanel/UI_MainPanel";
|
||||
|
||||
public static readonly string UI_LevelSelect = "LevelSelect/UI_LevelSelect";
|
||||
}
|
||||
|
|
@ -342,7 +342,9 @@ public partial class UIManager : Singlenton<UIManager>, IInitable
|
|||
var e = layerWindows.GetEnumerator();
|
||||
while (e.MoveNext())
|
||||
{
|
||||
e.Current?.transform?.SetSiblingIndex(siblingIndex++);
|
||||
var currWindow = e.Current;
|
||||
if (currWindow != null)
|
||||
currWindow.transform?.SetSiblingIndex(siblingIndex++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using cfg.LevelCfg;
|
||||
using UnityEngine;
|
||||
|
||||
public class ChapterInfo
|
||||
public class ChapterInfo : IEnumerable
|
||||
{
|
||||
private DataChapter _config;
|
||||
|
||||
|
|
@ -19,6 +19,36 @@ public class ChapterInfo
|
|||
|
||||
public int[] Rewards => _config.Rewards;
|
||||
|
||||
public int StarCount
|
||||
{
|
||||
get
|
||||
{
|
||||
var count = 0;
|
||||
foreach (var levelInfo in _levelList)
|
||||
{
|
||||
count += levelInfo.StarCount;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
public int StarMax => _levelList.Count * 3;
|
||||
|
||||
public bool IsLock
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (var levelInfo in _levelList)
|
||||
{
|
||||
if (!levelInfo.Lock)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public ChapterInfo(DataChapter config)
|
||||
{
|
||||
_config = config;
|
||||
|
|
@ -35,4 +65,9 @@ public class ChapterInfo
|
|||
DebugUtil.LogError($"cant add level,level id:{levelInfo.ID}");
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator()
|
||||
{
|
||||
return _levelList.GetEnumerator();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using cfg.LevelCfg;
|
||||
using UnityEngine;
|
||||
|
||||
|
|
@ -19,6 +20,73 @@ public class LevelGroupInfo
|
|||
|
||||
public string Desc => StringManager.Instance.GetLocalizeTextByKey(_config.Desc);
|
||||
|
||||
public int Index => _config.Index;
|
||||
|
||||
public ChapterInfo PlotChapter
|
||||
{
|
||||
get
|
||||
{
|
||||
return _chapterList.First((chapter) => chapter.LevelType == LevelType.Plot);
|
||||
}
|
||||
}
|
||||
public ChapterInfo EasyChapter
|
||||
{
|
||||
get
|
||||
{
|
||||
return _chapterList.First((chapter) => chapter.LevelType == LevelType.Easy);
|
||||
}
|
||||
}
|
||||
|
||||
public ChapterInfo HardChapter
|
||||
{
|
||||
get
|
||||
{
|
||||
return _chapterList.First((chapter) => chapter.LevelType == LevelType.Hard);
|
||||
}
|
||||
}
|
||||
|
||||
public int StarCount
|
||||
{
|
||||
get
|
||||
{
|
||||
var count = 0;
|
||||
foreach (var chapterInfo in _chapterList)
|
||||
{
|
||||
count += chapterInfo.StarCount;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
public int StarMax
|
||||
{
|
||||
get
|
||||
{
|
||||
var count = 0;
|
||||
foreach (var chapterInfo in _chapterList)
|
||||
{
|
||||
count += chapterInfo.StarMax;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsLock
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (var chapterInfo in _chapterList)
|
||||
{
|
||||
if (!chapterInfo.IsLock)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public LevelGroupInfo(DataLevelGroup config)
|
||||
{
|
||||
_config = config;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class LevelInfo
|
|||
allConditionPass = allConditionPass && conditionResult;
|
||||
if (!allConditionPass)
|
||||
{
|
||||
Debug.LogError($"关卡进入条件不满足,level id:{ID}");
|
||||
//Debug.Log($"关卡进入条件不满足,level id:{ID}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Gameplay.Level
|
||||
{
|
||||
|
|
@ -146,6 +147,21 @@ namespace Gameplay.Level
|
|||
|
||||
return levelGroupInfo;
|
||||
}
|
||||
|
||||
public List<LevelGroupInfo> GetAllLevelGroupInfo()
|
||||
{
|
||||
return _levelGroupDic.Values.ToList();
|
||||
}
|
||||
|
||||
public List<LevelInfo> GetAllLevelInfo()
|
||||
{
|
||||
return _levelDic.Values.ToList();
|
||||
}
|
||||
|
||||
public List<ChapterInfo> GetAllChapterInfo()
|
||||
{
|
||||
return _chapterInfoDic.Values.ToList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,12 +9,33 @@ using Image = UnityEngine.UI.Image;
|
|||
|
||||
public class UI_LevelSelectBinder
|
||||
{
|
||||
|
||||
|
||||
public static void GetComponents(UI_LevelSelectController window)
|
||||
{
|
||||
window.Button_Back = window.GetComponent<Button>("UI_Topbtn/Button_Back");
|
||||
window.Text_Back = window.GetComponent<TMP_Text>("UI_Topbtn/Button_Back/Text_Back");
|
||||
window.Button_Home = window.GetComponent<Button>("UI_Topbtn/Button_Home");
|
||||
window.Button_MainLevel = window.GetComponent<Button>("UI_ModeChoose/Scroll View/Viewport/Content/Button_MainLevel");
|
||||
window.Text_MainLevel = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_MainLevel/Text_MainLevel");
|
||||
window.Text_MainLevelNum = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_MainLevel/Text_MainLevelNum");
|
||||
window.Text_MainLevelName = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_MainLevel/Text_MainLevelName");
|
||||
window.Image_MainlevelLogo = window.GetComponent<Image>("UI_ModeChoose/Scroll View/Viewport/Content/Button_MainLevel/Image_MainlevelLogo");
|
||||
window.Image_BlackBar = window.GetComponent<Image>("UI_ModeChoose/Scroll View/Viewport/Content/Button_MainLevel/Image_BlackBar");
|
||||
window.Text_MainLevelProcess = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_MainLevel/Image_BlackBar/Text_MainLevelProcess");
|
||||
window.Button_BranchLevel = window.GetComponent<Button>("UI_ModeChoose/Scroll View/Viewport/Content/Button_BranchLevel");
|
||||
window.Text_MainLevel = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_BranchLevel/Text_MainLevel");
|
||||
window.Text_MainLevelNum = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_BranchLevel/Text_MainLevelNum");
|
||||
window.Text_MainLevelName = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_BranchLevel/Text_MainLevelName");
|
||||
window.Image_MainlevelLogo = window.GetComponent<Image>("UI_ModeChoose/Scroll View/Viewport/Content/Button_BranchLevel/Image_MainlevelLogo");
|
||||
window.Image_BlackBar = window.GetComponent<Image>("UI_ModeChoose/Scroll View/Viewport/Content/Button_BranchLevel/Image_BlackBar");
|
||||
window.Text_MainLevelProcess = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_BranchLevel/Image_BlackBar/Text_MainLevelProcess");
|
||||
window.Button_DungeonlEVEL = window.GetComponent<Button>("UI_ModeChoose/Scroll View/Viewport/Content/Button_DungeonlEVEL");
|
||||
window.Text_MainLevel = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_DungeonlEVEL/Text_MainLevel");
|
||||
window.Text_MainLevelNum = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_DungeonlEVEL/Text_MainLevelNum");
|
||||
window.Text_MainLevelName = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_DungeonlEVEL/Text_MainLevelName");
|
||||
window.Image_MainlevelLogo = window.GetComponent<Image>("UI_ModeChoose/Scroll View/Viewport/Content/Button_DungeonlEVEL/Image_MainlevelLogo");
|
||||
window.Image_BlackBar = window.GetComponent<Image>("UI_ModeChoose/Scroll View/Viewport/Content/Button_DungeonlEVEL/Image_BlackBar");
|
||||
window.Text_MainLevelProcess = window.GetComponent<TMP_Text>("UI_ModeChoose/Scroll View/Viewport/Content/Button_DungeonlEVEL/Image_BlackBar/Text_MainLevelProcess");
|
||||
window.Image_ChapterBG = window.GetComponent<Image>("UI_LevelGroupChoose/Image_ChapterBG");
|
||||
window.Image_LevelBG = window.GetComponent<Image>("UI_LevelChoose/Image_LevelBG");
|
||||
window.Image_LevelTitle = window.GetComponent<Image>("UI_LevelChoose/Image_LevelBG/Image_LevelTitle");
|
||||
|
|
@ -22,27 +43,18 @@ public class UI_LevelSelectBinder
|
|||
window.Text_ChapterName = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_LevelBG/Image_LevelTitle/Text_ChapterName");
|
||||
window.Image_ProcessBG = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG");
|
||||
window.Image_LevelProcess = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess");
|
||||
window.Image_ProcessBar = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Image_ProcessBar");
|
||||
window.Text_StarNum = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Image_ProcessBar/Text_StarNum");
|
||||
window.Image_Box01 = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Image_Box01");
|
||||
window.Text_BoxStar01 = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Image_Box01/Text_BoxStar01");
|
||||
window.Image_Box02 = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Image_Box02");
|
||||
window.Text_BoxStar02 = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Image_Box02/Text_BoxStar02");
|
||||
window.Image_Box03 = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Image_Box03");
|
||||
window.Text_BoxStar03 = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Image_Box03/Text_BoxStar03");
|
||||
window.Text_NoBoxNum01 = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Text_NoBoxNum01");
|
||||
window.Text_NoBoxNum02 = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Text_NoBoxNum02");
|
||||
window.Text_NoBoxNum03 = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/Text_NoBoxNum03");
|
||||
window.Image_ProcessBar = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/StarRewardProgress/Image_ProcessBar");
|
||||
window.Text_StarNum = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_LevelProcess/StarRewardProgress/Image_ProcessBar/Text_StarNum");
|
||||
window.Image_SelectBG = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG");
|
||||
window.Button_Read = window.GetComponent<Button>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Read");
|
||||
window.Text_Read = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Read/Text_Read");
|
||||
window.Button_Simple = window.GetComponent<Button>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Simple");
|
||||
window.Text_Simple = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Simple/Text_Simple");
|
||||
window.Button_Plot = window.GetComponent<Button>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Plot");
|
||||
window.Text_Read = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Plot/Text_Read");
|
||||
window.Button_Easy = window.GetComponent<Button>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Easy");
|
||||
window.Text_Simple = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Easy/Text_Simple");
|
||||
window.Button_Hard = window.GetComponent<Button>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Hard");
|
||||
window.Text_Hard = window.GetComponent<TMP_Text>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Hard/Text_Hard");
|
||||
window.Image_WhiteRect = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Image_WhiteRect");
|
||||
window.Image_Read = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Image_WhiteRect/Image_Read");
|
||||
window.Image_Simple = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Image_WhiteRect/Image_Simple");
|
||||
window.Image_Plot = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Image_WhiteRect/Image_Plot");
|
||||
window.Image_Easy = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Image_WhiteRect/Image_Easy");
|
||||
window.Image_RedRect = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Image_RedRect");
|
||||
window.Image_Hard = window.GetComponent<Image>("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Image_RedRect/Image_Hard");
|
||||
|
||||
|
|
@ -52,6 +64,27 @@ public class UI_LevelSelectBinder
|
|||
public Button Button_Back;
|
||||
public TMP_Text Text_Back;
|
||||
public Button Button_Home;
|
||||
public Button Button_MainLevel;
|
||||
public TMP_Text Text_MainLevel;
|
||||
public TMP_Text Text_MainLevelNum;
|
||||
public TMP_Text Text_MainLevelName;
|
||||
public Image Image_MainlevelLogo;
|
||||
public Image Image_BlackBar;
|
||||
public TMP_Text Text_MainLevelProcess;
|
||||
public Button Button_BranchLevel;
|
||||
public TMP_Text Text_MainLevel;
|
||||
public TMP_Text Text_MainLevelNum;
|
||||
public TMP_Text Text_MainLevelName;
|
||||
public Image Image_MainlevelLogo;
|
||||
public Image Image_BlackBar;
|
||||
public TMP_Text Text_MainLevelProcess;
|
||||
public Button Button_DungeonlEVEL;
|
||||
public TMP_Text Text_MainLevel;
|
||||
public TMP_Text Text_MainLevelNum;
|
||||
public TMP_Text Text_MainLevelName;
|
||||
public Image Image_MainlevelLogo;
|
||||
public Image Image_BlackBar;
|
||||
public TMP_Text Text_MainLevelProcess;
|
||||
public Image Image_ChapterBG;
|
||||
public Image Image_LevelBG;
|
||||
public Image Image_LevelTitle;
|
||||
|
|
@ -61,19 +94,10 @@ public class UI_LevelSelectBinder
|
|||
public Image Image_LevelProcess;
|
||||
public Image Image_ProcessBar;
|
||||
public TMP_Text Text_StarNum;
|
||||
public Image Image_Box01;
|
||||
public TMP_Text Text_BoxStar01;
|
||||
public Image Image_Box02;
|
||||
public TMP_Text Text_BoxStar02;
|
||||
public Image Image_Box03;
|
||||
public TMP_Text Text_BoxStar03;
|
||||
public TMP_Text Text_NoBoxNum01;
|
||||
public TMP_Text Text_NoBoxNum02;
|
||||
public TMP_Text Text_NoBoxNum03;
|
||||
public Image Image_SelectBG;
|
||||
public Button Button_Read;
|
||||
public Button Button_Plot;
|
||||
public TMP_Text Text_Read;
|
||||
public Button Button_Simple;
|
||||
public Button Button_Easy;
|
||||
public TMP_Text Text_Simple;
|
||||
public Button Button_Hard;
|
||||
public TMP_Text Text_Hard;
|
||||
|
|
|
|||
|
|
@ -217,14 +217,7 @@ public class UI_MainPanelController: UIWindow
|
|||
|
||||
private void OnButton_ChooseLevelClick()
|
||||
{
|
||||
if (int.TryParse(_inputLevel.text, out var id) && LevelUtils.CheckEnterLevel(id))
|
||||
{
|
||||
LevelManager.Instance.TryEnterLevel(id, OnEnterLevelFinish);
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugUtil.LogError("Level Name wrong : {0}", _inputLevel.text);
|
||||
}
|
||||
UIManager.Instance.OpenWindow(UINameConst.UI_LevelSelect);
|
||||
}
|
||||
private void OnEnterLevelFinish()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,74 +1,581 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using cfg.LevelCfg;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Gameplay.Level;
|
||||
using LC.Google.Protobuf.WellKnownTypes;
|
||||
using PhxhSDK;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.UIElements;
|
||||
using Utils;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
using Enum = Google.Protobuf.WellKnownTypes.Enum;
|
||||
using Image = UnityEngine.UI.Image;
|
||||
using ScrollView = AillieoUtils.ScrollView;
|
||||
|
||||
public class UI_LevelSelectController : UIWindow
|
||||
{
|
||||
//UI GameObj
|
||||
///Auto Gen Start///
|
||||
public Button Button_Back;
|
||||
public TMP_Text Text_Back;
|
||||
public Button Button_Home;
|
||||
public Image Image_ChapterBG;
|
||||
public Image Image_LevelBG;
|
||||
public Image Image_LevelTitle;
|
||||
public TMP_Text Text_ChapterNum;
|
||||
public TMP_Text Text_ChapterName;
|
||||
public Image Image_ProcessBG;
|
||||
public Image Image_LevelProcess;
|
||||
public Image Image_ProcessBar;
|
||||
public TMP_Text Text_StarNum;
|
||||
public Image Image_Box01;
|
||||
public TMP_Text Text_BoxStar01;
|
||||
public Image Image_Box02;
|
||||
public TMP_Text Text_BoxStar02;
|
||||
public Image Image_Box03;
|
||||
public TMP_Text Text_BoxStar03;
|
||||
public TMP_Text Text_NoBoxNum01;
|
||||
public TMP_Text Text_NoBoxNum02;
|
||||
public TMP_Text Text_NoBoxNum03;
|
||||
public Image Image_SelectBG;
|
||||
public Button Button_Read;
|
||||
public TMP_Text Text_Read;
|
||||
public Button Button_Simple;
|
||||
public TMP_Text Text_Simple;
|
||||
public Button Button_Hard;
|
||||
public TMP_Text Text_Hard;
|
||||
public Image Image_WhiteRect;
|
||||
public Image Image_Read;
|
||||
public Image Image_Simple;
|
||||
public Image Image_RedRect;
|
||||
public Image Image_Hard;
|
||||
|
||||
///Auto Gen End///
|
||||
|
||||
// Use this for initialization
|
||||
public override void OnAwake()
|
||||
{
|
||||
//bind UI GameObj
|
||||
UI_LevelSelectBinder.GetComponents(this);
|
||||
}
|
||||
//UI GameObj
|
||||
///Auto Gen Start///
|
||||
public Button Button_Back;
|
||||
|
||||
//invoke when open window
|
||||
protected override void OnOpenWindow(object data = null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//invoke when reload window
|
||||
protected override void OnReloadWindow(object data = null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//invoke when close window
|
||||
protected override void OnCloseWindow(bool destroy = false)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
public TMP_Text Text_Back;
|
||||
public Button Button_Home;
|
||||
public Button Button_MainLevel;
|
||||
public TMP_Text Text_MainLevel;
|
||||
public TMP_Text Text_MainLevelNum;
|
||||
public TMP_Text Text_MainLevelName;
|
||||
public Image Image_MainlevelLogo;
|
||||
public Image Image_BlackBar;
|
||||
public TMP_Text Text_MainLevelProcess;
|
||||
public Button Button_BranchLevel;
|
||||
public Button Button_DungeonlEVEL;
|
||||
public Image Image_ChapterBG;
|
||||
public Image Image_LevelBG;
|
||||
public Image Image_LevelTitle;
|
||||
public TMP_Text Text_ChapterNum;
|
||||
public TMP_Text Text_ChapterName;
|
||||
public Image Image_ProcessBG;
|
||||
public Image Image_LevelProcess;
|
||||
public Image Image_ProcessBar;
|
||||
public TMP_Text Text_StarNum;
|
||||
public Image Image_SelectBG;
|
||||
public Button Button_Plot;
|
||||
public TMP_Text Text_Read;
|
||||
public Button Button_Easy;
|
||||
public TMP_Text Text_Simple;
|
||||
public Button Button_Hard;
|
||||
public TMP_Text Text_Hard;
|
||||
public Image Image_WhiteRect;
|
||||
[FormerlySerializedAs("Image_Read")] public Image Image_Plot;
|
||||
[FormerlySerializedAs("Image_Simple")] public Image Image_Easy;
|
||||
public Image Image_RedRect;
|
||||
public Image Image_Hard;
|
||||
|
||||
///Auto Gen End///
|
||||
private enum PageType
|
||||
{
|
||||
Mode = 1,
|
||||
LevelGroup = 2,
|
||||
Level = 3,
|
||||
}
|
||||
|
||||
private PageType _currPage = PageType.Mode;
|
||||
private LevelGroupType _currGroupType;
|
||||
private LevelGroupInfo _currLevelGroupInfo;
|
||||
private ChapterInfo _currEasyChapterInfo;
|
||||
private ChapterInfo _currHardChapterInfo;
|
||||
private ChapterInfo _currPlotChapterInfo;
|
||||
private ChapterInfo _currChapterInfo;
|
||||
private LevelInfo _currSelectLevelInfo;
|
||||
private List<LevelGroupInfo> _showLevelGroupInfoList = new();
|
||||
private List<LevelInfo> _showLevelInfoList = new();
|
||||
|
||||
private RectTransform UI_ModeChoose;
|
||||
private RectTransform UI_LevelGroupChoose;
|
||||
private RectTransform UI_LevelChoose;
|
||||
private RectTransform _modeParent;
|
||||
private ScrollView _levelGroupScrollView;
|
||||
private ScrollView _levelScrollView;
|
||||
private RectTransform _starRewardsParent;
|
||||
|
||||
private const string STAR_REWARD_PREFAB_PATH = "Assets/Art/UI/Prefab/LevelSelect/Button_StarReward.prefab";
|
||||
private List<GameObject> _starRewardPool = new();
|
||||
private List<GameObject> _showStarReward = new();
|
||||
|
||||
private float _totalMoveTime = 1f;
|
||||
private CancellationTokenSource _cts = new();
|
||||
|
||||
public override void OnAwake()
|
||||
{
|
||||
//bind UI GameObj
|
||||
UI_LevelSelectBinder.GetComponents(this);
|
||||
BindProperty();
|
||||
BindEvent();
|
||||
RegisterSignal();
|
||||
}
|
||||
|
||||
private void BindProperty()
|
||||
{
|
||||
UI_ModeChoose = transform.Find("UI_ModeChoose") as RectTransform;
|
||||
UI_LevelGroupChoose = transform.Find("UI_LevelGroupChoose") as RectTransform;
|
||||
UI_LevelChoose = transform.Find("UI_LevelChoose") as RectTransform;
|
||||
_modeParent = UI_ModeChoose.Find("Scroll View/Viewport/Content") as RectTransform;
|
||||
_levelGroupScrollView = UI_LevelGroupChoose.Find("Image_ChapterBG/Scroll View").GetComponent<ScrollView>();
|
||||
_levelScrollView = UI_LevelChoose.Find("Image_LevelBG/Scroll View").GetComponent<ScrollView>();
|
||||
_starRewardsParent = Image_LevelProcess.transform.Find("StarRewardProgress/starRewards") as RectTransform;
|
||||
|
||||
_levelGroupScrollView.SetUpdateFunc(OnRenderLevelGroup);
|
||||
_levelGroupScrollView.SetItemCountFunc(GetLevelGroupCount);
|
||||
_levelGroupScrollView.SetButton(SetOnLevelGroupClick);
|
||||
|
||||
_levelScrollView.SetUpdateFunc(OnRenderLevelInfo);
|
||||
_levelScrollView.SetItemCountFunc(GetLevelCount);
|
||||
_levelScrollView.SetButton(SetOnLevelClick);
|
||||
}
|
||||
|
||||
private void BindEvent()
|
||||
{
|
||||
BindButton("UI_Topbtn/Button_Back", OnClickBack);
|
||||
BindButton("UI_Topbtn/Button_Home", OnClickHome);
|
||||
BindButton("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Easy", OnClickEasy);
|
||||
BindButton("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Hard", OnClickHard);
|
||||
BindButton("UI_LevelChoose/Image_ProcessBG/Image_SelectBG/Button_Plot", OnClickPlot);
|
||||
var modeButtonCount = _modeParent.childCount;
|
||||
for (int i = 0; i < modeButtonCount; i++)
|
||||
{
|
||||
var modeButton = _modeParent.GetChild(i).GetComponent<Button>();
|
||||
modeButton.onClick.RemoveAllListeners();
|
||||
var index = i;
|
||||
modeButton.onClick.AddListener(() =>
|
||||
{
|
||||
var levelGroupType = (LevelGroupType)index;
|
||||
EnterSelectLevelGroup(levelGroupType);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void RegisterSignal()
|
||||
{
|
||||
}
|
||||
|
||||
private void UnRegisterSignal()
|
||||
{
|
||||
}
|
||||
|
||||
private void Refresh()
|
||||
{
|
||||
RefreshPage();
|
||||
switch (_currPage)
|
||||
{
|
||||
case PageType.Mode:
|
||||
RefreshMode();
|
||||
break;
|
||||
case PageType.LevelGroup:
|
||||
RefreshLevelGroup();
|
||||
break;
|
||||
case PageType.Level:
|
||||
RefreshLevel();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//将当前UI看成是三个页面,选模式,选关卡组,选关
|
||||
private void RefreshPage()
|
||||
{
|
||||
UI_ModeChoose.gameObject.SetActive(_currPage == PageType.Mode);
|
||||
UI_LevelGroupChoose.gameObject.SetActive(_currPage == PageType.LevelGroup);
|
||||
UI_LevelChoose.gameObject.SetActive(_currPage == PageType.Level);
|
||||
}
|
||||
|
||||
private void RefreshMode()
|
||||
{
|
||||
}
|
||||
|
||||
private void RefreshLevelGroup()
|
||||
{
|
||||
RefreshLevelGroupToShow();
|
||||
_levelGroupScrollView.UpdateData(true);
|
||||
}
|
||||
|
||||
private void RefreshLevelGroupToShow()
|
||||
{
|
||||
_showLevelGroupInfoList.Clear();
|
||||
var allLevelGroup = LevelManager.Instance.GetAllLevelGroupInfo();
|
||||
foreach (var levelGroupInfo in allLevelGroup)
|
||||
{
|
||||
if (levelGroupInfo.GroupType == _currGroupType && !levelGroupInfo.IsLock)
|
||||
{
|
||||
_showLevelGroupInfoList.Add(levelGroupInfo);
|
||||
}
|
||||
}
|
||||
|
||||
_showLevelGroupInfoList.Sort((a, b) => { return a.Index.CompareTo(b.Index); });
|
||||
}
|
||||
|
||||
private void RefreshLevel()
|
||||
{
|
||||
RefreshLevelToShow();
|
||||
_levelScrollView.UpdateData(true);
|
||||
}
|
||||
|
||||
private void RefreshLevelToShow()
|
||||
{
|
||||
_showLevelInfoList.Clear();
|
||||
foreach (LevelInfo levelInfo in _currChapterInfo)
|
||||
{
|
||||
if (!levelInfo.Lock)
|
||||
_showLevelInfoList.Add(levelInfo);
|
||||
}
|
||||
|
||||
_showLevelInfoList.Sort((a, b) => a.Index.CompareTo(b.Index));
|
||||
}
|
||||
|
||||
private void EnterSelectLevelGroup(LevelGroupType type)
|
||||
{
|
||||
_currGroupType = type;
|
||||
_currPage = PageType.LevelGroup;
|
||||
Refresh();
|
||||
}
|
||||
|
||||
private void ExitSelectLevelGroup()
|
||||
{
|
||||
_currPage = PageType.Mode;
|
||||
Refresh();
|
||||
}
|
||||
|
||||
private void EnterSelectLevel(LevelGroupInfo levelGroupInfo)
|
||||
{
|
||||
_currLevelGroupInfo = levelGroupInfo;
|
||||
_currPage = PageType.Level;
|
||||
var defaultChapter = InitChapter();
|
||||
if (defaultChapter != null)
|
||||
ChangeChapter(defaultChapter);
|
||||
}
|
||||
|
||||
private void ExitSelectLevel()
|
||||
{
|
||||
_currLevelGroupInfo = null;
|
||||
_currEasyChapterInfo = null;
|
||||
_currHardChapterInfo = null;
|
||||
_currPlotChapterInfo = null;
|
||||
_currChapterInfo = null;
|
||||
_currSelectLevelInfo = null;
|
||||
_currPage = PageType.LevelGroup;
|
||||
Refresh();
|
||||
}
|
||||
|
||||
private ChapterInfo InitChapter()
|
||||
{
|
||||
_currEasyChapterInfo = _currLevelGroupInfo.EasyChapter;
|
||||
_currHardChapterInfo = _currLevelGroupInfo.HardChapter;
|
||||
_currPlotChapterInfo = _currLevelGroupInfo.PlotChapter;
|
||||
|
||||
Button_Easy.interactable = IsChapterValid(_currEasyChapterInfo);
|
||||
Button_Hard.interactable = IsChapterValid(_currHardChapterInfo);
|
||||
Button_Plot.interactable = IsChapterValid(_currPlotChapterInfo);
|
||||
|
||||
var result =
|
||||
IsChapterValid(_currEasyChapterInfo) ? _currEasyChapterInfo :
|
||||
IsChapterValid(_currHardChapterInfo) ? _currHardChapterInfo : _currPlotChapterInfo;
|
||||
return result;
|
||||
}
|
||||
|
||||
private bool IsChapterValid(ChapterInfo chapter)
|
||||
{
|
||||
return chapter != null && !chapter.IsLock;
|
||||
}
|
||||
|
||||
private async void ChangeChapter(ChapterInfo currChapterInfo)
|
||||
{
|
||||
if (_currChapterInfo == currChapterInfo)
|
||||
return;
|
||||
_currChapterInfo = currChapterInfo;
|
||||
Image_Plot.gameObject.SetActive(currChapterInfo == _currPlotChapterInfo);
|
||||
Image_Easy.gameObject.SetActive(currChapterInfo == _currEasyChapterInfo);
|
||||
Image_Hard.gameObject.SetActive(currChapterInfo == _currHardChapterInfo);
|
||||
ReturnAllStarReward();
|
||||
int maxTarget = currChapterInfo.StarList[^1];
|
||||
var progressLength = _starRewardsParent.rect.width;
|
||||
foreach (var target in currChapterInfo.StarList)
|
||||
{
|
||||
var starReward = await GetAStarReward();
|
||||
_showStarReward.Add(starReward);
|
||||
var targetText = starReward.transform.Find("target_green").GetComponent<TMP_Text>();
|
||||
var targetWhiteText = starReward.transform.Find("target_white").GetComponent<TMP_Text>();
|
||||
targetText.text = target.ToString();
|
||||
targetWhiteText.text = target.ToString();
|
||||
var x = ((float)target / maxTarget) * progressLength;
|
||||
var rectTrans = starReward.transform as RectTransform;
|
||||
rectTrans.anchoredPosition = new Vector2(x, rectTrans.anchoredPosition.y);
|
||||
SetStarRewardEnable(starReward, false);
|
||||
}
|
||||
|
||||
var currStarCount = currChapterInfo.StarCount;
|
||||
currStarCount = 6;
|
||||
var ratio = (float)currStarCount / maxTarget;
|
||||
Text_StarNum.text = currStarCount.ToString();
|
||||
_cts.Cancel();
|
||||
_cts.Dispose();
|
||||
_cts = new CancellationTokenSource();
|
||||
PlayProgressAnimation(ratio, progressLength, _cts.Token);
|
||||
Refresh();
|
||||
}
|
||||
|
||||
private void SetStarRewardEnable(GameObject starReward, bool isEnable)
|
||||
{
|
||||
var starRewardGreen = starReward.transform.Find("starReward_green").gameObject;
|
||||
var starReward_white = starReward.transform.Find("starReward_white").gameObject;
|
||||
var star_green = starReward.transform.Find("star_green").gameObject;
|
||||
var star_white = starReward.transform.Find("star_white").gameObject;
|
||||
var target_green = starReward.transform.Find("target_green").gameObject;
|
||||
var target_white = starReward.transform.Find("target_white").gameObject;
|
||||
|
||||
starRewardGreen.SetActive(isEnable);
|
||||
starReward_white.SetActive(!isEnable);
|
||||
star_green.SetActive(isEnable);
|
||||
star_white.SetActive(!isEnable);
|
||||
target_green.SetActive(isEnable);
|
||||
target_white.SetActive(!isEnable);
|
||||
}
|
||||
|
||||
private async void PlayProgressAnimation(float ratio, float progressLength, CancellationToken token)
|
||||
{
|
||||
var currMoveTime = 0f;
|
||||
var rewardTList = new List<float>();
|
||||
var maxStarCount = _currChapterInfo.StarList[^1];
|
||||
foreach (var starCount in _currChapterInfo.StarList)
|
||||
{
|
||||
var t = (float)starCount / maxStarCount;
|
||||
rewardTList.Add(t);
|
||||
}
|
||||
|
||||
var currStarIndex = 0;
|
||||
while (currMoveTime < ratio * _totalMoveTime)
|
||||
{
|
||||
currMoveTime += Time.deltaTime;
|
||||
var t = currMoveTime / _totalMoveTime;
|
||||
var x = Mathf.Min(progressLength * ratio, progressLength * t);
|
||||
Image_ProcessBar.rectTransform.anchoredPosition =
|
||||
new Vector2(x, Image_ProcessBar.rectTransform.anchoredPosition.y);
|
||||
if (t >= rewardTList[0])
|
||||
{
|
||||
rewardTList.RemoveAt(0);
|
||||
SetStarRewardEnable(_showStarReward[currStarIndex], true);
|
||||
currStarIndex++;
|
||||
}
|
||||
|
||||
|
||||
var isCanceled = await UniTask.DelayFrame(1, PlayerLoopTiming.Update, token).SuppressCancellationThrow();
|
||||
if (isCanceled)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private async UniTask<GameObject> GetAStarReward()
|
||||
{
|
||||
GameObject result = null;
|
||||
if (_starRewardPool.Count > 0)
|
||||
{
|
||||
result = _starRewardPool[^1];
|
||||
_starRewardPool.RemoveAt(_starRewardPool.Count - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
var prefab = await AssetManager.Instance.LoadAssetAsync<GameObject>(STAR_REWARD_PREFAB_PATH);
|
||||
if (prefab == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
GameObject go = Instantiate(prefab, _starRewardsParent.transform);
|
||||
result = go;
|
||||
}
|
||||
|
||||
result.SetActive(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
private void ReturnAllStarReward()
|
||||
{
|
||||
foreach (var go in _showStarReward)
|
||||
{
|
||||
go.SetActive(false);
|
||||
_starRewardPool.Add(go);
|
||||
}
|
||||
|
||||
_showStarReward.Clear();
|
||||
}
|
||||
|
||||
private void ShowLevelDetail()
|
||||
{
|
||||
if (_currSelectLevelInfo == null)
|
||||
return;
|
||||
LevelManager.Instance.TryEnterLevel(_currSelectLevelInfo.ID, CloseSelf);
|
||||
}
|
||||
|
||||
private void CloseSelf()
|
||||
{
|
||||
UIManager.Instance.CloseWindow(WindowName, true);
|
||||
}
|
||||
|
||||
private int GetLevelGroupCount()
|
||||
{
|
||||
return _showLevelGroupInfoList.Count;
|
||||
}
|
||||
|
||||
private void OnRenderLevelGroup(int index, RectTransform item)
|
||||
{
|
||||
if (index >= _showLevelGroupInfoList.Count || index < 0)
|
||||
{
|
||||
DebugUtil.LogError($"index out of range,index:{index}");
|
||||
return;
|
||||
}
|
||||
|
||||
var levelGroupInfo = _showLevelGroupInfoList[index];
|
||||
var Text_ChapterNum = item.Find("Text_ChapterNum").GetComponent<TMP_Text>();
|
||||
var Text_ChapterName = item.Find("Text_ChapterName").GetComponent<TMP_Text>();
|
||||
var Image_ProcessBarEasy = item.Find("UI_Easy/Image_ProcessBarEasy").GetComponent<Image>();
|
||||
var Text_EasyStarNow = item.Find("UI_Easy/Text_EasyStarNow").GetComponent<TMP_Text>();
|
||||
var Text_EasyStarMax = item.Find("UI_Easy/Text_EasyStarMax").GetComponent<TMP_Text>();
|
||||
var Image_ProcessBarHard = item.Find("UI_Hard/Image_ProcessBarHard").GetComponent<Image>();
|
||||
var Text_HardStarNow = item.Find("UI_Hard/Text_HardStarNow").GetComponent<TMP_Text>();
|
||||
var Text_HardStarMax = item.Find("UI_Hard/Text_HardStarMax").GetComponent<TMP_Text>();
|
||||
|
||||
Text_ChapterNum.text = string.Format("{0:D2}", levelGroupInfo.Index);
|
||||
Text_ChapterName.text = levelGroupInfo.Name;
|
||||
|
||||
var starCountEasy = levelGroupInfo.EasyChapter?.StarCount ?? 0;
|
||||
var starMaxEasy = levelGroupInfo.EasyChapter?.StarMax ?? 0;
|
||||
Image_ProcessBarEasy.fillAmount = (float)starCountEasy / starMaxEasy;
|
||||
Text_EasyStarNow.text = starCountEasy.ToString();
|
||||
Text_EasyStarMax.text = starMaxEasy.ToString();
|
||||
|
||||
var starCountHard = levelGroupInfo.HardChapter?.StarCount ?? 0;
|
||||
var starMaxHard = levelGroupInfo.HardChapter?.StarMax ?? 0;
|
||||
Image_ProcessBarHard.fillAmount = (float)starCountHard / starMaxHard;
|
||||
Text_HardStarNow.text = starCountHard.ToString();
|
||||
Text_HardStarMax.text = starMaxHard.ToString();
|
||||
}
|
||||
|
||||
private void SetOnLevelGroupClick(GameObject obj)
|
||||
{
|
||||
var index = CommonUtils.GetTransformIndex(obj.transform);
|
||||
if (index >= _showLevelGroupInfoList.Count || index < 0)
|
||||
{
|
||||
DebugUtil.LogError($"index out of range,index:{index}");
|
||||
return;
|
||||
}
|
||||
|
||||
BindButton(obj, () =>
|
||||
{
|
||||
var selectedLevelGroup = _showLevelGroupInfoList[index];
|
||||
EnterSelectLevel(selectedLevelGroup);
|
||||
Refresh();
|
||||
});
|
||||
}
|
||||
|
||||
private int GetLevelCount()
|
||||
{
|
||||
return _showLevelInfoList.Count;
|
||||
}
|
||||
|
||||
private async void OnRenderLevelInfo(int index, RectTransform item)
|
||||
{
|
||||
if (index < 0 || index >= _showLevelInfoList.Count)
|
||||
{
|
||||
DebugUtil.LogError("index out of range,index:{0}", index);
|
||||
return;
|
||||
}
|
||||
|
||||
var levelInfo = _showLevelInfoList[index];
|
||||
var Text_LevelNum = item.Find("Text_LevelNum").GetComponent<TMP_Text>();
|
||||
var Text_LevelName = item.Find("Text_LevelName").GetComponent<TMP_Text>();
|
||||
var Image_Star01 = item.Find("LevelStar/Image_Star01").gameObject;
|
||||
var Image_Star02 = item.Find("LevelStar/Image_Star02").gameObject;
|
||||
var Image_Star03 = item.Find("LevelStar/Image_Star03").gameObject;
|
||||
var Image_environment = item.Find("MapLogo/Image_environment").GetComponent<Image>();
|
||||
var Image_weather = item.Find("MapLogo/Image_weather").GetComponent<Image>();
|
||||
var Image_daynight = item.Find("MapLogo/Image_daynight").GetComponent<Image>();
|
||||
|
||||
Text_LevelNum.text = $"{_currLevelGroupInfo.Index:D2}-{levelInfo.Index:D2}";
|
||||
Text_LevelName.text = levelInfo.Name;
|
||||
var starCount = levelInfo.StarCount;
|
||||
Image_Star01.SetActive(starCount >= 1);
|
||||
Image_Star02.SetActive(starCount >= 2);
|
||||
Image_Star03.SetActive(starCount >= 3);
|
||||
Image_environment.sprite = await CommonUtils.GetEnvironmentIcon(levelInfo.EnvironmentType);
|
||||
Image_weather.sprite = await CommonUtils.GetWeatherIcon(levelInfo.WeatherType);
|
||||
Image_daynight.sprite = await CommonUtils.GetDayNightIcon(levelInfo.DayNightType);
|
||||
}
|
||||
|
||||
private void SetOnLevelClick(GameObject go)
|
||||
{
|
||||
var index = CommonUtils.GetTransformIndex(go.transform);
|
||||
if (index >= _showLevelInfoList.Count || index < 0)
|
||||
{
|
||||
DebugUtil.LogError("index out of range!,{0}", index);
|
||||
}
|
||||
|
||||
BindButton(go, () =>
|
||||
{
|
||||
var levelInfo = _showLevelInfoList[index];
|
||||
if (levelInfo != null)
|
||||
{
|
||||
_currSelectLevelInfo = levelInfo;
|
||||
ShowLevelDetail();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#region Event
|
||||
|
||||
private void OnClickBack()
|
||||
{
|
||||
if (_currPage == PageType.Mode)
|
||||
UIManager.Instance.CloseWindow(WindowName, true);
|
||||
else
|
||||
{
|
||||
_currPage = (PageType)((int)_currPage - 1);
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnClickHome()
|
||||
{
|
||||
UIManager.Instance.CloseWindow(WindowName, true);
|
||||
}
|
||||
|
||||
private void OnClickEasy()
|
||||
{
|
||||
if (_currEasyChapterInfo != null)
|
||||
ChangeChapter(_currEasyChapterInfo);
|
||||
}
|
||||
|
||||
private void OnClickHard()
|
||||
{
|
||||
if (_currHardChapterInfo != null)
|
||||
ChangeChapter(_currHardChapterInfo);
|
||||
}
|
||||
|
||||
private void OnClickPlot()
|
||||
{
|
||||
if (_currPlotChapterInfo != null)
|
||||
ChangeChapter(_currPlotChapterInfo);
|
||||
}
|
||||
|
||||
#endregion Event
|
||||
|
||||
#region override method
|
||||
|
||||
protected override void OnOpenWindow()
|
||||
{
|
||||
Refresh();
|
||||
}
|
||||
|
||||
//invoke when open window
|
||||
protected override void OnOpenWindow(object data = null)
|
||||
{
|
||||
Refresh();
|
||||
}
|
||||
|
||||
//invoke when reload window
|
||||
protected override void OnReloadWindow(object data = null)
|
||||
{
|
||||
Refresh();
|
||||
}
|
||||
|
||||
//invoke when close window
|
||||
protected override void OnCloseWindow(bool destroy = false)
|
||||
{
|
||||
UnRegisterSignal();
|
||||
_currPage = PageType.Mode;
|
||||
_cts.Cancel();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5a8e782d325058d4299cbb045401740f
|
||||
guid: 6f968f883cfe22c4ab88c447bdf75a58
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
|
|
|||
|
|
@ -8,12 +8,15 @@ using Gameplay.Common;
|
|||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using cfg;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine.Networking;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Gameplay.Level;
|
||||
using PhxhSDK;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using Constants = Framework.Constants;
|
||||
|
|
@ -26,7 +29,10 @@ namespace Utils
|
|||
private static readonly int MainTex = Shader.PropertyToID("_MainTex");
|
||||
private static readonly int BlurSize = Shader.PropertyToID("_BlurSize");
|
||||
private static readonly int ForceGray = Shader.PropertyToID("_ForceGray");
|
||||
|
||||
private const string ICON_WEATHER_PREFIX = "Icon_Weather_";
|
||||
private const string ICON_ENVIRONMENT_PREFIX = "Icon_Environment_";
|
||||
private const string ICON_DAYNIGHT_PREFIX = "Icon_Daynight_";
|
||||
|
||||
public static void DestoryGameObjectImmediate(ref GameObject obj)
|
||||
{
|
||||
if (null != obj)
|
||||
|
|
@ -1077,6 +1083,43 @@ namespace Utils
|
|||
return angle + 180;
|
||||
}
|
||||
|
||||
public static int GetTransformIndex(Transform transform)
|
||||
{
|
||||
var parent = transform.parent;
|
||||
if (parent != null)
|
||||
{
|
||||
var childCount = parent.childCount;
|
||||
for (int i = 0; i < childCount; i++)
|
||||
{
|
||||
var child = parent.GetChild(i);
|
||||
if (child == transform)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static async UniTask<Sprite> GetWeatherIcon(LevelData.WeatherType weatherType)
|
||||
{
|
||||
var path = TableManager.Instance.Tables.IconConfig.Get(ICON_WEATHER_PREFIX + weatherType).Path;
|
||||
var sprite = await AssetManager.Instance.LoadAssetAsync<Sprite>(path);
|
||||
return sprite;
|
||||
}
|
||||
|
||||
public static async UniTask<Sprite> GetEnvironmentIcon(MapData.EnvironmentType environmentType)
|
||||
{
|
||||
var path = TableManager.Instance.Tables.IconConfig.Get(ICON_ENVIRONMENT_PREFIX + environmentType).Path;
|
||||
var sprite = await AssetManager.Instance.LoadAssetAsync<Sprite>(path);
|
||||
return sprite;
|
||||
}
|
||||
|
||||
public static async UniTask<Sprite> GetDayNightIcon(LevelData.DayNightType dayNightType)
|
||||
{
|
||||
var path = TableManager.Instance.Tables.IconConfig.Get(ICON_DAYNIGHT_PREFIX + dayNightType).Path;
|
||||
var sprite = await AssetManager.Instance.LoadAssetAsync<Sprite>(path);
|
||||
return sprite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ public sealed partial class Tables
|
|||
public StoryCfg.StoryMainConfig StoryMainConfig {get; }
|
||||
public UIInterfaceBannerGoToCfg.bannerCfg bannerCfg {get; }
|
||||
public FightCfg.EnviormentConfig EnviormentConfig {get; }
|
||||
public UI.IconConfig IconConfig {get; }
|
||||
|
||||
public Tables(System.Func<string, JSONNode> loader)
|
||||
{
|
||||
|
|
@ -170,6 +171,8 @@ public sealed partial class Tables
|
|||
tables.Add("UIInterfaceBannerGoToCfg.bannerCfg", bannerCfg);
|
||||
EnviormentConfig = new FightCfg.EnviormentConfig(loader("fightcfg_enviormentconfig"));
|
||||
tables.Add("FightCfg.EnviormentConfig", EnviormentConfig);
|
||||
IconConfig = new UI.IconConfig(loader("ui_iconconfig"));
|
||||
tables.Add("UI.IconConfig", IconConfig);
|
||||
PostInit();
|
||||
|
||||
CharacterAttri.Resolve(tables);
|
||||
|
|
@ -222,6 +225,7 @@ public sealed partial class Tables
|
|||
StoryMainConfig.Resolve(tables);
|
||||
bannerCfg.Resolve(tables);
|
||||
EnviormentConfig.Resolve(tables);
|
||||
IconConfig.Resolve(tables);
|
||||
PostResolve();
|
||||
}
|
||||
|
||||
|
|
@ -276,6 +280,7 @@ public sealed partial class Tables
|
|||
loader("storycfg_storymainconfig");
|
||||
loader("uiinterfacebannergotocfg_bannercfg");
|
||||
loader("fightcfg_enviormentconfig");
|
||||
loader("ui_iconconfig");
|
||||
}
|
||||
|
||||
public static void AfterLoaded(Action<string> loader) {
|
||||
|
|
@ -329,6 +334,7 @@ public sealed partial class Tables
|
|||
loader("storycfg_storymainconfig");
|
||||
loader("uiinterfacebannergotocfg_bannercfg");
|
||||
loader("fightcfg_enviormentconfig");
|
||||
loader("ui_iconconfig");
|
||||
}
|
||||
|
||||
public void TranslateText(System.Func<string, string, string> translator)
|
||||
|
|
@ -383,6 +389,7 @@ public sealed partial class Tables
|
|||
StoryMainConfig.TranslateText(translator);
|
||||
bannerCfg.TranslateText(translator);
|
||||
EnviormentConfig.TranslateText(translator);
|
||||
IconConfig.TranslateText(translator);
|
||||
}
|
||||
|
||||
partial void PostInit();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f16d5834106003940934f79a9fa63c68
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
using Bright.Serialization;
|
||||
using System.Collections.Generic;
|
||||
using SimpleJSON;
|
||||
|
||||
|
||||
|
||||
namespace cfg.UI
|
||||
{
|
||||
|
||||
public sealed partial class DataIcon : Bright.Config.BeanBase
|
||||
{
|
||||
public DataIcon(JSONNode _json)
|
||||
{
|
||||
{ if(!_json["Id"].IsString) { throw new SerializationException(); } Id = _json["Id"]; }
|
||||
{ if(!_json["path"].IsString) { throw new SerializationException(); } Path = _json["path"]; }
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public DataIcon(string Id, string path )
|
||||
{
|
||||
this.Id = Id;
|
||||
this.Path = path;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public static DataIcon DeserializeDataIcon(JSONNode _json)
|
||||
{
|
||||
return new UI.DataIcon(_json);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// icon key
|
||||
/// </summary>
|
||||
public string Id { get; private set; }
|
||||
/// <summary>
|
||||
/// icon 路径
|
||||
/// </summary>
|
||||
public string Path { get; private set; }
|
||||
|
||||
public const int __ID__ = 732212605;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void Resolve(Dictionary<string, object> _tables)
|
||||
{
|
||||
PostResolve();
|
||||
}
|
||||
|
||||
public void TranslateText(System.Func<string, string, string> translator)
|
||||
{
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "Id:" + Id + ","
|
||||
+ "Path:" + Path + ","
|
||||
+ "}";
|
||||
}
|
||||
|
||||
partial void PostInit();
|
||||
partial void PostResolve();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ed13baea7876b7e4cb4bf71272ded7e5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
using Bright.Serialization;
|
||||
using System.Collections.Generic;
|
||||
using SimpleJSON;
|
||||
|
||||
|
||||
|
||||
namespace cfg.UI
|
||||
{
|
||||
|
||||
public sealed partial class IconConfig
|
||||
{
|
||||
private readonly Dictionary<string, UI.DataIcon> _dataMap;
|
||||
private readonly List<UI.DataIcon> _dataList;
|
||||
|
||||
public IconConfig(JSONNode _json)
|
||||
{
|
||||
_dataMap = new Dictionary<string, UI.DataIcon>();
|
||||
_dataList = new List<UI.DataIcon>();
|
||||
|
||||
foreach(JSONNode _row in _json.Children)
|
||||
{
|
||||
var _v = UI.DataIcon.DeserializeDataIcon(_row);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.Id, _v);
|
||||
}
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public Dictionary<string, UI.DataIcon> DataMap => _dataMap;
|
||||
public List<UI.DataIcon> DataList => _dataList;
|
||||
|
||||
public UI.DataIcon GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public UI.DataIcon Get(string key) {
|
||||
if (_dataMap.TryGetValue(key, out var v)) {
|
||||
return v;
|
||||
} else {
|
||||
UnityEngine.Debug.LogError($"table IconConfig key not found: {key}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public UI.DataIcon this[string key] => _dataMap[key];
|
||||
|
||||
public void Resolve(Dictionary<string, object> _tables)
|
||||
{
|
||||
foreach(var v in _dataList)
|
||||
{
|
||||
v.Resolve(_tables);
|
||||
}
|
||||
PostResolve();
|
||||
}
|
||||
|
||||
public void TranslateText(System.Func<string, string, string> translator)
|
||||
{
|
||||
foreach(var v in _dataList)
|
||||
{
|
||||
v.TranslateText(translator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
partial void PostInit();
|
||||
partial void PostResolve();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 66288809b7835f649b4a63784d7b8174
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
[
|
||||
{
|
||||
"Id": "Icon_Weather_Sunny",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Sun.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Weather_SandStorm",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Sun.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Weather_Rain",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Sun.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Weather_Snow",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Sun.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Weather_Fog",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Sun.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Daynight_Day",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Moon.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Daynight_Night",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Moon.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Environment_Plain",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Mountain.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Environment_Mountain",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Mountain.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Environment_Grassland",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Mountain.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Environment_Forest",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Mountain.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Environment_Snow",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Mountain.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Environment_MuddyLand",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Mountain.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Environment_Gobi",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Mountain.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Environment_Desert",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Mountain.png"
|
||||
},
|
||||
{
|
||||
"Id": "Icon_Environment_Plateau",
|
||||
"path": "Assets/Art/UI/Texture/UI_Pic_Team/UI_Team_ChooseLevel/UI_Mountain.png"
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bb953d513790a494bb4364e5bee1162a
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in New Issue