Ver código fonte

fix:修改主线关卡UI

chenbin 4 dias atrás
pai
commit
b1d86a5708
38 arquivos alterados com 534 adições e 648 exclusões
  1. 14 0
      Assets/Res/Addressable/FGUI/Mount/Mount_atlas0.png.meta
  2. 1 1
      Assets/Res/Addressable/Fonts/ALIMAMA_SDF_outline.mat
  3. 14 0
      Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_1.png.meta
  4. 14 0
      Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_2.png.meta
  5. 14 0
      Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_3.png.meta
  6. 14 0
      Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_4.png.meta
  7. 14 0
      Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_5.png.meta
  8. 5 5
      Assets/Res/Addressable/UI/Prefabs/MainMap/BossBattleInfo.prefab
  9. 93 470
      Assets/Res/Addressable/UI/Prefabs/MainMap/MainMapUI.prefab
  10. 4 4
      Assets/Res/Addressable/UI/Prefabs/MainMap/MonsterBattleInfo.prefab
  11. 4 4
      Assets/Res/Addressable/UI/Prefabs/MainMap/PlayerBattleInfo.prefab
  12. BIN
      Assets/Res/Static/UI/Atlas/MainMap/BossBloodbg.png
  13. BIN
      Assets/Res/Static/UI/Atlas/MainMap/PlayerBloodbg.png
  14. BIN
      Assets/Res/Static/UI/Atlas/MainMap/boss.png
  15. 2 2
      Assets/Scripts/Business/Runtime/Event/EventDefine.cs
  16. 3 3
      Assets/Scripts/Business/Runtime/Map/Entities/MonsterEntityView.cs
  17. 11 2
      Assets/Scripts/Business/Runtime/Map/TestMainMap/EntitiesComponent.cs
  18. 51 40
      Assets/Scripts/Business/Runtime/Map/TestMainMap/MapUIComponent.cs
  19. 1 1
      Assets/Scripts/Business/Runtime/Map/UI/BattleInfoBuffList.cs
  20. 8 0
      Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo.meta
  21. 25 0
      Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo/BossBattleInfoVM.cs
  22. 11 0
      Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo/BossBattleInfoVM.cs.meta
  23. 51 0
      Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo/BossBattleInfoView.cs
  24. 11 0
      Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo/BossBattleInfoView.cs.meta
  25. 15 27
      Assets/Scripts/Business/Runtime/Map/UI/EntityBattleInfoView.cs
  26. 4 5
      Assets/Scripts/Business/Runtime/Map/UI/MainMapUI/MainMapUIVM.cs
  27. 16 68
      Assets/Scripts/Business/Runtime/Map/UI/MainMapUI/MainMapUIView.cs
  28. 8 0
      Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo.meta
  29. 20 0
      Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo/MonsterBattleInfoVM.cs
  30. 11 0
      Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo/MonsterBattleInfoVM.cs.meta
  31. 13 0
      Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo/MonsterBattleInfoView.cs
  32. 11 0
      Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo/MonsterBattleInfoView.cs.meta
  33. 8 0
      Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo.meta
  34. 21 0
      Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo/PlayerBattleInfoVM.cs
  35. 11 0
      Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo/PlayerBattleInfoVM.cs.meta
  36. 13 0
      Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo/PlayerBattleInfoView.cs
  37. 11 0
      Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo/PlayerBattleInfoView.cs.meta
  38. 7 16
      Assets/Scripts/Business/Runtime/Nodes/GameMain/MapComponent.cs

+ 14 - 0
Assets/Res/Addressable/FGUI/Mount/Mount_atlas0.png.meta

@@ -168,6 +168,20 @@ TextureImporter:
     ignorePlatformSupport: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WebGL
+    maxTextureSize: 2048
+    maxPlaceholderSize: 32
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []

+ 1 - 1
Assets/Res/Addressable/Fonts/ALIMAMA_SDF_outline.mat

@@ -70,7 +70,7 @@ Material:
     - _OutlineSoftness: 0
     - _OutlineUVSpeedX: 0
     - _OutlineUVSpeedY: 0
-    - _OutlineWidth: 0.1
+    - _OutlineWidth: 0.15
     - _PerspectiveFilter: 0.875
     - _Reflectivity: 10
     - _ScaleRatioA: 0.85714287

+ 14 - 0
Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_1.png.meta

@@ -154,6 +154,20 @@ TextureImporter:
     ignorePlatformSupport: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WebGL
+    maxTextureSize: 512
+    maxPlaceholderSize: 32
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 0
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []

+ 14 - 0
Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_2.png.meta

@@ -154,6 +154,20 @@ TextureImporter:
     ignorePlatformSupport: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WebGL
+    maxTextureSize: 512
+    maxPlaceholderSize: 32
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 0
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []

+ 14 - 0
Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_3.png.meta

@@ -154,6 +154,20 @@ TextureImporter:
     ignorePlatformSupport: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WebGL
+    maxTextureSize: 512
+    maxPlaceholderSize: 32
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 0
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []

+ 14 - 0
Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_4.png.meta

@@ -154,6 +154,20 @@ TextureImporter:
     ignorePlatformSupport: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WebGL
+    maxTextureSize: 512
+    maxPlaceholderSize: 32
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 0
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []

+ 14 - 0
Assets/Res/Addressable/UI/Atlas/Partner/sb_elementTypeRhombus_5.png.meta

@@ -154,6 +154,20 @@ TextureImporter:
     ignorePlatformSupport: 0
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: WebGL
+    maxTextureSize: 512
+    maxPlaceholderSize: 32
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 0
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
   spriteSheet:
     serializedVersion: 2
     sprites: []

+ 5 - 5
Assets/Res/Addressable/UI/Prefabs/MainMap/BossBattleInfo.prefab

@@ -381,9 +381,9 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   _collector:
     bindTypes:
-    - GameObject
-    - GameObject
-    - GameObject
+    - UnityEngine.UI.Image
+    - FL.Map.UI.BattleInfoBuffList
+    - UnityEngine.UI.Image
     - GameObject
     - TMPro.TextMeshProUGUI
     keys:
@@ -880,7 +880,7 @@ MonoBehaviour:
   m_enableAutoSizing: 0
   m_fontSizeMin: 18
   m_fontSizeMax: 72
-  m_fontStyle: 0
+  m_fontStyle: 1
   m_HorizontalAlignment: 1
   m_VerticalAlignment: 512
   m_textAlignment: 65535
