【鸿蒙阵初版】
parent
997ed5d9ff
commit
861b02f0c8
|
@ -72,7 +72,7 @@ RectTransform:
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
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: 1, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
@ -263,7 +263,7 @@ RectTransform:
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
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: 1, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
@ -5107,6 +5107,80 @@ MonoBehaviour:
|
||||||
m_FillClockwise: 1
|
m_FillClockwise: 1
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
|
--- !u!1 &3949195491428574319
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1512239318317732478}
|
||||||
|
- component: {fileID: 1431152599248779388}
|
||||||
|
- component: {fileID: 3024333516790912748}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: GonghMingImage
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1512239318317732478
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3949195491428574319}
|
||||||
|
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: 7018165708038573099}
|
||||||
|
m_RootOrder: 0
|
||||||
|
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.00004339218, y: 0}
|
||||||
|
m_SizeDelta: {x: 150, y: 150}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &1431152599248779388
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3949195491428574319}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &3024333516790912748
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3949195491428574319}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0, g: 0, b: 0, a: 0.78431374}
|
||||||
|
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_Sprite: {fileID: 0}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
--- !u!1 &4018097525179881153
|
--- !u!1 &4018097525179881153
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -6418,7 +6492,7 @@ RectTransform:
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
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: 1, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
@ -7598,6 +7672,115 @@ MonoBehaviour:
|
||||||
m_FillClockwise: 1
|
m_FillClockwise: 1
|
||||||
m_FillOrigin: 0
|
m_FillOrigin: 0
|
||||||
m_UseSpriteMesh: 0
|
m_UseSpriteMesh: 0
|
||||||
|
--- !u!1 &5183623504904120362
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7018165708038573099}
|
||||||
|
- component: {fileID: 3048962781257783206}
|
||||||
|
- component: {fileID: 1994351750354935251}
|
||||||
|
- component: {fileID: 2293607541947535187}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: GongMingMask
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &7018165708038573099
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5183623504904120362}
|
||||||
|
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:
|
||||||
|
- {fileID: 1512239318317732478}
|
||||||
|
m_Father: {fileID: 5211199677466938847}
|
||||||
|
m_RootOrder: 12
|
||||||
|
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: 20.099945}
|
||||||
|
m_SizeDelta: {x: 150, y: 150}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &3048962781257783206
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5183623504904120362}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &1994351750354935251
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5183623504904120362}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Navigation:
|
||||||
|
m_Mode: 3
|
||||||
|
m_SelectOnUp: {fileID: 0}
|
||||||
|
m_SelectOnDown: {fileID: 0}
|
||||||
|
m_SelectOnLeft: {fileID: 0}
|
||||||
|
m_SelectOnRight: {fileID: 0}
|
||||||
|
m_Transition: 1
|
||||||
|
m_Colors:
|
||||||
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
|
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||||
|
m_ColorMultiplier: 1
|
||||||
|
m_FadeDuration: 0.1
|
||||||
|
m_SpriteState:
|
||||||
|
m_HighlightedSprite: {fileID: 0}
|
||||||
|
m_PressedSprite: {fileID: 0}
|
||||||
|
m_DisabledSprite: {fileID: 0}
|
||||||
|
m_AnimationTriggers:
|
||||||
|
m_NormalTrigger: Normal
|
||||||
|
m_HighlightedTrigger: Highlighted
|
||||||
|
m_PressedTrigger: Pressed
|
||||||
|
m_DisabledTrigger: Disabled
|
||||||
|
m_Interactable: 1
|
||||||
|
m_TargetGraphic: {fileID: 2293607541947535187}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||||
|
Culture=neutral, PublicKeyToken=null
|
||||||
|
--- !u!114 &2293607541947535187
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5183623504904120362}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: e459a084d8e15a240b58db751097122b, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, 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
|
||||||
--- !u!1 &5383076292083543031
|
--- !u!1 &5383076292083543031
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -8002,7 +8185,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &5709844313583256937
|
--- !u!224 &5709844313583256937
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -8057,7 +8240,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1508773176926603313
|
--- !u!224 &1508773176926603313
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -8758,6 +8941,7 @@ RectTransform:
|
||||||
- {fileID: 9120872265090628817}
|
- {fileID: 9120872265090628817}
|
||||||
- {fileID: 3472507072693147027}
|
- {fileID: 3472507072693147027}
|
||||||
- {fileID: 320999063321282817}
|
- {fileID: 320999063321282817}
|
||||||
|
- {fileID: 7018165708038573099}
|
||||||
m_Father: {fileID: 5015499777800791733}
|
m_Father: {fileID: 5015499777800791733}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
@ -12517,10 +12701,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 5004630571723986136}
|
m_Father: {fileID: 5004630571723986136}
|
||||||
m_RootOrder: 3
|
m_RootOrder: 3
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 608, y: -50}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 88, y: 88}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7583128553425786306
|
--- !u!222 &7583128553425786306
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -12772,10 +12956,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 5004630571723986136}
|
m_Father: {fileID: 5004630571723986136}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 104, y: -50}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 88, y: 88}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7583128553461871492
|
--- !u!222 &7583128553461871492
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -13519,10 +13703,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 5004630571723986136}
|
m_Father: {fileID: 5004630571723986136}
|
||||||
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, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 440, y: -50}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 88, y: 88}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7583128555069003081
|
--- !u!222 &7583128555069003081
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -13675,10 +13859,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 5004630571723986136}
|
m_Father: {fileID: 5004630571723986136}
|
||||||
m_RootOrder: 4
|
m_RootOrder: 4
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 776, y: -50}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 88, y: 88}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7583128555296664243
|
--- !u!222 &7583128555296664243
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -13793,10 +13977,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 5004630571723986136}
|
m_Father: {fileID: 5004630571723986136}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 272, y: -50}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 88, y: 88}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7583128555409597101
|
--- !u!222 &7583128555409597101
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -14178,7 +14362,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &5008217291552125824
|
--- !u!224 &5008217291552125824
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -15709,10 +15893,10 @@ RectTransform:
|
||||||
m_Father: {fileID: 235641477404672219}
|
m_Father: {fileID: 235641477404672219}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 281.05, y: -63.65}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 190, y: 58}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &8901378376184270863
|
--- !u!222 &8901378376184270863
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
|
|
@ -528,6 +528,7 @@ UpViewRechargeType = {
|
||||||
QuLingBi = 1205,--驱灵币
|
QuLingBi = 1205,--驱灵币
|
||||||
YHMF= 21,--妖魂魔符
|
YHMF= 21,--妖魂魔符
|
||||||
DingKunShenChu = 1004,-- 定卦神锄
|
DingKunShenChu = 1004,-- 定卦神锄
|
||||||
|
XuanHuangZhiQi = 999,--玄黄之气
|
||||||
}
|
}
|
||||||
|
|
||||||
SHOP_PAGE = {
|
SHOP_PAGE = {
|
||||||
|
@ -1492,6 +1493,7 @@ HELP_TYPE = {
|
||||||
PokemonResolve=75,--灵兽放生
|
PokemonResolve=75,--灵兽放生
|
||||||
YiJingBaoKu=77,--易经宝库
|
YiJingBaoKu=77,--易经宝库
|
||||||
LingShouBaoGe=78,--灵兽宝阁
|
LingShouBaoGe=78,--灵兽宝阁
|
||||||
|
HongMengZhen = 80,--鸿蒙阵
|
||||||
}
|
}
|
||||||
|
|
||||||
NumToComplexFont = {
|
NumToComplexFont = {
|
||||||
|
@ -2200,4 +2202,12 @@ Pokemon_Formation_RefreshType={
|
||||||
UpZhen = 1,--上阵
|
UpZhen = 1,--上阵
|
||||||
DownZhen = 2,--下阵
|
DownZhen = 2,--下阵
|
||||||
Replace = 3,--替换
|
Replace = 3,--替换
|
||||||
|
}
|
||||||
|
--通用弹窗类型
|
||||||
|
HarmonyAddType={
|
||||||
|
AddLv = 1,--等级加成
|
||||||
|
AddEquip = 2,--装备加成
|
||||||
|
HunSoulPrint = 3,--魂宝
|
||||||
|
LingSoulPrint = 4,--灵宝
|
||||||
|
FaBao = 5,--法宝
|
||||||
}
|
}
|
|
@ -24,6 +24,8 @@ local ManagerNames = {
|
||||||
--战斗数据管理
|
--战斗数据管理
|
||||||
"Battle/BattleManager",
|
"Battle/BattleManager",
|
||||||
"Battle/BattleRecordManager",
|
"Battle/BattleRecordManager",
|
||||||
|
--鸿蒙阵
|
||||||
|
"Harmony/Manager/HarmonyManager",
|
||||||
--英雄数据管理
|
--英雄数据管理
|
||||||
"Hero/HeroManager",
|
"Hero/HeroManager",
|
||||||
--背包数据管理
|
--背包数据管理
|
||||||
|
@ -177,8 +179,6 @@ local ManagerNames = {
|
||||||
--主题活动管理器
|
--主题活动管理器
|
||||||
"DynamicActivity/DynamicActivityManager",
|
"DynamicActivity/DynamicActivityManager",
|
||||||
"Hero/HeroSkinManager",
|
"Hero/HeroSkinManager",
|
||||||
--鸿蒙阵
|
|
||||||
"Harmony/Manager/HarmonyManager",
|
|
||||||
--!!!!红点管理(尽量放在最后)!!!!--
|
--!!!!红点管理(尽量放在最后)!!!!--
|
||||||
"Player/RedpotManager",
|
"Player/RedpotManager",
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,9 @@ ConfigName = {
|
||||||
BlessingConfigNew = "BlessingConfigNew",
|
BlessingConfigNew = "BlessingConfigNew",
|
||||||
BlessingRewardPoolNew = "BlessingRewardPoolNew",
|
BlessingRewardPoolNew = "BlessingRewardPoolNew",
|
||||||
SpiritAnimalSummon = "SpiritAnimalSummon",
|
SpiritAnimalSummon = "SpiritAnimalSummon",
|
||||||
Hongmeng="Hongmeng"
|
Hongmeng = "Hongmeng",
|
||||||
|
HongmengUp = "HongmengUp",
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require "Framework/GameDataBase"
|
require "Framework/GameDataBase"
|
||||||
|
|
|
@ -360,7 +360,12 @@ UIName = {
|
||||||
RoleAwakeTalentPopup = 360,--通用大弹窗界面
|
RoleAwakeTalentPopup = 360,--通用大弹窗界面
|
||||||
RoleAwakeSuccessPanel = 361,--通用大弹窗界面
|
RoleAwakeSuccessPanel = 361,--通用大弹窗界面
|
||||||
HongMengPanel = 365,--鸿蒙阵
|
HongMengPanel = 365,--鸿蒙阵
|
||||||
HongMengChooseHeroPanel = 366--鸿蒙阵选人界面
|
HongMengChooseHeroPanel = 366,--鸿蒙阵选人界面
|
||||||
|
HongMengUnLoadPanel = 367, --鸿蒙阵 卸载弹窗
|
||||||
|
GongMingResultTips = 368,-- 鸿蒙阵 共鸣弹窗
|
||||||
|
GongMingResultPanel = 369, --鸿蒙阵 共鸣结果弹窗
|
||||||
|
HongMengEnvoyPanel = 370, --鸿蒙碑
|
||||||
|
HongMengEnvoyUnloadPanel = 371 -- 鸿蒙碑卸载弹窗
|
||||||
}
|
}
|
||||||
|
|
||||||
SubUIConfig = {
|
SubUIConfig = {
|
||||||
|
|
|
@ -152,11 +152,10 @@ end
|
||||||
--获取单个英雄装备数据
|
--获取单个英雄装备数据
|
||||||
function this.GetSingleHeroSingleEquipData(_equipid, _heroDid)
|
function this.GetSingleHeroSingleEquipData(_equipid, _heroDid)
|
||||||
_equipid = tonumber(_equipid)
|
_equipid = tonumber(_equipid)
|
||||||
if
|
if this.equipDatas[_equipid] and this.equipDatas[_equipid].upHeroDidList and this.equipDatas[_equipid].upHeroDidList[_heroDid] then
|
||||||
this.equipDatas[_equipid] and this.equipDatas[_equipid].upHeroDidList and
|
|
||||||
this.equipDatas[_equipid].upHeroDidList[_heroDid]
|
|
||||||
then
|
|
||||||
return this.equipDatas[_equipid]
|
return this.equipDatas[_equipid]
|
||||||
|
elseif HarmonyManager.GetSingleAdditions(HarmonyAddType.AddEquip) > 0 and HarmonyManager.IsInfo(_heroDid) then
|
||||||
|
return HarmonyManager.equipDatas[_equipid]--.upHeroDidList[_heroDid]
|
||||||
else
|
else
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,46 +14,107 @@ HarmonyPanel.prefab={}
|
||||||
function HarmonyPanel:InitComponent()
|
function HarmonyPanel:InitComponent()
|
||||||
|
|
||||||
self.btnBack = Util.GetGameObject(self.gameObject, "Back/BackBtn")
|
self.btnBack = Util.GetGameObject(self.gameObject, "Back/BackBtn")
|
||||||
|
self.helpBtn = Util.GetGameObject(self.gameObject,"HelpBtn")
|
||||||
self.panel=Util.GetGameObject(self.gameObject,"Panel")
|
self.AddBtn = Util.GetGameObject(self.gameObject,"Panel/HarmonyPanel/AddBtn")
|
||||||
|
self.GongMingBtn = Util.GetGameObject(self.gameObject,"Panel/HarmonyPanel/KnowGongMing")
|
||||||
|
self.helpPosition = self.helpBtn:GetComponent("RectTransform").localPosition
|
||||||
|
self.panel = Util.GetGameObject(self.gameObject,"Panel")
|
||||||
|
|
||||||
|
self.NumText = Util.GetGameObject(self.panel,"HarmonyPanel/itemNumText"):GetComponent("Text")
|
||||||
|
self.parent = Util.GetGameObject(self.gameObject,"MiddleView")
|
||||||
|
--初始化格子中的数据
|
||||||
|
HarmonyManager:InitGongMingDataList()
|
||||||
|
|
||||||
for i = 1, #self.contents do
|
for i = 1, #self.contents do
|
||||||
self.prefab[i]=Util.GetGameObject(self.panel,self.contents[i].panelName);
|
self.prefab[i]=Util.GetGameObject(self.panel,self.contents[i].panelName);
|
||||||
|
self.contents[i].view:InitComponent(self.panel, BagManager.GetTotalItemNum(UpViewRechargeType.Gold),BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal),1)
|
||||||
self.contents[i].view:InitComponent(self.panel)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft })
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function HarmonyPanel:InitTextMum()
|
||||||
|
local HeroCount = 0
|
||||||
|
local Box = #HarmonyManager.hongmengHeroInfos;
|
||||||
|
for i = 1, #HarmonyManager.hongmengHeroInfos do
|
||||||
|
-- body
|
||||||
|
if HarmonyManager.hongmengHeroInfos[i].heroId ~="" then
|
||||||
|
HeroCount = HeroCount + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
self.NumText.text = string.format("%d/%d",HeroCount,Box)
|
||||||
|
end
|
||||||
--绑定事件(用于子类重写)
|
--绑定事件(用于子类重写)
|
||||||
function HarmonyPanel:BindEvent()
|
function HarmonyPanel:BindEvent()
|
||||||
Util.AddClick(self.btnBack, function()
|
Util.AddClick(self.btnBack, function()
|
||||||
self:ClosePanel()
|
self:ClosePanel()
|
||||||
end)
|
end)
|
||||||
|
Util.AddClick(self.helpBtn,function()
|
||||||
|
|
||||||
|
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.HongMengZhen,self.helpPosition.x,self.helpPosition.y)
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
Util.AddClick(self.AddBtn,function()
|
||||||
|
--二级弹窗界面
|
||||||
|
|
||||||
|
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OpenBoxTips)
|
||||||
|
end)
|
||||||
|
--共鸣按钮
|
||||||
|
Util.AddClick(self.GongMingBtn,function()
|
||||||
|
--二级共鸣弹窗
|
||||||
|
UIManager.OpenPanel(UIName.GongMingResultTips)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function HarmonyPanel:ReFeshTextFun(data)
|
||||||
|
local HeroCount = 0
|
||||||
|
local Box = 0
|
||||||
|
|
||||||
|
-- body
|
||||||
|
HeroCount = data[1]
|
||||||
|
Box = data[2]
|
||||||
|
|
||||||
|
self.NumText.text = string.format("%d/%d",HeroCount,Box)
|
||||||
|
|
||||||
|
end
|
||||||
--添加事件监听(用于子类重写)
|
--添加事件监听(用于子类重写)
|
||||||
function HarmonyPanel:AddListener()
|
function HarmonyPanel:AddListener()
|
||||||
for i = 1, #self.contents do
|
for i = 1, #self.contents do
|
||||||
|
|
||||||
self.contents[i].view:AddListener()
|
self.contents[i].view:AddListener()
|
||||||
end
|
end
|
||||||
|
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.OnlyRefeshText,self.ReFeshTextFun,self)
|
||||||
end
|
end
|
||||||
|
|
||||||
--移除事件监听(用于子类重写)
|
--移除事件监听(用于子类重写)
|
||||||
function HarmonyPanel:RemoveListener()
|
function HarmonyPanel:RemoveListener()
|
||||||
for i = 1, #self.contents do
|
for i = 1, #self.contents do
|
||||||
|
|
||||||
self.contents[i].view:RemoveListener()
|
self.contents[i].view:RemoveListener()
|
||||||
end
|
end
|
||||||
|
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.OnlyRefeshText,self.ReFeshTextFun,self)
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function HarmonyPanel:OnOpen(equipSId)
|
function HarmonyPanel:OnOpen()
|
||||||
|
NetManager.PlayerInfoRequest(LoadingPanel.OnStep)
|
||||||
|
|
||||||
|
--格子
|
||||||
|
|
||||||
|
for i = 1, #self.contents do
|
||||||
|
self.contents[i].view:OnOpen()
|
||||||
|
end
|
||||||
|
--金币
|
||||||
|
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft })
|
||||||
|
|
||||||
|
--鸿蒙守卫
|
||||||
|
self.HarmonyView = SubUIManager.Open(SubUIConfig.HarmonyView,self.parent.transform)
|
||||||
|
--对选人列表的刷新
|
||||||
|
HarmonyManager:SetInitList()
|
||||||
|
|
||||||
|
self:InitTextMum()
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||||
|
@ -63,7 +124,9 @@ end
|
||||||
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function HarmonyPanel:OnClose()
|
function HarmonyPanel:OnClose()
|
||||||
|
for i = 1, #self.contents do
|
||||||
|
self.contents[i].view:OnClose()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面销毁时调用(用于子类重写)
|
--界面销毁时调用(用于子类重写)
|
||||||
|
|
|
@ -1,38 +1,441 @@
|
||||||
HarmonyManager = {}
|
HarmonyManager = {}
|
||||||
local this = HarmonyManager
|
local this = HarmonyManager
|
||||||
|
--
|
||||||
--鸿蒙阵数据
|
-- 第一阶段 鸿蒙阵数据
|
||||||
this.hongmengGuards = {}
|
this.hongmengGuards = {}
|
||||||
this.hongmengHeroInfos = {}
|
this.hongmengHeroInfos = {}
|
||||||
this.hongmengTablet = 0
|
this.hongmengTablet = 0
|
||||||
this.hongmengAdditions = {}
|
this.hongmengAdditions = {}
|
||||||
|
|
||||||
|
this.GuardList = {}
|
||||||
|
local SelectId = nil
|
||||||
|
|
||||||
|
HarmonyManager.GongMingBox = 0;
|
||||||
|
HarmonyManager.UnLoadGongMing = 0
|
||||||
|
--判断是否鸿蒙共享数据
|
||||||
|
local equipConfig = ConfigManager.GetConfig(ConfigName.EquipConfig)
|
||||||
|
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||||
|
|
||||||
|
HarmonyManager.equipCount = 0
|
||||||
|
this.hongmengGongMingList = {}
|
||||||
|
this.ChooseDataList = {}
|
||||||
|
|
||||||
|
-- 第二阶段 鸿蒙塔 数据
|
||||||
|
HarmonyManager.EnvoyList = {} --330 鸿蒙使者 数据
|
||||||
|
|
||||||
|
|
||||||
|
-- 鸿蒙塔升级数据表
|
||||||
|
local HongmengUp = ConfigManager.GetConfig(ConfigName.HongmengUp)
|
||||||
|
|
||||||
function this:InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet, hongmengAdditions)
|
function this:InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet, hongmengAdditions)
|
||||||
-- body
|
-- body
|
||||||
this.hongmengGuards = hongmengGuards
|
this.hongmengGuards = hongmengGuards
|
||||||
|
--LogGreen(#this.hongmengGuards)
|
||||||
this.hongmengHeroInfos = hongmengHeroInfos
|
this.hongmengHeroInfos = hongmengHeroInfos
|
||||||
|
--LogGreen(#this.hongmengHeroInfos)
|
||||||
|
|
||||||
|
--LogBlue("hongmengTablet "..hongmengTablet)
|
||||||
|
for i = 1, #this.hongmengHeroInfos do
|
||||||
|
this.hongmengHeroInfos[i].time = this.hongmengHeroInfos[i].time + GetTimeStamp()
|
||||||
|
end
|
||||||
this.hongmengTablet = hongmengTablet
|
this.hongmengTablet = hongmengTablet
|
||||||
this.hongmengAdditions = hongmengAdditions
|
this.hongmengAdditions = hongmengAdditions
|
||||||
|
for i = 1, #this.hongmengAdditions do
|
||||||
|
if this.hongmengAdditions[i].additionType == HarmonyAddType.AddEquip then
|
||||||
|
if this.hongmengAdditions[i].value ~= -1 then
|
||||||
|
local curEquipIdList = {}
|
||||||
|
local curEquipConfigs = ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipConfig,"Star",this.hongmengAdditions[i].value)
|
||||||
|
for i = 1, #curEquipConfigs do
|
||||||
|
|
||||||
|
table.insert(curEquipIdList,curEquipConfigs[i].Id)
|
||||||
|
end
|
||||||
|
this.HarmonyUpdateEquipData(curEquipIdList, "")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- print(GameDataBase.SheetBase.GetKeys(this.hongmengGuards)," ~~~~44444444")
|
|
||||||
-- -- print(this.hongmengHeroInfos)
|
|
||||||
-- for key, value in ConfigPairs(this.hongmengHeroInfos) do
|
|
||||||
-- LogGreen(key," ",value)
|
|
||||||
-- end
|
|
||||||
-- print(this.hongmengTablet)
|
|
||||||
-- for key, value in ConfigPairs(this.hongmengAdditions) do
|
|
||||||
-- -- body
|
|
||||||
-- LogGreen(key," ",value)
|
|
||||||
-- end
|
|
||||||
--print(this.hongmengAdditions)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--初始化共鸣列表数据
|
||||||
|
function this:InitGongMingDataList()
|
||||||
|
for i = 1, #this.hongmengHeroInfos do
|
||||||
|
local data = HeroManager.GetSingleHeroData(this.hongmengHeroInfos[i].heroId)
|
||||||
|
|
||||||
|
if data then
|
||||||
|
|
||||||
|
this.hongmengGongMingList[i] = data
|
||||||
|
|
||||||
|
else
|
||||||
|
this.hongmengGongMingList[i] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
--鸿蒙塔上限
|
||||||
|
function this:HongMengTowerUpLimit()
|
||||||
|
local list = HeroManager.GetAllHeroDatas(330)
|
||||||
|
local temp_list = {}
|
||||||
|
for i = 1, #list do
|
||||||
|
-- body
|
||||||
|
table.insert(temp_list,list[i])
|
||||||
|
end
|
||||||
|
|
||||||
|
for k1, v1 in ipairs(list) do
|
||||||
|
for k2, v2 in ipairs(temp_list) do
|
||||||
|
--同种英雄同一星级的移除
|
||||||
|
if v1.dynamicId ~= v2.dynamicId and v1.value == v2.value and v1.name == v2.name then
|
||||||
|
table.remove(list, k1)
|
||||||
|
table.remove(temp_list, k1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return #temp_list
|
||||||
|
end
|
||||||
|
|
||||||
function this:SendHarmonyManagerMsg()
|
function this.IsInfo(did)
|
||||||
NetManager.HongMengRequset(0,function(msg)
|
if did ~= "" then
|
||||||
--
|
for i = 1, #this.hongmengHeroInfos do
|
||||||
|
if did == this.hongmengHeroInfos[i].heroId and this.hongmengHeroInfos[i].heroId ~= "" then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
function this.IsChangeColor(did)
|
||||||
|
for i = 1, #this.hongmengHeroInfos do
|
||||||
|
if did == this.hongmengHeroInfos[i].heroId then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:IsGongMing(did)
|
||||||
|
for i = 1, #this.hongmengHeroInfos do
|
||||||
|
-- body
|
||||||
|
if did == this.hongmengHeroInfos[i].heroId then
|
||||||
|
PopupTipPanel.ShowTip("共鸣ing")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- body
|
||||||
|
end
|
||||||
|
function this:SetInitList()
|
||||||
|
local heroDataList = HeroManager.GetAllHeroDatas(1)
|
||||||
|
local list = {}
|
||||||
|
local count = 0;
|
||||||
|
--LogBlue("this.GuardList长度:"..LengthOfTable(this.GuardList))
|
||||||
|
for key, value in pairs(this.GuardList) do
|
||||||
|
table.insert(list,value)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for i = 1, #this.hongmengHeroInfos do
|
||||||
|
if this.hongmengHeroInfos[i].heroId ~= "" then
|
||||||
|
-- LogYellow("是否有数据:"..i)
|
||||||
|
local data = HeroManager.GetSingleHeroData(this.hongmengHeroInfos[i].heroId)
|
||||||
|
table.insert(list,data)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
table.sort(list,function(a,b)
|
||||||
|
return a.dynamicId < b.dynamicId
|
||||||
end)
|
end)
|
||||||
|
--LogBlue("#list长度:"..#list)
|
||||||
|
local newList = {}
|
||||||
|
local index = 0
|
||||||
|
local flag = true
|
||||||
|
|
||||||
|
local tempTable = {}
|
||||||
|
for i = 1, #heroDataList do
|
||||||
|
table.insert(tempTable,heroDataList[i])
|
||||||
|
end
|
||||||
|
|
||||||
|
for i = #heroDataList, 1,-1 do
|
||||||
|
for k2, v2 in pairs(list) do
|
||||||
|
if v2.dynamicId == heroDataList[i].dynamicId then
|
||||||
|
--LogPink("第几个:"..i.." k2"..k2)
|
||||||
|
table.remove(tempTable,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
this.ChooseDataList = tempTable
|
||||||
|
|
||||||
|
-- LogBlue("#this.ChooseDataList长度:"..#this.ChooseDataList)
|
||||||
|
end
|
||||||
|
--初始化 鸿蒙塔的数据
|
||||||
|
function this:SetTowerInit()
|
||||||
|
|
||||||
|
local heroDataList = HeroManager.GetAllHeroDatas(1)
|
||||||
|
local list = {}
|
||||||
|
local count = 0;
|
||||||
|
this.GuardList = HeroManager.GetAllHeroDatas(330)
|
||||||
|
-- LogBlue("this.GuardList长度:"..LengthOfTable(this.GuardList))
|
||||||
|
for key, value in pairs(this.GuardList) do
|
||||||
|
table.insert(list,value)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--LogBlue("#this.hongmengHeroInfos"..#this.hongmengHeroInfos)
|
||||||
|
for i = 1, #this.hongmengHeroInfos do
|
||||||
|
if this.hongmengHeroInfos[i].heroId ~= "" then
|
||||||
|
--LogYellow("是否有数据:"..i)
|
||||||
|
local data = HeroManager.GetSingleHeroData(this.hongmengHeroInfos[i].heroId)
|
||||||
|
table.insert(list,data)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
table.sort(list,function(a,b)
|
||||||
|
return a.dynamicId < b.dynamicId
|
||||||
|
end)
|
||||||
|
--LogBlue("#list长度:"..#list)
|
||||||
|
local newList = {}
|
||||||
|
local index = 0
|
||||||
|
local flag = true
|
||||||
|
|
||||||
|
local tempTable = {}
|
||||||
|
for i = 1, #heroDataList do
|
||||||
|
table.insert(tempTable,heroDataList[i])
|
||||||
|
end
|
||||||
|
|
||||||
|
for i = #heroDataList, 1,-1 do
|
||||||
|
for k2, v2 in pairs(list) do
|
||||||
|
if v2.dynamicId == heroDataList[i].dynamicId then
|
||||||
|
-- LogPink("第几个:"..i.." k2"..k2)
|
||||||
|
table.remove(tempTable,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
this.ChooseDataList = tempTable
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- function this:IsEnvoy(did)
|
||||||
|
-- -- body
|
||||||
|
-- for i = 1, #this.hongmengGuards do
|
||||||
|
-- -- body
|
||||||
|
-- if did==this.hongmengGuards[i] then
|
||||||
|
-- -- body
|
||||||
|
-- return true
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- end
|
||||||
|
-- return false
|
||||||
|
-- end
|
||||||
|
|
||||||
|
--初始化鸿蒙使者的数据
|
||||||
|
function this:InitEnvoyList()
|
||||||
|
for i = 1, #this.hongmengGuards do
|
||||||
|
-- body
|
||||||
|
local data = HeroManager.GetSingleHeroData(this.hongmengGuards[i])
|
||||||
|
if data then
|
||||||
|
this.EnvoyList[i] = data
|
||||||
|
else
|
||||||
|
this.EnvoyList[i] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
--是否是鸿蒙使者
|
||||||
|
function this:IsEnvoy(did)
|
||||||
|
if this.EnvoyList then
|
||||||
|
-- body
|
||||||
|
for i = 1, #this.EnvoyList do
|
||||||
|
-- body
|
||||||
|
if this.EnvoyList[i] then
|
||||||
|
-- body
|
||||||
|
if this.EnvoyList[i].dynamicId == did then
|
||||||
|
-- body
|
||||||
|
-- print(did)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
-- 设置、获取鸿蒙守卫的列表
|
||||||
|
function this:SetGuardList(list,count)
|
||||||
|
for key, value in pairs(list) do
|
||||||
|
if key<=count then
|
||||||
|
-- body
|
||||||
|
this.GuardList[value.dynamicId] = value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
function this:GetGuardList()
|
||||||
|
return this.GuardList
|
||||||
|
-- body
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:SetGongMingList(Id)
|
||||||
|
local data = HeroManager.GetSingleHeroData(Id)
|
||||||
|
table.insert(this.hongmengGongMingList,data)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:RemoveGongMingList(Id)
|
||||||
|
local data = HeroManager.GetSingleHeroData(Id)
|
||||||
|
for key, value in pairs(this.hongmengGongMingList) do
|
||||||
|
if value then
|
||||||
|
-- body
|
||||||
|
if value==data then
|
||||||
|
-- body
|
||||||
|
value = nil
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:GetGongMingListSingle(Id)
|
||||||
|
local data = HeroManager.GetSingleHeroData(Id)
|
||||||
|
--return data
|
||||||
|
--print(data.dynamicId,"~~~",Id)
|
||||||
|
for key, value in pairs(this.hongmengGongMingList) do
|
||||||
|
|
||||||
|
if value.dynamicId==data.dynamicId then
|
||||||
|
|
||||||
|
return value
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
function this:SetChooseId(id)
|
||||||
|
SelectId = id
|
||||||
|
end
|
||||||
|
-- 设置、获取卸载的数据
|
||||||
|
function this:SetMingListIndexData(index)
|
||||||
|
SelectId = HeroManager.GetSingleHeroData(this.hongmengHeroInfos[index].heroId).dynamicId
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function this:GetUnLoadData()
|
||||||
|
-- body
|
||||||
|
return SelectId
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--获取加成
|
||||||
|
function this:GetAdditions()
|
||||||
|
|
||||||
|
return this.hongmengAdditions
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.GetSingleAdditions(type)
|
||||||
|
for i = 1, #this.hongmengAdditions do
|
||||||
|
if this.hongmengAdditions[i].additionType == type then
|
||||||
|
return this.hongmengAdditions[i].value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:GetHongMengUpData()
|
||||||
|
|
||||||
|
for key, value in ConfigPairs(HongmengUp) do
|
||||||
|
-- body
|
||||||
|
if value.HongmengLevel == this.hongmengTablet+1 then
|
||||||
|
-- body
|
||||||
|
return ConfigManager.TryGetConfigData(ConfigName.HongmengUp,key)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
--鸿蒙共享装备临时数据
|
||||||
|
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||||
|
local equipStarsConfig = ConfigManager.GetConfig(ConfigName.EquipStarsConfig)
|
||||||
|
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
||||||
|
function this.InitUpdateEquipData(id, upHeroDid)
|
||||||
|
if not this.equipDatas then
|
||||||
|
this.equipDatas = {}
|
||||||
|
end
|
||||||
|
id = tonumber(id)
|
||||||
|
if this.equipDatas[id] then
|
||||||
|
if not this.equipDatas[id].upHeroDidList then
|
||||||
|
this.equipDatas[id].upHeroDidList = {}
|
||||||
|
end
|
||||||
|
if upHeroDid and upHeroDid ~= "0" then
|
||||||
|
this.equipDatas[id].upHeroDidList[upHeroDid] = upHeroDid
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local equipdata = {}
|
||||||
|
equipdata.equipConfig = equipConfig[id]
|
||||||
|
equipdata.itemConfig = itemConfig[id]
|
||||||
|
equipdata.id = id
|
||||||
|
if itemConfig[equipdata.id] then
|
||||||
|
equipdata.icon = GetResourcePath(itemConfig[equipdata.id].ResourceID)
|
||||||
|
else
|
||||||
|
Log(Language[10483] .. equipdata.id)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
equipdata.frame = GetQuantityImageByquality(equipdata.equipConfig.Quality)
|
||||||
|
equipdata.quality = equipdata.equipConfig.Quality
|
||||||
|
equipdata.position = equipdata.equipConfig.Position
|
||||||
|
|
||||||
|
equipdata.mainAttribute = this.GetMainProList(equipdata.equipConfig)
|
||||||
|
|
||||||
|
equipdata.backData = equipdata
|
||||||
|
equipdata.star = equipStarsConfig[equipdata.equipConfig.Star].Stars
|
||||||
|
this.equipDatas[id] = equipdata
|
||||||
|
if not this.equipDatas[id].upHeroDidList then
|
||||||
|
this.equipDatas[id].upHeroDidList = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
if upHeroDid and upHeroDid ~= "0" and not this.equipDatas[id].upHeroDidList[upHeroDid] then
|
||||||
|
this.equipDatas[id].upHeroDidList[upHeroDid] = upHeroDid
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.HarmonyUpdateEquipData(idlist, heroDid)
|
||||||
|
for i = 1, #idlist do
|
||||||
|
this.InitUpdateEquipData(idlist[i], heroDid, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
--判断神将的装备是否共鸣
|
||||||
|
function this:IsShowGongMingEqiup(id)
|
||||||
|
for i = 1, #this.hongmengHeroInfos do
|
||||||
|
-- body
|
||||||
|
if id == this.hongmengHeroInfos[i].heroId then
|
||||||
|
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.GetMainProList(equipConfig)
|
||||||
|
local propList = {}
|
||||||
|
for index, prop in ipairs(equipConfig.Property) do
|
||||||
|
propList[index] = {}
|
||||||
|
propList[index].propertyId = prop[1]
|
||||||
|
propList[index].propertyValue = prop[2]
|
||||||
|
propList[index].PropertyConfig = propertyConfig[prop[1]]
|
||||||
|
end
|
||||||
|
return propList
|
||||||
|
end
|
||||||
return HarmonyManager
|
return HarmonyManager
|
|
@ -1,10 +1,58 @@
|
||||||
local this={}
|
local this={}
|
||||||
|
|
||||||
this.tab=ConfigManager.GetConfig(ConfigName.Hongmeng)
|
this.tab=ConfigManager.GetConfig(ConfigName.Hongmeng)
|
||||||
local Box=0;
|
|
||||||
local OpenBox=2
|
|
||||||
function this:InitComponent(gameObject)
|
|
||||||
|
local Gold =0;
|
||||||
|
local DemonCrystal = 0
|
||||||
|
local HeroList = {}
|
||||||
|
|
||||||
|
local tempData = nil
|
||||||
|
local TempItem = nil
|
||||||
|
|
||||||
|
local ItemList = {}
|
||||||
|
local Box = 0
|
||||||
|
local OpenBox = 0
|
||||||
|
local HeroCount = 0
|
||||||
|
|
||||||
|
function this:AwakeLength()
|
||||||
|
Box = #HarmonyManager.hongmengHeroInfos;
|
||||||
|
OpenBox = #HarmonyManager.hongmengHeroInfos+2
|
||||||
|
for i = 1, #HarmonyManager.hongmengHeroInfos do
|
||||||
|
-- body
|
||||||
|
if HarmonyManager.hongmengHeroInfos[i].heroId~="" then
|
||||||
|
-- body
|
||||||
|
HeroCount = HeroCount + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if self.stage == 1 then
|
||||||
|
-- body
|
||||||
|
this.NumText.text = string.format("%d/%d",HeroCount,Box)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
local count = 0
|
||||||
|
for i = 1, #HarmonyManager.EnvoyList do
|
||||||
|
-- body
|
||||||
|
if HarmonyManager.EnvoyList[i] then
|
||||||
|
count = count + 1
|
||||||
|
-- body
|
||||||
|
end
|
||||||
|
end
|
||||||
|
print("发送信息",HeroCount + count," ",Box + #HarmonyManager.EnvoyList)
|
||||||
|
this.NumText.text = string.format("%d/%d",HeroCount + count,Box + #HarmonyManager.EnvoyList)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
function this:InitComponent(gameObject,Golds,DemonCrystals,stage)
|
||||||
|
Gold = Golds
|
||||||
|
DemonCrystal = DemonCrystals
|
||||||
|
self.stage = stage
|
||||||
|
|
||||||
-- item预制件
|
-- item预制件
|
||||||
|
|
||||||
this.item = Util.GetGameObject(gameObject , "HarmonyPanel/item")
|
this.item = Util.GetGameObject(gameObject , "HarmonyPanel/item")
|
||||||
|
@ -12,11 +60,11 @@ function this:InitComponent(gameObject)
|
||||||
--btn组件
|
--btn组件
|
||||||
this.addBtn = Util.GetGameObject(gameObject,"HarmonyPanel/AddBtn")
|
this.addBtn = Util.GetGameObject(gameObject,"HarmonyPanel/AddBtn")
|
||||||
this.GongMingMsgBtn = Util.GetGameObject(gameObject,"HarmonyPanel/KnowGongMing")
|
this.GongMingMsgBtn = Util.GetGameObject(gameObject,"HarmonyPanel/KnowGongMing")
|
||||||
this.NumText = Util.GetGameObject(gameObject,"HarmonyPanel/itemNumText"):GetComponent("Text")
|
|
||||||
this.scrollbar = Util.GetGameObject(gameObject,"HarmonyPanel/Scrollbar"):GetComponent("Scrollbar")
|
this.scrollbar = Util.GetGameObject(gameObject,"HarmonyPanel/Scrollbar"):GetComponent("Scrollbar")
|
||||||
local scrollParent = Util.GetGameObject(gameObject, "HarmonyPanel/scroll"):GetComponent("RectTransform").rect
|
local scrollParent = Util.GetGameObject(gameObject, "HarmonyPanel/scroll"):GetComponent("RectTransform").rect
|
||||||
|
|
||||||
|
this.NumText = Util.GetGameObject(gameObject,"HarmonyPanel/itemNumText"):GetComponent("Text")
|
||||||
|
|
||||||
this.ScrollView=SubUIManager.Open(SubUIConfig.ScrollCycleView,Util.GetGameObject(gameObject,"HarmonyPanel/scroll").transform,
|
this.ScrollView=SubUIManager.Open(SubUIConfig.ScrollCycleView,Util.GetGameObject(gameObject,"HarmonyPanel/scroll").transform,
|
||||||
this.item,this.scrollbar,Vector2.New(-scrollParent.x*2,-scrollParent.y*2),1,5,Vector2.New(35,15))
|
this.item,this.scrollbar,Vector2.New(-scrollParent.x*2,-scrollParent.y*2),1,5,Vector2.New(35,15))
|
||||||
|
@ -29,118 +77,388 @@ function this:InitComponent(gameObject)
|
||||||
|
|
||||||
|
|
||||||
this.BoxList=0;
|
this.BoxList=0;
|
||||||
|
this:AwakeLength()
|
||||||
this:InitBox()
|
this:InitBox()
|
||||||
|
--this.RunTimerFun()
|
||||||
end
|
end
|
||||||
|
local TextList = {}
|
||||||
|
local BoxList = {}
|
||||||
function this:InitBox()
|
function this:InitBox()
|
||||||
this.NumText.text = string.format("%d/%d",0,this.BoxList)
|
|
||||||
|
--
|
||||||
|
|
||||||
local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度
|
local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度
|
||||||
this.ScrollView:SetData(keys,function (index, go)
|
this.ScrollView:SetData(keys,function (index, go)
|
||||||
local key = keys[index]
|
local key = keys[index]
|
||||||
this.SingleBoxDataShow(go, this.tab[key])
|
this.SingleBoxDataShow(go, this.tab[key], index)
|
||||||
|
ItemList[go] = index
|
||||||
|
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
|
TextList[index] = TimerText
|
||||||
|
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||||
|
BoxList[index] = Empty
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
function this.SingleBoxDataShow(go,boxData)
|
|
||||||
-- body
|
|
||||||
print("1111111111s")
|
|
||||||
local mask = Util.GetGameObject(go.transform,"Box/Empty/lock/mask");
|
|
||||||
local lock=Util.GetGameObject(go.transform,"Box/Empty/lock");
|
|
||||||
|
|
||||||
if mask.activeSelf then
|
function this.RunTimerFun()
|
||||||
if boxData.Id<OpenBox then--拥有格子数
|
|
||||||
mask:SetActive(false)
|
local refreshFunc = function()
|
||||||
if boxData.Id<=Box then
|
|
||||||
-- body
|
|
||||||
|
|
||||||
|
for key, value in pairs(ItemList) do
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if value <= #HarmonyManager.hongmengHeroInfos then
|
||||||
|
TextList[value].text = ""
|
||||||
|
if HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp() > 0 then
|
||||||
|
|
||||||
|
if BoxList[value].activeSelf == false then
|
||||||
|
-- body
|
||||||
|
BoxList[value]:SetActive(true)
|
||||||
|
end
|
||||||
|
local time_content = TimeToFelaxible(HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp())
|
||||||
|
TextList[value].text = string.format("<color=#ffbc22>%s</color>\n<color=#bd922a>后恢复</color>",time_content)
|
||||||
|
else
|
||||||
|
HarmonyManager.hongmengHeroInfos[value].time = 0
|
||||||
|
TextList[value].text = ""
|
||||||
|
end
|
||||||
|
|
||||||
|
-- else
|
||||||
|
-- LogError("error: no time nothing")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
this.timerEffect = Timer.New(refreshFunc, 1, -1, true)
|
||||||
|
this.timerEffect:Start()
|
||||||
|
refreshFunc()
|
||||||
|
end
|
||||||
|
function this.SingleBoxDataShow(go,boxData,index)
|
||||||
|
-- body
|
||||||
|
|
||||||
|
local mask = Util.GetGameObject(go.transform,"Box/Empty/lock/mask");
|
||||||
|
local lock = Util.GetGameObject(go.transform,"Box/Empty/lock");
|
||||||
|
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||||
|
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
|
|
||||||
|
Empty:SetActive(true)
|
||||||
|
mask:SetActive(true)
|
||||||
|
lock:SetActive(true)
|
||||||
|
|
||||||
|
local gridData = HarmonyManager.hongmengHeroInfos[boxData.Id]
|
||||||
|
if gridData then
|
||||||
|
if gridData.gridId <= Box then
|
||||||
|
if gridData.heroId ~= "" then
|
||||||
|
Empty:SetActive(false)
|
||||||
|
local data = HeroManager.GetSingleHeroData(gridData.heroId)
|
||||||
|
if data then
|
||||||
|
this.SingleItemDataShow(go, data)
|
||||||
|
else
|
||||||
|
LogError("error: no hero data")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
|
||||||
|
if gridData.time == 0 then
|
||||||
|
-- body
|
||||||
|
TimerText.text = ""
|
||||||
|
else
|
||||||
|
|
||||||
|
end
|
||||||
|
Empty:SetActive(true)
|
||||||
|
mask:SetActive(false)
|
||||||
lock:SetActive(false)
|
lock:SetActive(false)
|
||||||
end
|
end
|
||||||
Util.AddOnceClick(go,function()
|
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.RereshNumText);
|
|
||||||
-- lock:SetActive(false)
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
mask:SetActive(true)
|
|
||||||
lock:SetActive(true)
|
|
||||||
end
|
end
|
||||||
-- body
|
elseif index == Box + 1 then
|
||||||
else
|
|
||||||
if boxData.Id<OpenBox then--拥有格子数
|
|
||||||
mask:SetActive(false)
|
|
||||||
lock:SetActive(false)
|
|
||||||
else
|
|
||||||
mask:SetActive(true)
|
|
||||||
lock:SetActive(true)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
if boxData.Id<OpenBox then--拥有格子数
|
|
||||||
mask:SetActive(false)
|
mask:SetActive(false)
|
||||||
Util.AddOnceClick(go,function()
|
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.RereshNumText);
|
|
||||||
lock:SetActive(false)
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
mask:SetActive(true)
|
|
||||||
--Box:SetActive(true)
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
function this:BindEvent()
|
|
||||||
-- body
|
|
||||||
|
|
||||||
|
Util.AddOnceClick(go,function()
|
||||||
|
if gridData then
|
||||||
|
-- body
|
||||||
|
if gridData.heroId ~= "" then
|
||||||
|
-- body
|
||||||
|
TempItem = index
|
||||||
|
HarmonyManager:SetMingListIndexData(boxData.Id)
|
||||||
|
HarmonyManager.UnLoadGongMing = boxData.Id--发往服务器
|
||||||
|
UIManager.OpenPanel(UIName.HongMengUnLoadPanel)
|
||||||
|
else
|
||||||
|
if gridData.time == 0 then
|
||||||
|
-- body
|
||||||
|
UIManager.OpenPanel(UIName.HongMengChooseHeroPanel)
|
||||||
|
TempItem = index
|
||||||
|
|
||||||
|
HarmonyManager.GongMingBox = boxData.Id
|
||||||
|
print(" 添加等级 ",HarmonyManager.GongMingBox)
|
||||||
|
else
|
||||||
|
local content = ""
|
||||||
|
local money = (HarmonyManager.hongmengHeroInfos[boxData.Id].time - GetTimeStamp()) * 432
|
||||||
|
content =string.format("是否花费%d妖晶直接恢复",money)
|
||||||
|
|
||||||
|
MsgPanel.ShowTwo(content,function ()
|
||||||
|
MsgPanel.Hide()
|
||||||
|
end,function ()
|
||||||
|
if DemonCrystal < money then
|
||||||
|
PopupTipPanel.ShowTip("妖晶不足")
|
||||||
|
MsgPanel.Hide()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--向服务器 发消息
|
||||||
|
NetManager.UnlockGrid(boxData.Id,function (msg)
|
||||||
|
-- body
|
||||||
|
for i = 1, #HarmonyManager.hongmengHeroInfos do
|
||||||
|
-- body
|
||||||
|
if HarmonyManager.hongmengHeroInfos[i].gridId ==msg.gridId then
|
||||||
|
HarmonyManager.hongmengHeroInfos[i].time = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if msg.gridId == boxData.Id then
|
||||||
|
TimerText.text = ""
|
||||||
|
end
|
||||||
|
end,"取消","确认")
|
||||||
|
|
||||||
|
|
||||||
end
|
end)
|
||||||
--刷新显示的方法 已拥有的鸿蒙守卫数 已拥有的格子数 格子总数
|
end
|
||||||
function this:UpdataShow(itemList,BoxList,BoxLength)
|
end
|
||||||
|
|
||||||
for i = 1, BoxLength do
|
|
||||||
if i<=#itemList then
|
|
||||||
|
|
||||||
-- this.SingleItemDataShow(this.item , )
|
|
||||||
elseif i>#itemList and i<=#BoxList then
|
|
||||||
-- body
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
if mask.activeSelf then
|
||||||
|
-- body
|
||||||
|
PopupTipPanel.ShowTip("请先解锁前一个格子")
|
||||||
|
else
|
||||||
|
if lock.activeSelf then
|
||||||
|
-- body
|
||||||
|
this:AddBoxFun(boxData)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
--卸载刷新
|
||||||
|
function this:UpdateItemShow(go,boxData,msg)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
function this:AddBoxFun(boxData)
|
||||||
|
local content = ""
|
||||||
|
if Gold > boxData.PropPrice[2] then
|
||||||
|
content =string.format("是否花费%d玄黄之气解锁共鸣位置",boxData.PropPrice[2])
|
||||||
|
else
|
||||||
|
content=string.format("玄黄之气不足%d,是否直接花费%d妖晶解锁共鸣位置?",boxData.PropPrice[2],boxData.MoneyPrice[2])
|
||||||
end
|
end
|
||||||
|
MsgPanel.ShowTwo(content,function ()
|
||||||
|
|
||||||
|
end,function ()
|
||||||
|
if Gold < boxData.PropPrice[2] and DemonCrystal < boxData.MoneyPrice[2] then
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--向服务器请求消息
|
||||||
|
NetManager.HongMengRequset(boxData.Id,function(msg)
|
||||||
|
--
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.RereshNumText,boxData.Id)
|
||||||
|
end)
|
||||||
|
end,"取消","确认")
|
||||||
|
end
|
||||||
|
function this:BindEvent()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this:OnOpen()
|
||||||
|
|
||||||
|
this:AwakeLength()
|
||||||
|
this.RunTimerFun()
|
||||||
|
this.timerEffect:Start()
|
||||||
|
end
|
||||||
function this.SingleItemDataShow(clone,Itemdata)
|
function this.SingleItemDataShow(clone,Itemdata)
|
||||||
-- Util.GetGameObject(clone.transform,"GameObject/icon"):GetComponent("icon").sprite=Util.LoadSprite(GetHeroQuantityImageByquality(heroData.config.Quality,heroData.star))
|
LogGreen(clone.name.."||"..Itemdata.heroConfig.Id)
|
||||||
-- Util.GetGameObject(clone.transform, "lv"):SetActive(false)-- :GetComponent("Text").text = heroData.lv
|
Util.GetGameObject(clone.transform, "GameObject/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(Itemdata.heroConfig.Quality,Itemdata.star))
|
||||||
-- Util.GetGameObject(clone.transform, "icon"):GetComponent("Image").sprite = Util.LoadSprite(GetResourcePath(heroData.config.Icon))
|
Util.GetGameObject(clone.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",Itemdata.lv)
|
||||||
-- Util.GetGameObject(clone.transform, "posIcon"):SetActive(false)--:GetComponent("Image").sprite = Util.LoadSprite(heroData.professionIcon)
|
Util.GetGameObject(clone.transform, "GameObject/icon"):GetComponent("Image").sprite = Util.LoadSprite(Itemdata.icon)
|
||||||
-- Util.GetGameObject(clone.transform, "proIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(heroData.config.PropertyName))
|
--Util.GetGameObject(clone.transform, "GameObject/posIcon"):SetActive(false)--:GetComponent("Image").sprite = Util.LoadSprite(heroData.professionIcon)
|
||||||
|
Util.GetGameObject(clone.transform, "GameObject/proIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(Itemdata.heroConfig.PropertyName))
|
||||||
|
local starGrid = Util.GetGameObject(clone.transform, "GameObject/star")
|
||||||
|
SetHeroStars(starGrid, Itemdata.star,1,nil,nil,Vector2.New(0,1))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function this:Refesh()
|
function this:Refesh(id)
|
||||||
-- body
|
-- body
|
||||||
|
|
||||||
Box=Box+1
|
Box = Box + 1
|
||||||
OpenBox = OpenBox+1
|
OpenBox = OpenBox + 1
|
||||||
this.NumText.text = string.format("%d/%d",0,Box)
|
if self.stage == 1 then
|
||||||
|
-- body
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount,Box, 1})
|
||||||
|
else
|
||||||
|
local count = 0
|
||||||
|
for i = 1, #HarmonyManager.EnvoyList do
|
||||||
|
-- body
|
||||||
|
if HarmonyManager.EnvoyList[i] then
|
||||||
|
count = count + 1
|
||||||
|
-- body
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount + count,Box + #HarmonyManager.EnvoyList, 1})
|
||||||
|
end
|
||||||
|
|
||||||
|
local data = {}
|
||||||
|
data.gridId = id
|
||||||
|
data.heroId = ""
|
||||||
|
data.time = 0
|
||||||
|
table.insert(HarmonyManager.hongmengHeroInfos,data)
|
||||||
local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度
|
local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度
|
||||||
this.ScrollView:SetData(keys,function (index, go)
|
this.ScrollView:SetData(keys,function (index, go)
|
||||||
local key = keys[index]
|
local key = keys[index]
|
||||||
this.SingleBoxDataShow(go, this.tab[key])
|
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||||
|
ItemList[go] = index
|
||||||
|
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
|
TextList[index] = TimerText
|
||||||
|
local Empty = Util.GetGameObject(key.transform,"Box/Empty")
|
||||||
|
BoxList[index] = Empty
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
function this:OpenBoxFun()
|
||||||
|
this:AddBoxFun(tempData)
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:UpdateHero(Herodata)
|
||||||
|
|
||||||
|
print("刷新界面")
|
||||||
|
for i = 1, #HarmonyManager.hongmengHeroInfos do
|
||||||
|
-- body
|
||||||
|
if HarmonyManager.GongMingBox ==HarmonyManager.hongmengHeroInfos[i].gridId then
|
||||||
|
-- body
|
||||||
|
|
||||||
|
HarmonyManager.hongmengHeroInfos[i].heroId = Herodata.dynamicId
|
||||||
|
HarmonyManager.hongmengHeroInfos[i].time = 0
|
||||||
|
print("更新数据"..i.." ",HarmonyManager.hongmengHeroInfos[i].heroId)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
HeroCount = HeroCount + 1
|
||||||
|
if self.stage == 1 then
|
||||||
|
-- body
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount,Box})
|
||||||
|
else
|
||||||
|
local count = 0
|
||||||
|
for i = 1, #HarmonyManager.EnvoyList do
|
||||||
|
-- body
|
||||||
|
if HarmonyManager.EnvoyList[i] then
|
||||||
|
count = count + 1
|
||||||
|
-- body
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount + count,Box + #HarmonyManager.EnvoyList,})
|
||||||
|
end
|
||||||
|
--Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount,Box, 1})
|
||||||
|
--this.NumText.text = string.format("%d/%d",HeroCount,Box)
|
||||||
|
local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度
|
||||||
|
|
||||||
|
--刷新选择英雄界面的 数据
|
||||||
|
HarmonyManager:SetInitList()
|
||||||
|
|
||||||
|
this.ScrollView:SetData(keys,function (index, go)
|
||||||
|
local key = keys[index]
|
||||||
|
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||||
|
ItemList[go] = index
|
||||||
|
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
|
TextList[index] = TimerText
|
||||||
|
local Empty = Util.GetGameObject(key.transform,"Box/Empty")
|
||||||
|
BoxList[index] = Empty
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:GetItemList(index)
|
||||||
|
-- body
|
||||||
|
for key, value in pairs(ItemList) do
|
||||||
|
-- body
|
||||||
|
if value == index then
|
||||||
|
-- body
|
||||||
|
return key
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:UnLoadFun(msg)
|
||||||
|
HeroCount = HeroCount - 1
|
||||||
|
|
||||||
|
for key, value in pairs(ItemList) do
|
||||||
|
if value == TempItem then
|
||||||
|
-- body
|
||||||
|
HarmonyManager.hongmengHeroInfos[value].time = msg.leftTime + GetTimeStamp()
|
||||||
|
|
||||||
|
HarmonyManager.hongmengHeroInfos[value].heroId = ""
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
--刷新选择英雄界面的 数据
|
||||||
|
HarmonyManager:SetInitList()
|
||||||
|
if self.stage == 1 then
|
||||||
|
-- body
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount,Box, 1})
|
||||||
|
else
|
||||||
|
local count = 0
|
||||||
|
for i = 1, #HarmonyManager.EnvoyList do
|
||||||
|
-- body
|
||||||
|
if HarmonyManager.EnvoyList[i] then
|
||||||
|
count = count + 1
|
||||||
|
-- body
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount + count,Box + #HarmonyManager.sEnvoyList})
|
||||||
|
end
|
||||||
|
-- Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount,Box, 1})
|
||||||
|
--this.NumText.text = string.format("%d/%d",HeroCount,Box)
|
||||||
|
local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度
|
||||||
|
|
||||||
|
|
||||||
|
this.ScrollView:SetData(keys,function (index, go)
|
||||||
|
local key = keys[index]
|
||||||
|
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||||
|
ItemList[go] = index
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
--界面关闭时调用(用于子类重写)
|
||||||
|
function this:OnClose()
|
||||||
|
if this.timerEffect then
|
||||||
|
-- body
|
||||||
|
this.timerEffect:Stop()
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
function this:AddListener()
|
function this:AddListener()
|
||||||
-- body
|
-- body
|
||||||
print(" 注册消息成功")
|
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.RereshNumText,self.Refesh,self)
|
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.RereshNumText,self.Refesh,self)
|
||||||
|
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self)
|
||||||
|
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self)
|
||||||
|
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.UnLoadData,self.UnLoadFun,self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:RemoveListener()
|
function this:RemoveListener()
|
||||||
-- body
|
-- body
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.RereshNumText,self.Refesh,self)
|
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.RereshNumText,self.Refesh,self)
|
||||||
|
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self)
|
||||||
|
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self)
|
||||||
|
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.UnLoadData,self.UnLoadFun,self)
|
||||||
end
|
end
|
||||||
function this:OnShow(...)
|
function this:OnShow(...)
|
||||||
-- body
|
-- body
|
||||||
|
@ -148,11 +466,6 @@ function this:OnShow(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function this:SingleHeroDataShow(_go,_HongMengData)
|
|
||||||
local clone = _go
|
|
||||||
local HongMeng = _HongMengData
|
|
||||||
|
|
||||||
-- body
|
|
||||||
end
|
|
||||||
|
|
||||||
return this
|
return this
|
|
@ -1,5 +1,6 @@
|
||||||
HeroManager = {}
|
HeroManager = {}
|
||||||
local this = HeroManager
|
local this = HeroManager
|
||||||
|
local HeroData = require("Modules.Hero.HeroData")
|
||||||
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||||
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||||
local heroLevelConfig = ConfigManager.GetConfig(ConfigName.HeroLevelConfig)
|
local heroLevelConfig = ConfigManager.GetConfig(ConfigName.HeroLevelConfig)
|
||||||
|
@ -64,11 +65,11 @@ function this.InitHeroData(_msgHeroList)
|
||||||
for i = 1, #hero_resolve_licence do
|
for i = 1, #hero_resolve_licence do
|
||||||
this.heroResolveLicence[tonumber(hero_resolve_licence[i])] = tonumber(hero_resolve_licence[i])
|
this.heroResolveLicence[tonumber(hero_resolve_licence[i])] = tonumber(hero_resolve_licence[i])
|
||||||
end
|
end
|
||||||
|
this.UpdateHeroLvEnd()
|
||||||
--Log("服务端推送英雄数量:" .. #_msgHeroList)
|
--Log("服务端推送英雄数量:" .. #_msgHeroList)
|
||||||
for i = 1, #_msgHeroList do
|
for i = 1, #_msgHeroList do
|
||||||
this.UpdateHeroDatas(_msgHeroList[i], true)
|
this.UpdateHeroDatas(_msgHeroList[i], true)
|
||||||
end
|
end
|
||||||
this.UpdateHeroLvEnd()
|
|
||||||
--赋值每个星级的英雄等级上限
|
--赋值每个星级的英雄等级上限
|
||||||
-- this.UpdateHeroPower()
|
-- this.UpdateHeroPower()
|
||||||
--赋值英雄战力
|
--赋值英雄战力
|
||||||
|
@ -76,11 +77,12 @@ end
|
||||||
|
|
||||||
--刷新本地数据
|
--刷新本地数据
|
||||||
function this.UpdateHeroDatas(_msgHeroData, isFindHandBook)
|
function this.UpdateHeroDatas(_msgHeroData, isFindHandBook)
|
||||||
local heroData = {}
|
local heroData = HeroData.new(_msgHeroData, isFindHandBook)
|
||||||
heroData.soulPrintList = {}
|
heroData.soulPrintList = {}
|
||||||
--乘减属性集合
|
--乘减属性集合
|
||||||
heroData.MLSproList={}
|
heroData.MLSproList={}
|
||||||
heroData.heroBackData = _msgHeroData
|
heroData.heroBackData = _msgHeroData
|
||||||
|
|
||||||
heroData.dynamicId = _msgHeroData.id
|
heroData.dynamicId = _msgHeroData.id
|
||||||
local _id = _msgHeroData.heroId
|
local _id = _msgHeroData.heroId
|
||||||
heroData.id = _id
|
heroData.id = _id
|
||||||
|
@ -111,6 +113,7 @@ function this.UpdateHeroDatas(_msgHeroData, isFindHandBook)
|
||||||
|
|
||||||
--_msgHeroData.actionPower
|
--_msgHeroData.actionPower
|
||||||
--英雄穿戴的装备
|
--英雄穿戴的装备
|
||||||
|
-- LogPink("_msgHeroData.equipIdList "..#_msgHeroData.equipIdList..heroData.heroConfig.ReadingName)
|
||||||
heroData.equipIdList = _msgHeroData.equipIdList
|
heroData.equipIdList = _msgHeroData.equipIdList
|
||||||
heroData.jewels = _msgHeroData.jewels
|
heroData.jewels = _msgHeroData.jewels
|
||||||
heroData.talismanList = _msgHeroData.especialEquipLevel --法宝等级
|
heroData.talismanList = _msgHeroData.especialEquipLevel --法宝等级
|
||||||
|
@ -159,6 +162,8 @@ function this.UpdateHeroDatas(_msgHeroData, isFindHandBook)
|
||||||
heroData.name = _configData.ReadingName
|
heroData.name = _configData.ReadingName
|
||||||
heroData.property = _configData.PropertyName
|
heroData.property = _configData.PropertyName
|
||||||
heroData.sortId = #heroDatas + 1
|
heroData.sortId = #heroDatas + 1
|
||||||
|
|
||||||
|
heroData.harmonyGongMing = _msgHeroData.createtype
|
||||||
table.insert(this.heroDataLists, heroData)
|
table.insert(this.heroDataLists, heroData)
|
||||||
heroDatas[heroData.dynamicId] = heroData
|
heroDatas[heroData.dynamicId] = heroData
|
||||||
|
|
||||||
|
@ -537,6 +542,8 @@ function this.CompareWarPower(heroDId)
|
||||||
FormationManager.CheckHeroIdExist(heroDId)
|
FormationManager.CheckHeroIdExist(heroDId)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--更新本地单个英雄技能信息
|
--更新本地单个英雄技能信息
|
||||||
function this.UpdateSingleHeroSkillData(_heroDId)
|
function this.UpdateSingleHeroSkillData(_heroDId)
|
||||||
if heroDatas[_heroDId] then
|
if heroDatas[_heroDId] then
|
||||||
|
@ -3333,6 +3340,10 @@ function this.LoadHerolive1(data, _objPoint)
|
||||||
return testLive
|
return testLive
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this.GetHongMengData(dynamicId)
|
||||||
|
return heroDatas[dynamicId]
|
||||||
|
end
|
||||||
|
|
||||||
function this.SortHeroDatas(_heroDatas)
|
function this.SortHeroDatas(_heroDatas)
|
||||||
local teamHero = FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL)
|
local teamHero = FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL)
|
||||||
--上阵最优先,星级优先,同星级等级优先,同星级同等级按sortId排序。排序时降序排序。
|
--上阵最优先,星级优先,同星级等级优先,同星级同等级按sortId排序。排序时降序排序。
|
||||||
|
|
|
@ -202,6 +202,9 @@ function this.PlayerInfoRequest(func)
|
||||||
-- 充值金额
|
-- 充值金额
|
||||||
VipManager.InitInfoOnLogin(msg)
|
VipManager.InitInfoOnLogin(msg)
|
||||||
|
|
||||||
|
--进入游戏后拿到鸿蒙阵数据
|
||||||
|
HarmonyManager:InitHongMengData(msg.hongmengGuards,msg.hongmengHeroInfos,msg.hongmengTablet,msg.hongmengAdditions)
|
||||||
|
|
||||||
MapManager.PlayedMapTypes = msg.playedMapTypes
|
MapManager.PlayedMapTypes = msg.playedMapTypes
|
||||||
for _, type in ipairs(msg.playedMapTypes) do
|
for _, type in ipairs(msg.playedMapTypes) do
|
||||||
Log(Language[11425]..type)
|
Log(Language[11425]..type)
|
||||||
|
@ -4781,19 +4784,22 @@ function this.ChengeMonsterChooseRequest(activityId,selectId,func)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
--鸿蒙阵
|
||||||
|
-- 鸿蒙阵 游戏开始 拿到的数据
|
||||||
|
|
||||||
--鸿蒙阵
|
|
||||||
|
|
||||||
|
--鸿蒙阵 点击开启格子的数据
|
||||||
function this.HongMengRequset(_gridId,func)
|
function this.HongMengRequset(_gridId,func)
|
||||||
|
|
||||||
|
|
||||||
--鸿蒙阵数据传递
|
|
||||||
-- HarmonyManager:InitHongMengData(msg.hongmengGuards,msg.hongmengHeroInfos,msg.hongmengTablet,msg.hongmengAdditions)
|
|
||||||
|
|
||||||
local data = HeroInfoProto_pb.OpenResonanceRequest()
|
local data = HeroInfoProto_pb.OpenResonanceRequest()
|
||||||
data.gridId = _gridId
|
data.gridId = _gridId
|
||||||
|
print("id",data.gridId)
|
||||||
local msg = data:SerializeToString()
|
local msg = data:SerializeToString()
|
||||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.HERO_SKIN_CHANGE_REQUEST, MessageTypeProto_pb.HERO_SKIN_CHANGE_RESPONSE, msg, function(buffer)
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.HONGMENG_OPEN_RESONANCE_REQUEST, MessageTypeProto_pb.HONGMENG_OPEN_RESONANCE_RESPONSE, msg, function(buffer)
|
||||||
local data = buffer:DataByte()
|
local data = buffer:DataByte()
|
||||||
local msg = HeroInfoProto_pb.OpenResonanceResponse()
|
local msg = HeroInfoProto_pb.OpenResonanceResponse()
|
||||||
msg:ParseFromString(data)
|
msg:ParseFromString(data)
|
||||||
|
@ -4802,4 +4808,41 @@ function this.HongMengRequset(_gridId,func)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
--开启共鸣,卸下装备
|
||||||
|
function this.SendGongMingBox(heroId,gridId,_type,func)
|
||||||
|
-- body
|
||||||
|
local data = HeroInfoProto_pb.ResonanceRequest()
|
||||||
|
data.heroId = heroId
|
||||||
|
data.gridId = gridId
|
||||||
|
data.type = _type
|
||||||
|
local msg = data:SerializeToString()
|
||||||
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.HONGMENG_RESONANCE_REQUEST, MessageTypeProto_pb.HONGMENG_RESONANCE_RESPONSE, msg, function(buffer)
|
||||||
|
if buffer then
|
||||||
|
local data = buffer:DataByte()
|
||||||
|
local msg = HeroInfoProto_pb.ResonanceResponse()
|
||||||
|
msg:ParseFromString(data)
|
||||||
|
if func then
|
||||||
|
func(msg)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.UnlockGrid(gridId,func)
|
||||||
|
local data = HeroInfoProto_pb.CleanResonanceTimeRequest();
|
||||||
|
data.gridId= gridId
|
||||||
|
local msg = data:SerializeToString()
|
||||||
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.HONGMENG_CLEAN_TIME_RESQUEST , MessageTypeProto_pb.HONGMENG_CLEAN_TIME_RESPONSE, msg, function(buffer)
|
||||||
|
if buffer then
|
||||||
|
local data = buffer:DataByte()
|
||||||
|
local msg = HeroInfoProto_pb.ResonanceResponse()
|
||||||
|
msg:ParseFromString(data)
|
||||||
|
if func then
|
||||||
|
func(msg)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end)
|
||||||
|
end
|
||||||
return this
|
return this
|
|
@ -1,9 +1,98 @@
|
||||||
local HarmonyView={}
|
HarmonyView={}
|
||||||
|
-- 鸿蒙守卫脚本
|
||||||
function HarmonyView:New()
|
function HarmonyView:New(gameObject)
|
||||||
|
local b = {}
|
||||||
|
b.gameObject = gameObject
|
||||||
|
b.transform = gameObject.transform
|
||||||
|
setmetatable(b, { __index = HarmonyView })
|
||||||
|
return b
|
||||||
|
end
|
||||||
|
HarmonyView.GongMingTable = {}
|
||||||
|
HarmonyView.HongMengData = {}
|
||||||
|
function HarmonyView:InitComponent()
|
||||||
|
local num = self.gameObject.transform.childCount
|
||||||
|
for i = 0, num-1 do
|
||||||
|
self.GongMingTable[i] =self.gameObject.transform:GetChild(i).gameObject
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function HarmonyView:BindEvent()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function HarmonyView:AddListener()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function HarmonyView:RemoveListener()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function HarmonyView:SetGreen(HongMengData)
|
||||||
|
local min = HongMengData[#self.GongMingTable].lv
|
||||||
|
for i = 0, #self.GongMingTable do
|
||||||
|
if HongMengData[i+1].lv == min then
|
||||||
|
self.count=self.count+1;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
function HarmonyView:InitData(data)
|
||||||
|
table.sort(data, function(a,b)
|
||||||
|
if a.lv==b.lv then
|
||||||
|
return a.warPower > b.warPower
|
||||||
|
else
|
||||||
|
return a.lv > b.lv
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
return data
|
||||||
|
end
|
||||||
|
function HarmonyView:OnOpen()
|
||||||
|
-- local heroDataList = HeroManager.GetAllHeroDatas(1);
|
||||||
|
-- self.HongMengData = self:InitData(heroDataList)
|
||||||
|
|
||||||
|
for i = 1, #HarmonyManager.hongmengGuards do
|
||||||
|
self.HongMengData[i] = HeroManager.GetHongMengData(HarmonyManager.hongmengGuards[i])
|
||||||
|
|
||||||
|
end
|
||||||
|
self.count = 0;
|
||||||
|
self.HongMengData = self:InitData(self.HongMengData)
|
||||||
|
|
||||||
|
for i = 1, #self.HongMengData do
|
||||||
|
-- body
|
||||||
|
for i = 1, #self.HongMengData[i].equipIdList do
|
||||||
|
-- body
|
||||||
|
HarmonyManager.equipCount= HarmonyManager.equipCount+1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- print("count",HarmonyManager.equipCount)
|
||||||
|
self:SetGreen(self.HongMengData)
|
||||||
|
LogGreen(self.count)
|
||||||
|
for i = 0, #self.GongMingTable do
|
||||||
|
if i == 5 then
|
||||||
|
self:SetItem(self.HongMengData[i+1],self.GongMingTable[i],1)
|
||||||
|
else
|
||||||
|
self:SetItem(self.HongMengData[i+1],self.GongMingTable[i],0)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
HarmonyManager:SetGuardList(self.HongMengData,(#self.GongMingTable+1))
|
||||||
|
end
|
||||||
|
|
||||||
|
function HarmonyView:SetItem(data,go,flag)
|
||||||
|
Util.GetGameObject(go.transform, "GameObject/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(data.heroConfig.Quality,data.star))
|
||||||
|
if flag == 0 then
|
||||||
|
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = data.lv
|
||||||
|
else
|
||||||
|
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",data.lv)
|
||||||
|
end
|
||||||
|
|
||||||
|
Util.GetGameObject(go.transform, "GameObject/icon"):GetComponent("Image").sprite = Util.LoadSprite(data.icon)
|
||||||
|
|
||||||
|
Util.GetGameObject(go.transform, "GameObject/proIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(data.heroConfig.PropertyName))
|
||||||
|
local starGrid = Util.GetGameObject(go.transform, "GameObject/star")
|
||||||
|
SetHeroStars(starGrid, data.star,1,nil,nil,Vector2.New(0,1))
|
||||||
|
end
|
||||||
return HarmonyView
|
return HarmonyView
|
Loading…
Reference in New Issue