@@ -984,7 +984,7 @@ MonoBehaviour:
     m_PersistentCalls:
       m_Calls: []
   m_Sprite: {fileID: 21300000, guid: eed5889a61370624b9e6239335a491aa, type: 3}
-  m_Type: 1
+  m_Type: 3
   m_PreserveAspect: 0
   m_FillCenter: 1
   m_FillMethod: 0

+ 93 - 470
Assets/Res/Addressable/UI/Prefabs/MainMap/MainMapUI.prefab

@@ -54,43 +54,37 @@ MonoBehaviour:
     - Transform
     - Transform
     - Transform
-    - GameObject
-    - UnityEngine.UI.Image
-    - TMPro.TextMeshProUGUI
     - UnityEngine.UI.Image
     - GameObject
     - TMPro.TextMeshProUGUI
     - UnityEngine.UI.Button
-    - Transform
     - GameObject
+    - GameObject
+    - Transform
     keys:
     - Canvas
     - MonsterRoot
     - PlayerRoot
     - CombatValRoot
-    - BossTimeRoot
-    - BossTimeImg
-    - BossTimeTxt
     - MapProgressImg
     - CurProgressImg
     - MapNameTxt
     - ChallengeBtn
+    - MapInfoRoot
+    - MapProgress
     - BossRoot
-    - MapProgressRoot
     values:
     - {fileID: 8816707237266948490}
     - {fileID: 1746331797920004104}
     - {fileID: 6695609496534862641}
     - {fileID: 6914939275245500659}
-    - {fileID: 8361750681359267828}
-    - {fileID: 9139428170612449830}
-    - {fileID: 1321810003700842779}
     - {fileID: 1170391115703652478}
     - {fileID: 5757351513119975108}
     - {fileID: 4265369120153211740}
     - {fileID: 6492804401821863171}
-    - {fileID: 8760834790847200761}
     - {fileID: 2894170839056918781}
+    - {fileID: 6816697716225986416}
+    - {fileID: 5500203503025056660}
 --- !u!1 &1170391115703652478
 GameObject:
   m_ObjectHideFlags: 0
@@ -122,7 +116,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
-  m_Father: {fileID: 3156264922286312291}
+  m_Father: {fileID: 4116768440983385552}
   m_RootOrder: -1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
@@ -168,219 +162,6 @@ MonoBehaviour:
   m_FillOrigin: 0
   m_UseSpriteMesh: 0
   m_PixelsPerUnitMultiplier: 1
---- !u!1 &1321810003700842779
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 7
-  m_Component:
-  - component: {fileID: 5993731227682962046}
-  - component: {fileID: 8297500654798425796}
-  - component: {fileID: 1139315937357579458}
-  m_Layer: 5
-  m_HasEditorInfo: 1
-  m_Name: BossTimeTxt
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &5993731227682962046
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1321810003700842779}
-  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: 9084210730587587232}
-  m_RootOrder: -1
-  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: 44, y: 0}
-  m_SizeDelta: {x: 200, y: 50}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &8297500654798425796
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1321810003700842779}
-  m_CullTransparentMesh: 1
---- !u!114 &1139315937357579458
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1321810003700842779}
-  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: 00:35
-  m_isRightToLeft: 0
-  m_fontAsset: {fileID: 11400000, guid: 6a9136dc427c82942998cd8b1ac71750, type: 2}
-  m_sharedMaterial: {fileID: 2100000, guid: 57f8d92114a12374794b1a10a88fe1e7, 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: 18
-  m_fontSizeBase: 18
-  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: 0
-  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: 0
-  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: 0, z: 0, w: 0}
-  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 &1673389116290862349
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 7
-  m_Component:
-  - component: {fileID: 1012787498289632124}
-  - component: {fileID: 4859497519970150329}
-  - component: {fileID: 1684784684983187037}
-  m_Layer: 5
-  m_HasEditorInfo: 1
-  m_Name: Image
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &1012787498289632124
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1673389116290862349}
-  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: 9084210730587587232}
-  m_RootOrder: -1
-  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: -100, y: 0}
-  m_SizeDelta: {x: 40, y: 40}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &4859497519970150329
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1673389116290862349}
-  m_CullTransparentMesh: 1
---- !u!114 &1684784684983187037
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1673389116290862349}
-  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: b3b6b5bddd1f800468047722e9c53b20, 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 &1746331797920004104
 GameObject:
   m_ObjectHideFlags: 0
@@ -429,7 +210,7 @@ GameObject:
   - component: {fileID: 3156264922286312291}
   m_Layer: 5
   m_HasEditorInfo: 1
-  m_Name: MapProgressRoot
+  m_Name: MapInfoRoot
   m_TagString: Untagged
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
@@ -448,16 +229,15 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 391281292112911644}
-  - {fileID: 937999209593163303}
-  - {fileID: 760799912804206724}
-  - {fileID: 1923926976074435459}
+  - {fileID: 4116768440983385552}
+  - {fileID: 8255306224057910593}
   - {fileID: 3365868631886846483}
   m_Father: {fileID: 5747129706845861945}
   m_RootOrder: -1
   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: 450}
+  m_AnchoredPosition: {x: 0, y: 470}
   m_SizeDelta: {x: 100, y: 100}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &3269279850697968396
@@ -673,6 +453,43 @@ MonoBehaviour:
   m_hasFontAssetChanged: 0
   m_baseMaterial: {fileID: 0}
   m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
+--- !u!1 &5500203503025056660
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 7
+  m_Component:
+  - component: {fileID: 3573919275192759454}
+  m_Layer: 5
+  m_HasEditorInfo: 1
+  m_Name: BossRoot
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &3573919275192759454
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5500203503025056660}
+  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: 5747129706845861945}
+  m_RootOrder: -1
+  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: 470}
+  m_SizeDelta: {x: 100, y: 100}
+  m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &5757351513119975108
 GameObject:
   m_ObjectHideFlags: 0
@@ -704,7 +521,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
-  m_Father: {fileID: 3156264922286312291}
+  m_Father: {fileID: 4116768440983385552}
   m_RootOrder: -1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
@@ -853,12 +670,12 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 7440815291323499000}
-  m_Father: {fileID: 5747129706845861945}
+  m_Father: {fileID: 3156264922286312291}
   m_RootOrder: -1
   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: 416}
+  m_AnchoredPosition: {x: 0, y: -34.000153}
   m_SizeDelta: {x: 92, y: 105}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3966292865097174767
@@ -980,6 +797,46 @@ RectTransform:
   m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
+--- !u!1 &6816697716225986416
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 7
+  m_Component:
+  - component: {fileID: 4116768440983385552}
+  m_Layer: 5
+  m_HasEditorInfo: 1
+  m_Name: MapProgress
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &4116768440983385552
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6816697716225986416}
+  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: 937999209593163303}
+  - {fileID: 760799912804206724}
+  - {fileID: 1923926976074435459}
+  m_Father: {fileID: 3156264922286312291}
+  m_RootOrder: -1
+  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: 100, y: 100}
+  m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &6914939275245500659
 GameObject:
   m_ObjectHideFlags: 0
@@ -1153,47 +1010,6 @@ MonoBehaviour:
   m_hasFontAssetChanged: 0
   m_baseMaterial: {fileID: 0}
   m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
---- !u!1 &8361750681359267828
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 7
-  m_Component:
-  - component: {fileID: 9084210730587587232}
-  m_Layer: 5
-  m_HasEditorInfo: 1
-  m_Name: BossTimeRoot
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &9084210730587587232
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 8361750681359267828}
-  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: 2433536025236468926}
-  - {fileID: 5809405571297945829}
-  - {fileID: 1012787498289632124}
-  - {fileID: 5993731227682962046}
-  m_Father: {fileID: 2608757932341102067}
-  m_RootOrder: -1
-  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: -60}
-  m_SizeDelta: {x: 100, y: 100}
-  m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &8663402006501551916
 GameObject:
   m_ObjectHideFlags: 0
@@ -1225,7 +1041,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
-  m_Father: {fileID: 3156264922286312291}
+  m_Father: {fileID: 4116768440983385552}
   m_RootOrder: -1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
@@ -1271,44 +1087,6 @@ MonoBehaviour:
   m_FillOrigin: 0
   m_UseSpriteMesh: 0
   m_PixelsPerUnitMultiplier: 1
---- !u!1 &8760834790847200761
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 7
-  m_Component:
-  - component: {fileID: 2608757932341102067}
-  m_Layer: 5
-  m_HasEditorInfo: 1
-  m_Name: BossRoot
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &2608757932341102067
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 8760834790847200761}
-  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: 9084210730587587232}
-  m_Father: {fileID: 5747129706845861945}
-  m_RootOrder: -1
-  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: 475}
-  m_SizeDelta: {x: 100, y: 100}
-  m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &8816707237266948490
 GameObject:
   m_ObjectHideFlags: 0
@@ -1344,9 +1122,8 @@ RectTransform:
   - {fileID: 3559069560777873005}
   - {fileID: 2923387791364927412}
   - {fileID: 5143287219737364897}
+  - {fileID: 3573919275192759454}
   - {fileID: 3156264922286312291}
-  - {fileID: 2608757932341102067}
-  - {fileID: 8255306224057910593}
   m_Father: {fileID: 8987167623574564136}
   m_RootOrder: -1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1418,157 +1195,3 @@ MonoBehaviour:
   m_BlockingMask:
     serializedVersion: 2
     m_Bits: 4294967295
---- !u!1 &9139428170612449830
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 7
-  m_Component:
-  - component: {fileID: 5809405571297945829}
-  - component: {fileID: 4129069181682024214}
-  - component: {fileID: 7683496596695280195}
-  m_Layer: 5
-  m_HasEditorInfo: 1
-  m_Name: BossTimeImg
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &5809405571297945829
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 9139428170612449830}
-  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: 9084210730587587232}
-  m_RootOrder: -1
-  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: -86, y: 0}
-  m_SizeDelta: {x: 252, y: 19}
-  m_Pivot: {x: 0, y: 0.5}
---- !u!222 &4129069181682024214
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 9139428170612449830}
-  m_CullTransparentMesh: 1
---- !u!114 &7683496596695280195
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 9139428170612449830}
-  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: 0
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  m_Sprite: {fileID: 21300000, guid: 93b74debab8820b4db6699d6251c3013, type: 3}
-  m_Type: 1
-  m_PreserveAspect: 0
-  m_FillCenter: 1
-  m_FillMethod: 0
-  m_FillAmount: 1
-  m_FillClockwise: 1
-  m_FillOrigin: 0
-  m_UseSpriteMesh: 0
-  m_PixelsPerUnitMultiplier: 1
---- !u!1 &9179465921822052022
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 7
-  m_Component:
-  - component: {fileID: 2433536025236468926}
-  - component: {fileID: 4896112467529330415}
-  - component: {fileID: 4322256412391001739}
-  m_Layer: 5
-  m_HasEditorInfo: 1
-  m_Name: Image
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &2433536025236468926
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 9179465921822052022}
-  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: 9084210730587587232}
-  m_RootOrder: -1
-  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: 40, y: 0}
-  m_SizeDelta: {x: 260, y: 25}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &4896112467529330415
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 9179465921822052022}
-  m_CullTransparentMesh: 1
---- !u!114 &4322256412391001739
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 9179465921822052022}
-  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: 0
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  m_Sprite: {fileID: 21300000, guid: 2dd9070d5ec85cd44a4c3f7b39a4fd59, type: 3}
-  m_Type: 1
-  m_PreserveAspect: 0
-  m_FillCenter: 1
-  m_FillMethod: 4
-  m_FillAmount: 1
-  m_FillClockwise: 1
-  m_FillOrigin: 0
-  m_UseSpriteMesh: 0
-  m_PixelsPerUnitMultiplier: 1

+ 4 - 4
Assets/Res/Addressable/UI/Prefabs/MainMap/MonsterBattleInfo.prefab

@@ -177,7 +177,7 @@ MonoBehaviour:
   m_enableAutoSizing: 0
   m_fontSizeMin: 18
   m_fontSizeMax: 72
-  m_fontStyle: 0
+  m_fontStyle: 1
   m_HorizontalAlignment: 2
   m_VerticalAlignment: 512
   m_textAlignment: 65535
@@ -556,9 +556,9 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   _collector:
     bindTypes:
-    - GameObject
-    - GameObject
-    - GameObject
+    - UnityEngine.UI.Image
+    - FL.Map.UI.BattleInfoBuffList
+    - UnityEngine.UI.Image
     keys:
     - HpImg
     - BuffList

+ 4 - 4
Assets/Res/Addressable/UI/Prefabs/MainMap/PlayerBattleInfo.prefab

@@ -358,9 +358,9 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   _collector:
     bindTypes:
-    - GameObject
-    - GameObject
-    - GameObject
+    - UnityEngine.UI.Image
+    - FL.Map.UI.BattleInfoBuffList
+    - UnityEngine.UI.Image
     keys:
     - HpImg
     - BuffList
@@ -548,7 +548,7 @@ MonoBehaviour:
   m_enableAutoSizing: 0
   m_fontSizeMin: 18
   m_fontSizeMax: 72
-  m_fontStyle: 0
+  m_fontStyle: 1
   m_HorizontalAlignment: 2
   m_VerticalAlignment: 512
   m_textAlignment: 65535

BIN
Assets/Res/Static/UI/Atlas/MainMap/BossBloodbg.png


BIN
Assets/Res/Static/UI/Atlas/MainMap/PlayerBloodbg.png


BIN
Assets/Res/Static/UI/Atlas/MainMap/boss.png


+ 2 - 2
Assets/Scripts/Business/Runtime/Event/EventDefine.cs

@@ -66,9 +66,9 @@
         /// </summary>
         GameMainMapPushPreviewBuffs,
         /// <summary>
-        /// boss战斗开始
+        /// boss战斗超时
         /// </summary>
-        GameMainMapBossStart,
+        GameMainMapBossTimeout,
         GameMainMapChallengeBoss,
         #endregion
         #region Battle.Component 2000 - 2999

+ 3 - 3
Assets/Scripts/Business/Runtime/Map/Entities/MonsterEntityView.cs

@@ -23,9 +23,6 @@ namespace FL.Map
         Transform ISkillContext.ActionRoot => VM.ActionRoot;
         void ISkillContext.OnSkillStart(int skillId)
         {
-            //TOTO 临时代码
-            if ((Entity as MonsterEntity).IsBoss)
-                return;
             if (States.IsState(EEntityState.MoveAI))
             {
                 Move.Pause();
@@ -35,6 +32,9 @@ namespace FL.Map
         void ISkillContext.OnSkillStop(int skillId)
         {
             //TOTO 临时代码
+            if ((Entity as MonsterEntity).IsBoss)
+                return;
+            //TOTO 临时代码
             if (States.IsState(EEntityState.MoveAI))
             {
                 Move.Resume();

+ 11 - 2
Assets/Scripts/Business/Runtime/Map/TestMainMap/EntitiesComponent.cs

@@ -176,7 +176,10 @@ namespace FL.Map.TestMainMap
                         _monsterMap.Add(monster.EntityId, entityView);
                         _selector.Register(entityView);
                         entityView.Selector = _selector;
-                        Context.MapUI.AddEntity(entityView);
+                        if (table.Type == 1)
+                        { //boss的血条等boss移动到战斗位置再加载
+                            Context.MapUI.AddEntity(entityView);
+                        }
                     });
                     loadAsync.Join(asyncGroup);
                 }
@@ -243,7 +246,13 @@ namespace FL.Map.TestMainMap
                         moveArgs.curve = Context.VM.MapPathCurve.GetCurve(entity.BirthCurve - 1);
                         moveArgs.curveOffset = new Vector3(3, 0, 0);
                     }
-                    entityView.CommonAI.MoveToBattle(moveArgs);
+                    entityView.CommonAI.MoveToBattle(moveArgs, () =>
+                    {
+                        if (entity.IsBoss)
+                        {
+                            Context.MapUI.AddBoss(entityView, dto.chapterId);
+                        }
+                    });
                 }
             });
             asyncGroup.End();

+ 51 - 40
Assets/Scripts/Business/Runtime/Map/TestMainMap/MapUIComponent.cs

@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using UnityEngine;
 using XGame;
 using XGame.Database;
+using XGame.Framework;
 using XGame.Framework.Asyncs;
 using XGame.Framework.Components;
 using XGame.Framework.Interfaces;
@@ -30,7 +31,7 @@ namespace FL.Map.TestMainMap
         /// <summary>
         /// 玩家、怪物血条
         /// </summary>
-        private Dictionary<long, EntityBattleInfoView> _entityViewsMap = new Dictionary<long, EntityBattleInfoView>();
+        private Dictionary<long, IEntityBattleInfoView> _entityViewsMap = new();
         /// <summary>
         /// 飘血计时
         /// 同一个Entity的飘血需要有200毫秒间隔
@@ -50,7 +51,6 @@ namespace FL.Map.TestMainMap
             EventSingle.Instance.AddListener(EventDefine.GameMainMapStartMask, OnStartMask);
             EventSingle.Instance.AddListener(EventDefine.GameMainMapEndMask, OnEndMask);
             EventSingle.Instance.AddListener(EventDefine.GameMainMapHpAdd, OnHpAdd);
-            EventSingle.Instance.AddListener(EventDefine.GameMainMapBossStart, OnBossStart);
             LoadUIView();
         }
 
@@ -60,7 +60,6 @@ namespace FL.Map.TestMainMap
             EventSingle.Instance.RemoveListener(EventDefine.GameMainMapStartMask, OnStartMask);
             EventSingle.Instance.RemoveListener(EventDefine.GameMainMapEndMask, OnEndMask);
             EventSingle.Instance.RemoveListener(EventDefine.GameMainMapHpAdd, OnHpAdd);
-            EventSingle.Instance.RemoveListener(EventDefine.GameMainMapBossStart, OnBossStart);
 
             if (_uiView != null)
             {
@@ -93,7 +92,6 @@ namespace FL.Map.TestMainMap
                     view.RefreshBuffs();
                 }
             }
-            _uiView?.LateUpdate(millisecond);
         }
         /// <summary>
         /// 世界坐标转指定UI节点的相对坐标
@@ -128,6 +126,11 @@ namespace FL.Map.TestMainMap
                 LoadEntityView(master);
             }
         }
+        public void AddBoss(ITarget master, int chapterId)
+        {
+            Assert.IsNotNull(_uiView, $"MainMapUI不能为空.");
+            LoadEntityView(master, chapterId);
+        }
         public void RefreshEntity(long entityId)
         {
             if (_entityViewsMap.TryGetValue(entityId, out var view))
@@ -135,51 +138,64 @@ namespace FL.Map.TestMainMap
                 view.RefreshHp();
             }
         }
-        private void LoadEntityView(ITarget master)
+        private void LoadEntityView(ITarget master, int chapterId = 0)
         {
-            GetEntityAddressable(master, out var addressable, out var parent, out var isBoss);
-            var viewAsync = Context.Asset.LoadEntity<EntityBattleInfoView>(addressable, parent);
-            viewAsync.On(_ =>
-            {
-                var view = viewAsync.Result;
-                if (view == null)
-                    return;
-                if (master.IsDead)
-                {
-                    Log.Debug($"EntityBattleInfoView 加载完成,Entity已经死亡. Id:{master.Entity.EntityId}");
-                    Context.Asset.Recycle(view);
-                    return;
-                }
-                view.Master = master;
-                view.IsMoveable = !isBoss;
-                view.LocalPosition = isBoss ? Vector3.zero : WorldToLocal(master.UIPoint.position, _uiView.PlayerRoot);
-                _entityViewsMap.Add(view.Master.Entity.EntityId, view);
-            });
-        }
-        private void GetEntityAddressable(ITarget master, out string addressableName, out Transform parent, out bool isBoss)
-        {
-            isBoss = false;
             if (master.Entity.EntityType == EEntityType.Monster)
             {
                 var table = MonsterTableRepo.Get(master.Entity.TableId);
                 if (table.Type == 2)
                 {
-                    addressableName = AddressableDefine.bossbattleinfo;
-                    parent = _uiView.BossRoot;
-                    isBoss = true;
+                    var viewAsync = Context.Asset.LoadEntity<BossBattleInfoView>(AddressableDefine.bossbattleinfo, _uiView.BossRoot);
+                    viewAsync.On(_ =>
+                    {
+                        var view = viewAsync.Result;
+                        if (view == null)
+                            return;
+                        OnLoaded(master, view);
+                        view.IsMoveable = false;
+                        view.LocalPosition = Vector3.zero;
+                        view.RefreshTimeLimit(chapterId);
+                    });
                 }
                 else
                 {
-                    addressableName = AddressableDefine.monsterbattleinfo;
-                    parent = _uiView.MonsterRoot;
+                    var viewAsync = Context.Asset.LoadEntity<MonsterBattleInfoView>(AddressableDefine.monsterbattleinfo, _uiView.MonsterRoot);
+                    viewAsync.On(_ =>
+                    {
+                        var view = viewAsync.Result;
+                        if (view == null)
+                            return;
+                        OnLoaded(master, view);
+                    });
                 }
             }
             else
             {
-                addressableName = AddressableDefine.playerbattleinfo;
-                parent = _uiView.PlayerRoot;
+                var viewAsync = Context.Asset.LoadEntity<PlayerBattleInfoView>(AddressableDefine.playerbattleinfo, _uiView.PlayerRoot);
+                viewAsync.On(_ =>
+                {
+                    var view = viewAsync.Result;
+                    if (view == null)
+                        return;
+                    OnLoaded(master, view);
+                });
             }
+            
         }
+        void OnLoaded(ITarget master, IEntityBattleInfoView view)
+        {
+            if (master.IsDead)
+            {
+                Log.Debug($"EntityBattleInfoView 加载完成,Entity已经死亡. Id:{master.Entity.EntityId}");
+                Context.Asset.Recycle(view);
+                return;
+            }
+            view.Master = master;
+            view.IsMoveable = true;
+            view.LocalPosition = WorldToLocal(master.UIPoint.position, _uiView.PlayerRoot);
+            _entityViewsMap.Add(view.Master.Entity.EntityId, view);
+        }
+
         private void OnRemoveEntity(int eventId, object args)
         {
             var entityId = (long)args;
@@ -217,14 +233,9 @@ namespace FL.Map.TestMainMap
         {
             PlayHpAdd((HpAddDto)args);
         }
-        private void OnBossStart(int eventId, object args)
-        {
-            //var chapterId = (int)args;
-            _uiView?.StartBossTime();
-        }
         private void ClearEntities(bool includePlayer)
         {
-            EntityBattleInfoView player = null;
+            IEntityBattleInfoView player = null;
             foreach (var entity in _entityViewsMap.Values)
             {
                 if (!includePlayer && entity.Master.Entity.EntityType == EEntityType.Player)

+ 1 - 1
Assets/Scripts/Business/Runtime/Map/UI/BattleInfoBuffList.cs

@@ -8,7 +8,7 @@ namespace FL.Map.UI
     /// <summary>
     /// TODO 临时代码
     /// </summary>
-    internal class BattleInfoBuffList : MonoBehaviour
+    public class BattleInfoBuffList : MonoBehaviour
     {
         [SerializeField]
         private BattleInfoBuffListItem _template;

+ 8 - 0
Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: CngW4SOoVn4uthmyD0Y7Zazy2xKIHwfnFTO9LBf01ezyVMfohPEbhVc=
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 25 - 0
Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo/BossBattleInfoVM.cs

@@ -0,0 +1,25 @@
+using UnityEngine;
+using XGame.Framework.Map;
+using XGame.Framework.ObjectCollection;
+
+namespace FL.Map.UI
+{
+    public class BossBattleInfoVM : EntityViewModel, IEntityBattleInfoVM
+    {
+        public UnityEngine.UI.Image HpImg { get; private set; }
+        public FL.Map.UI.BattleInfoBuffList BuffList { get; private set; }
+        public UnityEngine.UI.Image ShieldImg { get; private set; }
+        public GameObject TimeRoot { get; private set; }
+        public TMPro.TextMeshProUGUI TimeText { get; private set; }
+
+        protected override void OnInit(IObjectCollector collector)
+        {
+            HpImg = collector.GetComponent<UnityEngine.UI.Image>("HpImg");
+            BuffList = collector.GetComponent<FL.Map.UI.BattleInfoBuffList>("BuffList");
+            ShieldImg = collector.GetComponent<UnityEngine.UI.Image>("ShieldImg");
+            TimeRoot = collector.GetGameObject("TimeRoot");
+            TimeText = collector.GetComponent<TMPro.TextMeshProUGUI>("TimeText");
+
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo/BossBattleInfoVM.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: Xi8X4HivB33W8WmOcgJJRD2LYskYM8g5H66n8PoKxe05hsVq6kHO8CU=
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 51 - 0
Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo/BossBattleInfoView.cs

@@ -0,0 +1,51 @@
+
+using XGame.Database;
+using XGame.Framework.Time;
+
+namespace FL.Map.UI
+{
+    public class BossBattleInfoView : EntityBattleInfoView<BossBattleInfoVM>
+    {
+        private ITimer _timer;
+        protected override void OnEnable(object intent)
+        {
+        }
+        protected override void OnDisable()
+        {
+            _timer?.Cancel();
+            _timer = null;
+        }
+        /// <summary>
+        /// boss战斗限时
+        /// 单位: 毫秒
+        /// </summary>
+        /// <param name="chapterId"></param>
+        public void RefreshTimeLimit(int chapterId)
+        {
+            var chapterTable = ChapterTableRepo.Get(chapterId);
+            long timeLimit = chapterTable?.Time ?? -1;
+            VM.TimeRoot.SetActive(timeLimit > 0);
+            if (timeLimit > 0)
+            {
+                VM.TimeText.text = timeLimit.ToTimeString(@"mm\:ss");
+                var startTime = Context.Time.GetNowTime();
+                _timer = Context.Time.AddLooperTimer(100, (_) =>
+                {
+                    var nowTime = Context.Time.GetNowTime();
+                    var remain = timeLimit - (nowTime - startTime);
+                    if (remain < 0)
+                    {
+                        remain = 0;
+                    }
+                    VM.TimeText.text = remain.ToTimeString(@"mm\:ss");
+                    if (remain <= 0)
+                    { // 结束倒计时
+                        _timer.Cancel();
+                        _timer = null;
+                        EventSingle.Instance.Notify(EventDefine.GameMainMapBossTimeout, chapterId);
+                    }
+                });
+            }
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Business/Runtime/Map/UI/BossBattleInfo/BossBattleInfoView.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: DnlNtXmpWnN1yuvkkelq/QiJbpG0Z59m3ptfbIi/NRrmv/mlZ3OmCA8=
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 15 - 27
Assets/Scripts/Business/Runtime/Map/UI/EntityBattleInfoView.cs

@@ -3,11 +3,23 @@ using FL.Battle.Buffs;
 using UnityEngine;
 using UnityEngine.UI;
 using XGame.Framework.Map;
-using XGame.Framework.ObjectCollection;
 
 namespace FL.Map.UI
 {
-    public class EntityBattleInfoView : EntityView<EntityBattleInfoVM>
+    public interface IEntityBattleInfoView : IEntityView
+    {
+        ITarget Master { get; set; }
+        bool IsMoveable { get; set; }
+        void RefreshHp();
+        void RefreshBuffs();
+    }
+    public interface IEntityBattleInfoVM
+    {
+        Image HpImg { get; }
+        Image ShieldImg { get; }
+        BattleInfoBuffList BuffList { get; }
+    }
+    public abstract class EntityBattleInfoView<TViewModel> : EntityView<TViewModel>, IEntityBattleInfoView where TViewModel : class, IEntityViewModel, IEntityBattleInfoVM
     {
         private ITarget _master;
         public ITarget Master
@@ -31,13 +43,6 @@ namespace FL.Map.UI
             _hpImgSize = VM.HpImg.rectTransform.sizeDelta;
             //Log.Debug($"EntityBattleInfoView size:{_hpImgSize}");
         }
-        protected override void OnEnable(object intent)
-        {
-        }
-        protected override void OnDisable()
-        {
-
-        }
         protected override void OnDispose()
         {
             VM.HpImg.rectTransform.sizeDelta = _hpImgSize;
@@ -71,13 +76,8 @@ namespace FL.Map.UI
                     shieldImg.rectTransform.sizeDelta = size;
                 }
             }
-
-        }
-        public void AddHp(int addVal)
-        {
-            //TODO 动画
-            RefreshHp();
         }
+
         public void RefreshBuffs()
         {
             if (Master.Buffs.IsShieldDirty)
@@ -94,16 +94,4 @@ namespace FL.Map.UI
             XGame.Framework.ListPool.Recycle(buffs);
         }
     }
-    public class EntityBattleInfoVM : EntityViewModel
-    {
-        public Image HpImg { get; private set; }
-        public Image ShieldImg { get; private set; }
-        internal BattleInfoBuffList BuffList { get; private set; }
-        protected override void OnInit(IObjectCollector collector)
-        {
-            HpImg = collector.GetComponent<Image>("HpImg");
-            ShieldImg = collector.GetComponent<Image>("ShieldImg");
-            BuffList = collector.GetComponent<BattleInfoBuffList>("BuffList");
-        }
-    }
 }

+ 4 - 5
Assets/Scripts/Business/Runtime/Map/UI/MainMapUI/MainMapUIVM.cs

@@ -18,7 +18,8 @@ namespace FL.Map.UI
         public TMPro.TextMeshProUGUI MapNameTxt { get; private set; }
         public UnityEngine.UI.Button ChallengeBtn { get; private set; }
         public Transform BossRoot { get; private set; }
-        public GameObject MapProgressRoot { get; private set; }
+        public GameObject MapInfoRoot { get; private set; }
+        public GameObject MapProgress { get; private set; }
 
         protected override void OnInit(IObjectCollector collector)
         {
@@ -26,15 +27,13 @@ namespace FL.Map.UI
             MonsterRoot = collector.GetGameObject("MonsterRoot").transform;
             PlayerRoot = collector.GetGameObject("PlayerRoot").transform;
             CombatValRoot = collector.GetGameObject("CombatValRoot").transform;
-            BossTimeRoot = collector.GetGameObject("BossTimeRoot");
-            BossTimeImg = collector.GetComponent<UnityEngine.UI.Image>("BossTimeImg");
-            BossTimeTxt = collector.GetComponent<TMPro.TextMeshProUGUI>("BossTimeTxt");
             MapProgressImg = collector.GetComponent<UnityEngine.UI.Image>("MapProgressImg");
             CurProgressImg = collector.GetGameObject("CurProgressImg");
             MapNameTxt = collector.GetComponent<TMPro.TextMeshProUGUI>("MapNameTxt");
             ChallengeBtn = collector.GetComponent<UnityEngine.UI.Button>("ChallengeBtn");
+            MapInfoRoot = collector.GetGameObject("MapInfoRoot");
+            MapProgress = collector.GetGameObject("MapProgress");
             BossRoot = collector.GetGameObject("BossRoot").transform;
-            MapProgressRoot = collector.GetGameObject("MapProgressRoot");
         }
     }
 }

+ 16 - 68
Assets/Scripts/Business/Runtime/Map/UI/MainMapUI/MainMapUIView.cs

@@ -1,5 +1,4 @@
 using FairyGUI;
-using System;
 using UnityEngine;
 using XGame;
 using XGame.Database;
@@ -13,13 +12,7 @@ namespace FL.Map.UI
         public Transform PlayerRoot => VM.PlayerRoot;
         public Transform MonsterRoot => VM.MonsterRoot;
         public Transform BossRoot => VM.BossRoot;
-        private Vector2 _bossTimeSize;
-        private long _bossTimeRemain;
-        private long _bossTimeLimit;
-        protected override void OnInited()
-        {
-            _bossTimeSize = VM.BossTimeImg.rectTransform.sizeDelta;
-        }
+
         protected override void OnEnable(object intent)
         {
             VM.Canvas.worldCamera = StageCamera.main;
@@ -31,13 +24,8 @@ namespace FL.Map.UI
             VM.ChallengeBtn.onClick.RemoveAllListeners();
 
             VM.Canvas.worldCamera = null;
-            _bossTimeRemain = 0;
-            _bossTimeLimit = 0;
-        }
-        protected override void OnDispose()
-        {
-            VM.BossTimeImg.rectTransform.sizeDelta = _bossTimeSize;
         }
+
         public void RefreshChapter(int chapterId)
         {
             var chapter = ChapterTableRepo.Get(chapterId);
@@ -46,72 +34,32 @@ namespace FL.Map.UI
                 Log.Error($"找不到ChapterTable. chapterId: {chapterId}");
                 return;
             }
-            var isBoss = chapter.Part_type == 1;
-            if (isBoss)
+            var isBossPart = chapter.Part_type == 1;
+            if ( isBossPart)
             {
                 VM.ChallengeBtn.gameObject.SetActive(false);
             }
+            var isBossFailed = VM.ChallengeBtn.gameObject.activeSelf; // boss挑战失败显示挑战按钮隐藏副本进度条
+            //Log.Debug($"MainMapUIView RefreshChapter Id:{chapterId} isBoss:{isBossPart} isBossFailed:{isBossFailed}");
             // 副本进度只在非boss且挑战按钮隐藏的时候显示
-            VM.MapProgressRoot.SetActive(!isBoss && !VM.ChallengeBtn.gameObject.activeSelf);
-            if (VM.MapProgressRoot.activeSelf)
+            VM.MapInfoRoot.SetActive(!isBossPart);
+            if (VM.MapInfoRoot.activeSelf)
             {
                 VM.MapNameTxt.text = $"{chapter.Name} {chapter.Chapter}-{chapter.Section}";
-                VM.MapProgressImg.fillAmount = (chapter.Part - 1) / 4f;
-                VM.CurProgressImg.SetActive(!isBoss);
-                ((RectTransform)VM.CurProgressImg.transform).anchoredPosition = new Vector2(56 * (chapter.Part - 1) - 112, 0);
-            }
-
-            var chapterTime = chapter.Time;
-            var isTimeLimit = chapterTime > 0;
-            VM.BossTimeRoot.SetActive(isTimeLimit);
-            _bossTimeRemain = 0;
-            if (isTimeLimit)
-            {
-                _bossTimeLimit = chapterTime;
-                VM.BossTimeTxt.text = _bossTimeLimit.ToTimeString(@"mm\:ss");
-                VM.BossTimeImg.rectTransform.sizeDelta = _bossTimeSize;
-            }
-            else
-            {
-                _bossTimeLimit = 0;
-            }
-        }
-        public void StartBossTime()
-        {
-            if (_bossTimeLimit > 0)
-            {
-                _bossTimeRemain = _bossTimeLimit;
+                VM.MapProgress.SetActive(!isBossFailed);
+                if (!isBossFailed )
+                {
+                    VM.MapProgressImg.fillAmount = (chapter.Part - 1) / 4f;
+                    ((RectTransform)VM.CurProgressImg.transform).anchoredPosition = new Vector2(56 * (chapter.Part - 1) - 112, 0);
+                }
             }
         }
+
         public void SetBossFailed(bool isFailed)
         {
             VM.ChallengeBtn.gameObject.SetActive(isFailed);
-            if (isFailed)
-            {
-                VM.MapProgressRoot.SetActive(false);
-            }
-        }
-        public void LateUpdate(int millisecond)
-        {
-            if (_bossTimeRemain > 0)
-            {
-                var last = _bossTimeRemain / 1000;
-                _bossTimeRemain -= millisecond;
-                if (_bossTimeRemain < 0 )
-                {
-                    _bossTimeLimit = 0;
-                    _bossTimeRemain = 0;
-                }
-                var next = _bossTimeRemain / 1000;
-                if (last > next)
-                {
-                    VM.BossTimeTxt.text = _bossTimeRemain.ToTimeString(@"mm\:ss");
-                }
-                var size = _bossTimeSize;
-                size.x = _bossTimeLimit > 0 ? (size.x * _bossTimeRemain / _bossTimeLimit) : 0;
-                VM.BossTimeImg.rectTransform.sizeDelta = size;
-            }
         }
+
         private void OnClickChallengeBtn()
         {
             EventSingle.Instance.Notify(EventDefine.GameMainMapChallengeBoss);

+ 8 - 0
Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: XHIY436uACgBrKfcDfQdQMtuZ409KmyYOjJLg4AwDOOQWCnJ1Z2HQ/w=
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 20 - 0
Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo/MonsterBattleInfoVM.cs

@@ -0,0 +1,20 @@
+using XGame.Framework.Map;
+using XGame.Framework.ObjectCollection;
+
+namespace FL.Map.UI
+{
+    public class MonsterBattleInfoVM : EntityViewModel, IEntityBattleInfoVM
+    {
+        public UnityEngine.UI.Image HpImg { get; private set; }
+        public FL.Map.UI.BattleInfoBuffList BuffList { get; private set; }
+        public UnityEngine.UI.Image ShieldImg { get; private set; }
+
+        protected override void OnInit(IObjectCollector collector)
+        {
+            HpImg = collector.GetComponent<UnityEngine.UI.Image>("HpImg");
+            BuffList = collector.GetComponent<FL.Map.UI.BattleInfoBuffList>("BuffList");
+            ShieldImg = collector.GetComponent<UnityEngine.UI.Image>("ShieldImg");
+
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo/MonsterBattleInfoVM.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: Xiwa5C+qVSgvLGpjUvss7wKm4HflqBV5rgqj1MBJ4napPMVzoCTqMyA=
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 13 - 0
Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo/MonsterBattleInfoView.cs

@@ -0,0 +1,13 @@
+
+namespace FL.Map.UI
+{
+    public class MonsterBattleInfoView : EntityBattleInfoView<MonsterBattleInfoVM>
+    {
+        protected override void OnEnable(object intent)
+        {
+        }
+        protected override void OnDisable()
+        {
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Business/Runtime/Map/UI/MonsterBattleInfo/MonsterBattleInfoView.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: BytLvCz8Uy9asphfNR3VfwIdYDk2jj2kYXe3QmqmPuvh3RyIsatcXII=
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: Dy9LtS3+V3g1GWmohvKvff3Z3ywRrWTJngcCrXwIUPWB+8uGflGt8b0=
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 21 - 0
Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo/PlayerBattleInfoVM.cs

@@ -0,0 +1,21 @@
+using UnityEngine;
+using XGame.Framework.Map;
+using XGame.Framework.ObjectCollection;
+
+namespace FL.Map.UI
+{
+    public class PlayerBattleInfoVM : EntityViewModel, IEntityBattleInfoVM
+    {
+        public UnityEngine.UI.Image HpImg { get; private set; }
+        public FL.Map.UI.BattleInfoBuffList BuffList { get; private set; }
+        public UnityEngine.UI.Image ShieldImg { get; private set; }
+
+        protected override void OnInit(IObjectCollector collector)
+        {
+            HpImg = collector.GetComponent<UnityEngine.UI.Image>("HpImg");
+            BuffList = collector.GetComponent<FL.Map.UI.BattleInfoBuffList>("BuffList");
+            ShieldImg = collector.GetComponent<UnityEngine.UI.Image>("ShieldImg");
+
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo/PlayerBattleInfoVM.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: CXpM4SKoWn4xgcZvv3cNZOGOrG8MI+hLdre+l5uLugnT1QI6nYCaRwg=
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 13 - 0
Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo/PlayerBattleInfoView.cs

@@ -0,0 +1,13 @@
+
+namespace FL.Map.UI
+{
+    public class PlayerBattleInfoView : EntityBattleInfoView<PlayerBattleInfoVM>
+    {
+        protected override void OnEnable(object intent)
+        {
+        }
+        protected override void OnDisable()
+        {
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Business/Runtime/Map/UI/PlayerBattleInfo/PlayerBattleInfoView.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: BilKsHuuVS+AXPrcoqJDLopiE58C5FBYNRMB/gD5TbNkrhKsbaM7WCg=
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 7 - 16
Assets/Scripts/Business/Runtime/Nodes/GameMain/MapComponent.cs

@@ -20,10 +20,7 @@ namespace FL.Nodes.GameMain
         private int _chapterId;
         private EMapSchedule _schedule;
         private ITimer _monsterTimer;
-        /// <summary>
-        /// boss战斗倒计时
-        /// </summary>
-        private ITimer _bossTimer;
+
         /// <summary>
         /// 是否挑战boss失败
         /// 失败后战斗进入该关卡的小怪节点循环
@@ -66,6 +63,7 @@ namespace FL.Nodes.GameMain
             EventSingle.Instance.AddListener(EventDefine.PartnerUp, OnPartnerUp);
             EventSingle.Instance.AddListener(EventDefine.PartnerPlanChange, OnPartnersChanged);
             EventSingle.Instance.AddListener(EventDefine.PartnerWearAll, OnPartnersChanged);
+            EventSingle.Instance.AddListener(EventDefine.GameMainMapBossTimeout, OnBossTimeout);
             EventSingle.Instance.AddListener(EventDefine.GameMainMapChallengeBoss, OnChallengeBoss);
             //InitMonsters();
             StartMap(PlayerData.Instance.chapterId);
@@ -79,14 +77,13 @@ namespace FL.Nodes.GameMain
             EventSingle.Instance.RemoveListener(EventDefine.PartnerUp, OnPartnerUp);
             EventSingle.Instance.RemoveListener(EventDefine.PartnerPlanChange, OnPartnersChanged);
             EventSingle.Instance.RemoveListener(EventDefine.PartnerWearAll, OnPartnersChanged);
+            EventSingle.Instance.RemoveListener(EventDefine.GameMainMapBossTimeout, OnBossTimeout);
             EventSingle.Instance.RemoveListener(EventDefine.GameMainMapChallengeBoss, OnChallengeBoss);
 
             _player = null;
             _partnerMap?.Clear();
             _monsterTimer?.Cancel();
             _monsterTimer = null;
-            _bossTimer?.Cancel();
-            _bossTimer = null;
             _isBossFailed = false;
             _isBossChallenge = false;
             _monsterMap?.Clear();
@@ -200,14 +197,6 @@ namespace FL.Nodes.GameMain
                 Context.Time.AddDelayTimer(1000, () =>
                 { //1秒后自动关闭
                     Context.UI.Close(UIKeys.MainBossLaiXi);
-                    if (chapter.Time > 0)
-                    {// boss战斗倒计时
-                        _bossTimer = Context.Time.AddDelayTimer(chapter.Time, () =>
-                        {
-                            CombatFailed();
-                        });
-                        EventSingle.Instance.Notify(EventDefine.GameMainMapBossStart, chapter.Id);
-                    }
                 });
             }
             EventSingle.Instance.Notify(EventDefine.GameMainMapLoadEntities, dto);
@@ -514,6 +503,10 @@ namespace FL.Nodes.GameMain
             EventSingle.Instance.Notify(EventDefine.GameMainMapLoadEntities, dto);
 
         }
+        private void OnBossTimeout(int eventId, object args)
+        {
+            CombatFailed();
+        }
         private void OnChallengeBoss(int eventId, object args)
         {
             CombatFailed(true);
@@ -590,8 +583,6 @@ namespace FL.Nodes.GameMain
             { //boss关卡
                 _isBossFailed = false;
                 //TODO 结算
-                _bossTimer?.Cancel();
-                _bossTimer = null;
                 Context.UI.OpenAsync(UIKeys.MainBattleOverVictory);
                 Context.Time.AddDelayTimer(2000, () =>
                 { //2秒后自动关闭