Explorar o código

Merge branch 'master' of http://192.168.123.2:3000/ck/XiuXianGame

# Conflicts:
#	UserSettings/Layouts/default-2022.dwlt   resolved by origin/master(远端) version
李桃 hai 1 mes
pai
achega
e06b92b910
Modificáronse 32 ficheiros con 4350 adicións e 485 borrados
  1. 1 1
      Assets/Art/VFX/FXMeshs/shan/New Material 1.mat
  2. 1 1
      Assets/Art/VFX/FXMeshs/shan/New Material.mat
  3. 25 2
      Assets/Art/VFX/FXPrefabs/TestZhiDan.prefab
  4. 24 1
      Assets/Art/VFX/FXPrefabs/TestZhiDan2.prefab
  5. 114 3
      Assets/Res/CombatScenes/CombatRoot.prefab
  6. 90 0
      Assets/Res/LevelSecne/shan1.prefab
  7. 7 0
      Assets/Res/LevelSecne/shan1.prefab.meta
  8. 1469 78
      Assets/Scenes/testCombat.scene
  9. 10 7
      Assets/Scripts/GameLogic/Combat/CombatTool/CombatCameraControllder.cs
  10. 27 0
      Assets/Scripts/GameLogic/Combat/CombatTool/CombatPathMono.cs
  11. 3 0
      Assets/Scripts/GameLogic/Combat/CombatTool/CombatPathMono.cs.meta
  12. 140 33
      Assets/Scripts/GameLogic/Combat/CombatTool/CombatSenceController.cs
  13. 90 0
      Assets/Scripts/GameLogic/Combat/CombatTool/CombatSencePath.cs
  14. 3 0
      Assets/Scripts/GameLogic/Combat/CombatTool/CombatSencePath.cs.meta
  15. 48 19
      Assets/Scripts/GameLogic/Combat/CombatTool/MagicWeaponCollisionInfo.cs
  16. 57 30
      Assets/Scripts/GameLogic/Combat/CombatTool/MagicWeaponCombatSence.cs
  17. 2 44
      Assets/Scripts/GameLogic/Combat/CombatType/CombatTypeBasic.cs
  18. 17 17
      Assets/Scripts/GameLogic/Combat/CombatType/LevelBattleCombatType.cs
  19. 13 15
      Assets/Scripts/GameLogic/Combat/CombatType/TestCombatType.cs
  20. 34 9
      Assets/Scripts/GameLogic/Combat/Hero/CombatHeroAi.cs
  21. 4 1
      Assets/Scripts/GameLogic/Combat/Hero/CombatMagicWeaponEntity.cs
  22. 1 0
      Assets/Scripts/GameLogic/Combat/Hero/MagicWeaponAi.cs
  23. 1 0
      Assets/Scripts/GameLogic/Combat/Hero/State/CombatHeroIdleState.cs
  24. 10 15
      Assets/Scripts/GameLogic/Combat/Hero/State/CombatHeroMoveState.cs
  25. 27 0
      Assets/Scripts/GameLogic/Combat/Hero/State/MagicWeaponAttState.cs
  26. 3 0
      Assets/Scripts/GameLogic/Combat/Hero/State/MagicWeaponAttState.cs.meta
  27. 13 11
      Assets/Scripts/GameLogic/Combat/Hero/State/MagicWeaponIdleState.cs
  28. 8 6
      Assets/Scripts/GameLogic/Combat/Hero/State/MagicWeaponMoveState.cs
  29. 40 22
      Assets/Scripts/GameLogic/Paritcle/ParitcleLogic/FxParabolaBulletLogic.cs
  30. 0 0
      Assets/StreamingAssets/assetConfig.txt
  31. 2067 170
      UserSettings/Layouts/default-2022.dwlt
  32. 1 0
      XiuXianGame.sln.DotSettings.user

+ 1 - 1
Assets/Art/VFX/FXMeshs/shan/New Material 1.mat

@@ -102,7 +102,7 @@ Material:
     - _GlossMapScale: 0
     - _Glossiness: 0
     - _GlossyReflections: 0
-    - _H: 1
+    - _H: 0.83
     - _Metallic: 0
     - _OcclusionStrength: 1
     - _Parallax: 0.005

+ 1 - 1
Assets/Art/VFX/FXMeshs/shan/New Material.mat

@@ -102,7 +102,7 @@ Material:
     - _GlossMapScale: 0
     - _Glossiness: 0
     - _GlossyReflections: 0
-    - _H: -2.96
+    - _H: 0.83
     - _Metallic: 0
     - _OcclusionStrength: 1
     - _Parallax: 0.005

+ 25 - 2
Assets/Art/VFX/FXPrefabs/TestZhiDan.prefab

@@ -61,6 +61,7 @@ MeshRenderer:
   m_RayTraceProcedural: 0
   m_virtualGeometry: 0
   m_virtualGeometryShadow: 0
+  m_ShadingRate: 0
   m_RenderingLayerMask: 1
   m_RendererPriority: 0
   m_Materials:
@@ -96,6 +97,7 @@ GameObject:
   m_Component:
   - component: {fileID: 5958988623178059938}
   - component: {fileID: 7891204510165700475}
+  - component: {fileID: -1234065048472891782}
   m_Layer: 0
   m_HasEditorInfo: 1
   m_Name: TestZhiDan
@@ -103,7 +105,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 0
+  m_IsActive: 1
 --- !u!4 &5958988623178059938
 Transform:
   m_ObjectHideFlags: 0
@@ -137,7 +139,28 @@ MonoBehaviour:
   isPenetrate: 0
   isUseCustomTargetEndPos: 0
   customTargetEndPosIndex: 0
-  speed: 60
+  speed: 10
   isTriggerGroundEnd: 0
   GroundHitFxName: 
   maxDis: 20
+--- !u!65 &-1234065048472891782
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7418631031068801307}
+  m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
+  m_IsTrigger: 1
+  m_ProvidesContacts: 0
+  m_Enabled: 1
+  serializedVersion: 3
+  m_Size: {x: 0.5, y: 0.5, z: 0.5}
+  m_Center: {x: 0, y: 0, z: 0}

+ 24 - 1
Assets/Art/VFX/FXPrefabs/TestZhiDan2.prefab

@@ -61,6 +61,7 @@ MeshRenderer:
   m_RayTraceProcedural: 0
   m_virtualGeometry: 0
   m_virtualGeometryShadow: 0
+  m_ShadingRate: 0
   m_RenderingLayerMask: 1
   m_RendererPriority: 0
   m_Materials:
@@ -96,6 +97,7 @@ GameObject:
   m_Component:
   - component: {fileID: 5958988623178059938}
   - component: {fileID: 7891204510165700475}
+  - component: {fileID: -8613829336733008137}
   m_Layer: 0
   m_HasEditorInfo: 1
   m_Name: TestZhiDan2
@@ -137,7 +139,28 @@ MonoBehaviour:
   isPenetrate: 0
   isUseCustomTargetEndPos: 0
   customTargetEndPosIndex: 0
-  speed: 60
+  speed: 10
   isTriggerGroundEnd: 0
   GroundHitFxName: 
   maxDis: 20
+--- !u!65 &-8613829336733008137
+BoxCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7418631031068801307}
+  m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
+  m_IsTrigger: 1
+  m_ProvidesContacts: 0
+  m_Enabled: 1
+  serializedVersion: 3
+  m_Size: {x: 0.5, y: 0.5, z: 0.5}
+  m_Center: {x: 0, y: 0, z: 0}

+ 114 - 3
Assets/Res/CombatScenes/CombatRoot.prefab

@@ -30,10 +30,11 @@ Transform:
   m_GameObject: {fileID: 65994213146227239}
   serializedVersion: 2
   m_LocalRotation: {x: 0.17364816, y: 0, z: 0, w: 0.9848078}
-  m_LocalPosition: {x: 0, y: 6.32, z: -11.93}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
-  m_Children: []
+  m_Children:
+  - {fileID: 4445399462343019278}
   m_Father: {fileID: 5344611500333309412}
   m_LocalEulerAnglesHint: {x: 20, y: 0, z: 0}
 --- !u!20 &5136129069556543016
@@ -68,7 +69,7 @@ Camera:
     width: 1
     height: 1
   near clip plane: 0.3
-  far clip plane: 1000
+  far clip plane: 100
   field of view: 60
   orthographic: 0
   orthographic size: 5
@@ -204,3 +205,113 @@ MonoBehaviour:
   TraumaExponent: 1
   MaximumAngularShake: {x: 5, y: 5, z: 5}
   MaximumTranslationShake: {x: 0.75, y: 0.75, z: 0.75}
+--- !u!1 &9046924969066059369
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 7
+  m_Component:
+  - component: {fileID: 4445399462343019278}
+  - component: {fileID: 657575379860474369}
+  - component: {fileID: 5043772495200093334}
+  - component: {fileID: 579666311798898738}
+  m_Layer: 0
+  m_HasEditorInfo: 1
+  m_Name: "\u5730\u9762"
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &4445399462343019278
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 9046924969066059369}
+  serializedVersion: 2
+  m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
+  m_LocalPosition: {x: 0, y: 0, z: 99}
+  m_LocalScale: {x: 10, y: 1, z: 7}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 6818137407374040233}
+  m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
+--- !u!33 &657575379860474369
+MeshFilter:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 9046924969066059369}
+  m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
+--- !u!23 &5043772495200093334
+MeshRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 9046924969066059369}
+  m_Enabled: 1
+  m_CastShadows: 1
+  m_ReceiveShadows: 1
+  m_DynamicOccludee: 1
+  m_StaticShadowCaster: 0
+  m_MotionVectors: 1
+  m_LightProbeUsage: 1
+  m_ReflectionProbeUsage: 1
+  m_RayTracingMode: 2
+  m_RayTraceProcedural: 0
+  m_virtualGeometry: 0
+  m_virtualGeometryShadow: 0
+  m_ShadingRate: 0
+  m_RenderingLayerMask: 1
+  m_RendererPriority: 0
+  m_Materials:
+  - {fileID: 2100000, guid: 1388b1b9d8e6e094f8200ed6165c226d, type: 2}
+  m_StaticBatchInfo:
+    firstSubMesh: 0
+    subMeshCount: 0
+  m_StaticBatchRoot: {fileID: 0}
+  m_ProbeAnchor: {fileID: 0}
+  m_LightProbeVolumeOverride: {fileID: 0}
+  m_ScaleInLightmap: 1
+  m_ReceiveGI: 1
+  m_PreserveUVs: 0
+  m_IgnoreNormalsForChartDetection: 0
+  m_ImportantGI: 0
+  m_StitchLightmapSeams: 1
+  m_SelectedEditorRenderState: 3
+  m_MinimumChartSize: 4
+  m_AutoUVMaxDistance: 0.5
+  m_AutoUVMaxAngle: 89
+  m_LightmapParameters: {fileID: 0}
+  m_SortingLayerID: 0
+  m_SortingLayer: 0
+  m_SortingOrder: 0
+  m_AdditionalVertexStreams: {fileID: 0}
+--- !u!64 &579666311798898738
+MeshCollider:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 9046924969066059369}
+  m_Material: {fileID: 0}
+  m_IncludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_ExcludeLayers:
+    serializedVersion: 2
+    m_Bits: 0
+  m_LayerOverridePriority: 0
+  m_IsTrigger: 0
+  m_ProvidesContacts: 0
+  m_Enabled: 0
+  serializedVersion: 5
+  m_Convex: 0
+  m_CookingOptions: 30
+  m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}

+ 90 - 0
Assets/Res/LevelSecne/shan1.prefab

@@ -0,0 +1,90 @@
+%YAML 1.1
+%TAG !u! tag:yousandi.cn,2023:
+--- !u!1 &8522697907671451350
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 7
+  m_Component:
+  - component: {fileID: 675038714668249822}
+  - component: {fileID: 3336624065992785025}
+  - component: {fileID: 1324998216131329867}
+  m_Layer: 10
+  m_HasEditorInfo: 1
+  m_Name: shan1
+  m_TagString: dimian
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &675038714668249822
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8522697907671451350}
+  serializedVersion: 2
+  m_LocalRotation: {x: 0.56582814, y: 0.4240737, z: 0.4240737, w: -0.56582814}
+  m_LocalPosition: {x: 5.4, y: -3.72, z: 22.98}
+  m_LocalScale: {x: 0.7017995, y: 0.7017995, z: 0.91409373}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_LocalEulerAnglesHint: {x: -90, y: 0, z: 286.299}
+--- !u!33 &3336624065992785025
+MeshFilter:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8522697907671451350}
+  m_Mesh: {fileID: -1392497347730742852, guid: a2f67d88567f41b4fb75d2fa1aed34e1, type: 3}
+--- !u!23 &1324998216131329867
+MeshRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8522697907671451350}
+  m_Enabled: 1
+  m_CastShadows: 0
+  m_ReceiveShadows: 1
+  m_DynamicOccludee: 1
+  m_StaticShadowCaster: 0
+  m_MotionVectors: 1
+  m_LightProbeUsage: 1
+  m_ReflectionProbeUsage: 1
+  m_RayTracingMode: 2
+  m_RayTraceProcedural: 0
+  m_virtualGeometry: 0
+  m_virtualGeometryShadow: 0
+  m_ShadingRate: 0
+  m_RenderingLayerMask: 1
+  m_RendererPriority: 0
+  m_Materials:
+  - {fileID: 2100000, guid: 606198080c63f6248aa7119c3ad67bfc, type: 2}
+  - {fileID: 2100000, guid: 606198080c63f6248aa7119c3ad67bfc, type: 2}
+  m_StaticBatchInfo:
+    firstSubMesh: 0
+    subMeshCount: 0
+  m_StaticBatchRoot: {fileID: 0}
+  m_ProbeAnchor: {fileID: 0}
+  m_LightProbeVolumeOverride: {fileID: 0}
+  m_ScaleInLightmap: 1
+  m_ReceiveGI: 1
+  m_PreserveUVs: 0
+  m_IgnoreNormalsForChartDetection: 0
+  m_ImportantGI: 0
+  m_StitchLightmapSeams: 1
+  m_SelectedEditorRenderState: 3
+  m_MinimumChartSize: 4
+  m_AutoUVMaxDistance: 0.5
+  m_AutoUVMaxAngle: 89
+  m_LightmapParameters: {fileID: 0}
+  m_SortingLayerID: 0
+  m_SortingLayer: 0
+  m_SortingOrder: 0
+  m_AdditionalVertexStreams: {fileID: 0}

+ 7 - 0
Assets/Res/LevelSecne/shan1.prefab.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: WS5KtSqtVXkU7NUvbaQqr+Ge4HL4TVpF/qEkrXJssFKGXCa2ErgJGM0dz9pS
+PrefabImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1469 - 78
Assets/Scenes/testCombat.scene


+ 10 - 7
Assets/Scripts/GameLogic/Combat/CombatTool/CombatCameraControllder.cs

@@ -23,7 +23,7 @@ namespace GameLogic.Combat.CombatTool
         }
 
         private int _followHeroId = -1;
-      
+
 
         public bool isStop;
 
@@ -71,14 +71,16 @@ namespace GameLogic.Combat.CombatTool
 
                 if (combatHeroEntities.isDie)
                 {
-                    CombatHeroEntity[] allHero= combatController.CombatHeroController.GetHero(false);
-                    if (allHero != null&& allHero.Length > 0)
+                    CombatHeroEntity[] allHero = combatController.CombatHeroController.GetHero(false);
+                    if (allHero != null && allHero.Length > 0)
                     {
-                        combatHeroEntities=  allHero[0];
+                        combatHeroEntities = allHero[0];
                     }
                 }
 
-                Vector3 p = combatHeroEntities.dotPos;
+                Vector3 p = combatHeroEntities.GameObject.transform.TransformPoint(new Vector3(0, 8, -10));
+                // Vector3 p = combatHeroEntities.dotPos;
+
                 // bool isHero = false;
                 // if (_followHeroId != -1)
                 // {
@@ -113,10 +115,11 @@ namespace GameLogic.Combat.CombatTool
                 //     p /= c;
                 // }
 
-            
 
+                root.rotation = Quaternion.Lerp(root.rotation, combatHeroEntities.GameObject.transform.rotation,
+                    0.3f);
                 // Vector3 tp = root.TransformVector(new Vector3(0, 0, -20));
-                root.position = Vector3.Lerp(root.position, p, 0.05f);
+                root.position = Vector3.Lerp(root.position, p, 0.3f);
             }
         }
 

+ 27 - 0
Assets/Scripts/GameLogic/Combat/CombatTool/CombatPathMono.cs

@@ -0,0 +1,27 @@
+using System.Collections.Generic;
+using Core.Utility;
+using UnityEngine;
+
+namespace GameLogic.Combat.CombatTool
+{
+    public class CombatPathMono: MonoBehaviour
+    {
+        // public Transform[] Transforms;
+        public CombatSencePath BesselPath;
+
+        private void OnDrawGizmos()
+        {
+            if (BesselPath == null)
+            {
+               return;
+            }
+            float bl = 1.0f / 300;
+            for (float i = 0; i < 300 - 1; i++)
+            {
+                Vector3 pos1 = BesselPath.GetValue(i * bl);
+                Vector3 pos2 = BesselPath.GetValue((i + 1) * bl);
+                Debug.DrawLine(pos1, pos2, Color.red);
+            }
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/GameLogic/Combat/CombatTool/CombatPathMono.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 509a8a7cfb9f4831906d6950a40cf51e
+timeCreated: 1741164726

+ 140 - 33
Assets/Scripts/GameLogic/Combat/CombatTool/CombatSenceController.cs

@@ -1,76 +1,183 @@
 using System;
 using System.Collections.Generic;
+using Core.Utility;
 using Fort23.Core;
 using GameLogic.CombatScenesTool;
-
 using UnityEngine;
+using Random = UnityEngine.Random;
 
 namespace GameLogic.Combat.CombatTool
 {
-    public class CombatSenceController: IDisposable
+    public class CombatSenceController : IDisposable
     {
         private AssetHandle scenesHandle;
-        private AssetHandle scenesHandle2;
-        private AssetHandle scenesHandle3;
+
         public GameObject scenes1;
-   
 
-        private float zoff;
 
-        private int index = 0;
-        private List<CombatScenesConfig> _allCombatScenesConfigs = new List<CombatScenesConfig>();
+        public CombatSencePath currBesselPath;
+
+        public CombatSencePath NextBesselPath;
 
-        public CombatScenesConfig _currConfig;
+        private float moveTime;
+        private Vector3 lasetPos;
+        private float maxD = 100;
+        private Vector3 lasetDir;
 
-        private int nextConfigIndex;
+        public float currTime;
+        public Transform moveRoot;
 
         public async CTask InitScenes()
         {
+            GameObject gameObject = new GameObject("mvoeRoot");
+
+            moveRoot = gameObject.transform;
             CTaskAwaitBuffer cTaskAwaitBuffer = new CTaskAwaitBuffer();
-            cTaskAwaitBuffer.AddTask(AssetBundleLoadManager.Instance.LoadAssetAsyncTask<GameObject>("LevelBattle1.prefab",
+            cTaskAwaitBuffer.AddTask(AssetBundleLoadManager.Instance.LoadAssetAsyncTask<GameObject>(
+                "shan1.prefab",
                 delegate(AssetHandle handle)
                 {
                     scenesHandle = handle;
                     scenes1 = scenesHandle.AssetObject<GameObject>();
-                    scenes1.SetActive(true);
-                    CombatScenesConfig combatScenesConfig = scenes1.GetComponent<CombatScenesConfig>();
-                    _allCombatScenesConfigs.Add(combatScenesConfig);
+                    scenes1.SetActive(false);
                 }));
-          
-       
-           
+            lasetDir = Vector3.forward;
+
             await cTaskAwaitBuffer.WaitAll();
-            MoveToNextConfig();
+            currBesselPath = InitBesselPath(lasetPos);
         }
 
 
-        public CombatScenesConfig MoveToNextConfig()
+        private CombatSencePath InitBesselPath(Vector3 satrtPos)
+        {
+            CombatSencePath besselPath = new CombatSencePath();
+
+            Vector3 target = satrtPos + lasetDir.normalized * maxD;
+            // if (offx == 0)
+            {
+                besselPath.SetPos(satrtPos, target);
+            }
+            Vector3 p = besselPath.GetValue(0.99f);
+            lasetDir = (target - p).normalized;
+            GameObject gameObject = new GameObject("path");
+            gameObject.transform.position = satrtPos;
+            CombatPathMono combatPathMono = gameObject.AddComponent<CombatPathMono>();
+            combatPathMono.BesselPath = besselPath;
+            InitZhuangSHi(besselPath);
+            return besselPath;
+        }
+
+        private CombatSencePath InitBesselPath(Vector3 satrtPos, float offx)
         {
-            nextConfigIndex++;
-            nextConfigIndex %= _allCombatScenesConfigs.Count;
-            return _currConfig=_allCombatScenesConfigs[nextConfigIndex];
+            CombatSencePath besselPath = new CombatSencePath();
+            Vector3 dir = Quaternion.LookRotation(lasetDir) * new Vector3(offx, 0, 1);
+            Vector3 target = satrtPos + dir.normalized * maxD;
+            Vector3 dir2 = Quaternion.LookRotation(lasetDir) * new Vector3(offx*-1, 0, 1);
+            Vector3 centre =   satrtPos + dir2.normalized * maxD;
+            // if (offx == 0)
+            {
+                besselPath.SetPos(satrtPos, centre, target);
+            }
+            Vector3 p = besselPath.GetValue(0.99f);
+            lasetDir = (target - p).normalized;
+            GameObject gameObject = new GameObject("path");
+            gameObject.transform.position = satrtPos;
+            CombatPathMono combatPathMono = gameObject.AddComponent<CombatPathMono>();
+            combatPathMono.BesselPath = besselPath;
+            InitZhuangSHi(besselPath);
+            return besselPath;
         }
 
-        public void NextScenesShow()
+        private void InitZhuangSHi(CombatSencePath besselPath)
         {
-            index++;
-            index %= _allCombatScenesConfigs.Count;
-            zoff -= 97;
-            _allCombatScenesConfigs[index].transform.position = new Vector3(0, 0, zoff);
+            int count = Random.Range(30, 40);
+            for (int i = 0; i < count; i++)
+            {
+                float md = Random.Range(0.1f, 0.9f);
+                Vector3 p = besselPath.GetValue(md);
+                Vector3 p2 = besselPath.GetValue(md - 0.01f);
+                Vector3 dir = (p - p2);
+                Vector3 cross = Vector3.Cross(dir, Vector3.up);
+                cross = cross.normalized;
+                int odds = Random.Range(0, 100);
+                p += cross * Random.Range(8, 25) * (odds < 50 ? 1 : -1);
+                GameObject g = GameObject.Instantiate(scenes1);
+                g.SetActive(true);
+                g.transform.position = p + new Vector3(0, Random.Range(-7, -4), 0);
+                g.transform.eulerAngles = new Vector3(-90, 0, Random.Range(0, 360));
+            }
         }
 
-     
+        public Vector3 GetTarget(float time)
+        {
+            if (time > 1)
+            {
+                if (NextBesselPath == null)
+                {
+                    NextBesselPath = InitBesselPath(currBesselPath.b, 0);
+                }
+
+                time = time % 1;
+                return NextBesselPath.GetValue(time);
+            }
+            else
+            {
+                return currBesselPath.GetValue(time);
+            }
+        }
+
+        public Vector3 Move(float speedTime)
+        {
+            currTime += speedTime;
+            Vector3 targetPos = Vector3.zero;
+            if (currTime > 0.2f)
+            {
+                if (NextBesselPath == null)
+                {
+                    int odds = Random.Range(0, 100);
+                    if (odds < 50)
+                    {
+                        NextBesselPath = InitBesselPath(currBesselPath.b, -1);
+                    }
+                    else
+                    {
+                        NextBesselPath = InitBesselPath(currBesselPath.b);
+                    }
+                }
+            }
+
+            if (currTime > 1)
+            {
+                if (NextBesselPath == null)
+                {
+                    NextBesselPath = InitBesselPath(currBesselPath.b, -1);
+                }
+
+                currTime = currTime % 1;
+                targetPos = NextBesselPath.GetValue(currTime);
+                currBesselPath = NextBesselPath;
+                NextBesselPath = null;
+            }
+            else
+            {
+                targetPos = currBesselPath.GetValue(currTime);
+            }
+            moveRoot.transform.position = targetPos;
+            return targetPos;
+        }
+
+        public void Update(float t)
+        {
+            
+        }
+
+
         public void Dispose()
         {
             if (scenesHandle != null)
             {
                 scenesHandle.Release();
             }
-            if (scenesHandle2 != null)
-            {
-                scenesHandle2.Release();
-            }
-       
         }
     }
 }

+ 90 - 0
Assets/Scripts/GameLogic/Combat/CombatTool/CombatSencePath.cs

@@ -0,0 +1,90 @@
+
+
+using System;
+using UnityEngine;
+
+namespace GameLogic.Combat.CombatTool
+{
+    [Serializable]
+    public class CombatSencePath
+    {
+        public Vector3 a;
+        public Vector3 b;
+        private Vector3 Centre;
+        private bool isCentre;
+
+
+        public void SetPos(Vector3 startPos, Vector3 target)
+        {
+            a = startPos;
+            b = target;
+            isCentre = false;
+        }
+
+        public void SetPos(Vector3 startPos, Vector3 centre, Vector3 target)
+        {
+            a = startPos;
+            Centre = centre;
+            b = target;
+            isCentre = true;
+        }
+
+        // private float GetPathCount(Vector3 p1, Vector3 p2, Vector3 p3, int count)
+        // {
+        //     float step = 1f / count;
+        //     Vector3 startPos = p1;
+        //     float d = 0;
+        //     for (int i = 1; i < count; i++)
+        //     {
+        //         float t = i * count;
+        //         Vector3 a = Vector3.Lerp(p1, p2, t);
+        //         Vector3 b = Vector3.Lerp(a, p3, t);
+        //         d += Vector3.Distance(startPos, b);
+        //         startPos = b;
+        //     }
+        //
+        //
+        //     return d;
+        // }
+
+        // public float GetPathCount(int count)
+        // {
+        //     float step = 1f / count;
+        //     Vector3 startPos = GetValue(0);
+        //     float d = 0;
+        //     for (int i = 1; i < count; i++)
+        //     {
+        //         Vector3 currPos = GetValue(step * i);
+        //         d += Vector3.Distance(startPos, currPos);
+        //     }
+        //
+        //     return d;
+        // }
+
+        public Vector3 GetValue(float t)
+        {
+            float t1 = t;
+            if (t1 > 1)
+            {
+                t1 = 1;
+            }
+
+            if (t1 < 0)
+            {
+                t1 = 0;
+            }
+
+
+            if (isCentre)
+            {
+                Vector3 p1 = Vector3.Lerp(a, Centre, t1);
+                Vector3 p2 = Vector3.Lerp(p1, b, t1);
+                return p2;
+            }
+            else
+            {
+                return Vector3.Lerp(a, b, t1);
+            }
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/GameLogic/Combat/CombatTool/CombatSencePath.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 090a26d5745646c8a15cb76a658d02b5
+timeCreated: 1741158144

+ 48 - 19
Assets/Scripts/GameLogic/Combat/CombatTool/MagicWeaponCollisionInfo.cs

@@ -1,4 +1,5 @@
 using Fort23.Core;
+using Fort23.UTool;
 using GameLogic.Combat.Hero;
 using GameLogic.Combat.Hero.State;
 
@@ -9,26 +10,59 @@ namespace GameLogic.Combat.CombatTool
         public CombatMagicWeaponEntity a;
         public CombatMagicWeaponEntity b;
 
+        public int id;
         protected float _currTime;
 
+        /// <summary>
+        /// 状态 0=等待状态 1=飞行状态 2=碰撞状态
+        /// </summary>
+        public int State;
+
+        public void Init(CombatMagicWeaponEntity a, CombatMagicWeaponEntity b,int id)
+        {
+            this.id = id;
+            this.a = a;
+            this.b = b;
+            a.MagicWeaponCollisionId = id;
+            b.MagicWeaponCollisionId = id;
+            State = 0;
+        }
+
         public void Update(float t)
         {
-            _currTime += t;
-            if (_currTime > 0.1f)
+            if (State == 0)
             {
-                _currTime = 0;
-                if (a != null)
+                if (a.CombatAIBasic.stateControl.CurrStateName.Equals(CombatHeroStateType.idle) &&
+                    b.CombatAIBasic.stateControl.CurrStateName.Equals(CombatHeroStateType.idle))
                 {
-                    a.ReduceHp(1);
+                    State = 1;
                 }
+            }
 
-                if (b != null)
+            if (State == 2)
+            {
+                _currTime += t;
+                if (_currTime > 0.1f)
                 {
-                    b.ReduceHp(1);
+                    _currTime = 0;
+                    if (a != null)
+                    {
+                        a.ReduceHp(1);
+                    }
+
+                    if (b != null)
+                    {
+                        b.ReduceHp(1);
+                    }
                 }
             }
         }
 
+        public void SetState(int state)
+        {
+            State = state;
+        }
+
         public override void ActiveObj()
         {
         }
@@ -41,24 +75,19 @@ namespace GameLogic.Combat.CombatTool
 
         public void Finish()
         {
+            LogTool.Log("碰撞完成");
             if (a.HpBl > 0)
             {
-                MagicWeaponMoveState.MagicWeaponMoveStateData magicWeaponMoveStateData =
-                    CObjectPool.Instance.Fetch<MagicWeaponMoveState.MagicWeaponMoveStateData>();
-                magicWeaponMoveStateData.trigger = true;
-                magicWeaponMoveStateData.triggerTime = 0.5f;
-                a.CombatAIBasic.ChangeState(CombatHeroStateType.move,magicWeaponMoveStateData);
-                CObjectPool.Instance.Recycle(magicWeaponMoveStateData);
+                a.CombatAIBasic.ChangeState(CombatHeroStateType.att);
+                a.MagicWeaponCollisionId = -1;
+                b.MagicWeaponCollisionId = -1;
             }
 
             if (b.HpBl > 0)
             {
-                MagicWeaponMoveState.MagicWeaponMoveStateData magicWeaponMoveStateData =
-                    CObjectPool.Instance.Fetch<MagicWeaponMoveState.MagicWeaponMoveStateData>();
-                magicWeaponMoveStateData.trigger = true;
-                magicWeaponMoveStateData.triggerTime = 0.5f;
-                b.CombatAIBasic.ChangeState(CombatHeroStateType.move,magicWeaponMoveStateData);
-                CObjectPool.Instance.Recycle(magicWeaponMoveStateData);
+                b.CombatAIBasic.ChangeState(CombatHeroStateType.att);
+                a.MagicWeaponCollisionId = -1;
+                b.MagicWeaponCollisionId = -1;
             }
         }
     }

+ 57 - 30
Assets/Scripts/GameLogic/Combat/CombatTool/MagicWeaponCombatSence.cs

@@ -4,6 +4,7 @@ using Fort23.Core;
 using GameLogic.Combat.Hero;
 using GameLogic.Combat.Hero.State;
 using UnityEngine;
+using Utility;
 
 namespace GameLogic.Combat.CombatTool
 {
@@ -15,7 +16,7 @@ namespace GameLogic.Combat.CombatTool
         private BetterList<CombatMagicWeaponEntity> _enemyMagicWeaponList = new BetterList<CombatMagicWeaponEntity>();
         private BetterList<CombatMagicWeaponEntity> _playerMagicWeaponList = new BetterList<CombatMagicWeaponEntity>();
 
-       
+
         /// <summary>
         /// 战斗包围盒 minX miny maxx maxy
         /// </summary>
@@ -31,8 +32,10 @@ namespace GameLogic.Combat.CombatTool
         /// </summary>
         public Vector3 enemyEnterCombatPos;
 
-        private BetterList<MagicWeaponCollisionInfo> magicWeaponCollisionInfoList =
-            new BetterList<MagicWeaponCollisionInfo>();
+        private Map<int, MagicWeaponCollisionInfo> magicWeaponCollisionInfoList =
+            new Map<int, MagicWeaponCollisionInfo>();
+
+        private int MagicWeaponCollisionID;
 
         public void Init()
         {
@@ -46,20 +49,13 @@ namespace GameLogic.Combat.CombatTool
                 heroDieEventData.combatHeroEntity as CombatMagicWeaponEntity;
             _enemyMagicWeaponList.Remove(combatMagicWeaponEntity);
             _playerMagicWeaponList.Remove(combatMagicWeaponEntity);
-            for (int i = 0; i < magicWeaponCollisionInfoList.Count; i++)
-            {
-                if (magicWeaponCollisionInfoList[i].a == combatMagicWeaponEntity ||
-                    magicWeaponCollisionInfoList[i].b == combatMagicWeaponEntity)
-                {
-                    RemoveCollisionMagicWeapon(magicWeaponCollisionInfoList[i]);
-                }
-            }
+            RemoveCollisionMagicWeapon(combatMagicWeaponEntity.MagicWeaponCollisionId);
         }
 
         public void SetMagicWeaponCombatSence(Vector3 myHeroPos, Vector3 fangXiang)
         {
             myEnterCombatPos = myHeroPos + fangXiang * 2 + new Vector3(0, 10, 0);
-            myEnterCombatPos = myHeroPos + fangXiang * 18 + new Vector3(0, 10, 0);
+            enemyEnterCombatPos = myHeroPos + fangXiang * 18 + new Vector3(0, 10, 0);
         }
 
         /// <summary>
@@ -71,20 +67,20 @@ namespace GameLogic.Combat.CombatTool
             if (combatMagicWeaponEntity.IsEnemy)
             {
                 _enemyMagicWeaponList.Add(combatMagicWeaponEntity);
-                combatMagicWeaponEntity.useIndex= _enemyMagicWeaponList.Count;
+                combatMagicWeaponEntity.useIndex = _enemyMagicWeaponList.Count;
             }
             else
             {
                 _playerMagicWeaponList.Add(combatMagicWeaponEntity);
-                combatMagicWeaponEntity.useIndex= _playerMagicWeaponList.Count;
+                combatMagicWeaponEntity.useIndex = _playerMagicWeaponList.Count;
             }
 
+            FindCollidingTarget(combatMagicWeaponEntity);
             combatMagicWeaponEntity.CombatAIBasic.ChangeState(CombatHeroStateType.Active);
         }
 
-        public void TriggerMagicWeapon(CombatMagicWeaponEntity a,CombatMagicWeaponEntity b)
+        public void TriggerMagicWeapon(CombatMagicWeaponEntity a, CombatMagicWeaponEntity b)
         {
-            
         }
 
         public void Update(float t)
@@ -98,32 +94,47 @@ namespace GameLogic.Combat.CombatTool
             // {
             //     _playerMagicWeaponList[i].Update(t);
             // }
+            for (magicWeaponCollisionInfoList.Begin(); magicWeaponCollisionInfoList.Next();)
+            {
+                magicWeaponCollisionInfoList.Value.Update(t);
+            }
+        }
 
-            for (int i = 0; i < magicWeaponCollisionInfoList.Count; i++)
+        public MagicWeaponCollisionInfo FindMagicWeaponCollisionInfo(int id)
+        {
+            if (magicWeaponCollisionInfoList.TryGetValue(id, out var info))
             {
-                magicWeaponCollisionInfoList[i].Update(t);
+                return info;
             }
+
+            return null;
         }
 
-        public CombatMagicWeaponEntity FindCollidingTarget(CombatMagicWeaponEntity combatMagicWeaponEntity)
+        private void FindCollidingTarget(CombatMagicWeaponEntity combatMagicWeaponEntity)
         {
             bool isEnemy = combatMagicWeaponEntity.IsEnemy;
             BetterList<CombatMagicWeaponEntity> magicWeaponList =
                 isEnemy ? _playerMagicWeaponList : _enemyMagicWeaponList;
             if (magicWeaponList == null)
             {
-                return null;
+                return;
             }
 
             List<CombatMagicWeaponEntity> nullTarget = new List<CombatMagicWeaponEntity>();
             for (int i = 0; i < magicWeaponList.Count; i++)
             {
-                if (magicWeaponList[i].CollidingTarget == combatMagicWeaponEntity)
+                if (magicWeaponList[i].CombatAIBasic.stateControl.CurrStateName != CombatHeroStateType.idle &&
+                    magicWeaponList[i].CombatAIBasic.stateControl.CurrStateName != CombatHeroStateType.Active)
                 {
-                    return magicWeaponList[i];
+                    continue;
                 }
 
-                if (magicWeaponList[i].CollidingTarget == null)
+                // if (magicWeaponList[i].CollidingTarget == combatMagicWeaponEntity)
+                // {
+                //     return magicWeaponList[i];
+                // }
+
+                if (magicWeaponList[i].MagicWeaponCollisionId < 0)
                 {
                     nullTarget.Add(magicWeaponList[i]);
                 }
@@ -132,10 +143,15 @@ namespace GameLogic.Combat.CombatTool
             if (nullTarget.Count > 0)
             {
                 int index = CombatCalculateTool.Instance.GetOdd(0, nullTarget.Count);
-                return nullTarget[index];
+                CombatMagicWeaponEntity target = nullTarget[index];
+                MagicWeaponCollisionInfo magicWeaponCollisionInfo =
+                    CObjectPool.Instance.Fetch<MagicWeaponCollisionInfo>();
+                magicWeaponCollisionInfo.Init(combatMagicWeaponEntity, target, MagicWeaponCollisionID);
+                magicWeaponCollisionInfoList.Add(MagicWeaponCollisionID, magicWeaponCollisionInfo);
+                MagicWeaponCollisionID++;
             }
 
-            return null;
+            return;
         }
 
         public void AddCollisionMagicWeapon(CombatMagicWeaponEntity a, CombatMagicWeaponEntity b)
@@ -151,15 +167,26 @@ namespace GameLogic.Combat.CombatTool
             rollingStateData.target = a;
             b.CombatAIBasic.ChangeState(CombatHeroStateType.MagicWeaponPingDou,
                 rollingStateData2);
-            MagicWeaponCollisionInfo magicWeaponCollisionInfo = CObjectPool.Instance.Fetch<MagicWeaponCollisionInfo>();
-            magicWeaponCollisionInfo.a = a;
-            magicWeaponCollisionInfo.b = b;
-            magicWeaponCollisionInfoList.Add(magicWeaponCollisionInfo);
+            magicWeaponCollisionInfoList[a.MagicWeaponCollisionId].SetState(2);
+            // MagicWeaponCollisionInfo magicWeaponCollisionInfo = CObjectPool.Instance.Fetch<MagicWeaponCollisionInfo>();
+            // magicWeaponCollisionInfo.a = a;
+            // magicWeaponCollisionInfo.b = b;
+            // magicWeaponCollisionInfoList.Add(magicWeaponCollisionInfo);
+        }
+
+        public void RemoveCollisionMagicWeapon(int id)
+        {
+            magicWeaponCollisionInfoList.Remove(id, out var collisionInfo);
+            if (collisionInfo != null)
+            {
+                collisionInfo.Finish();
+                CObjectPool.Instance.Recycle(collisionInfo);
+            }
         }
 
         public void RemoveCollisionMagicWeapon(MagicWeaponCollisionInfo collisionInfo)
         {
-            magicWeaponCollisionInfoList.Remove(collisionInfo);
+            magicWeaponCollisionInfoList.Remove(collisionInfo.id);
             collisionInfo.Finish();
             CObjectPool.Instance.Recycle(collisionInfo);
         }

+ 2 - 44
Assets/Scripts/GameLogic/Combat/CombatType/CombatTypeBasic.cs

@@ -22,9 +22,7 @@ namespace GameLogic.Combat.CombatType
 
         protected CombatController combatController;
         protected int _currIndex = 0;
-        protected CombatScenesConfig _combatScenesConfig;
-        protected CombatScenesNodeConfig nextConfig;
-
+ 
 
         public IHero currBannerHero;
         public bool isActiveCombat = false;
@@ -37,8 +35,6 @@ namespace GameLogic.Combat.CombatType
             CombatEventManager.Instance.AddEventListener(CombatEventType.HeroDie, HeroDieEventData);
             this.combatController = combatController;
             this._startCombatInfo = startCombatInfo;
-            _combatScenesConfig = combatController.CombatSenceController._currConfig;
-            FindNextConfig();
             ProInit();
         }
 
@@ -56,45 +52,7 @@ namespace GameLogic.Combat.CombatType
         {
         }
 
-        protected void FindNextConfig()
-        {
-#if UNITY_WEIXINMINIGAME&&!UNITY_EDITOR
-            WX.TriggerGC();
-#else
-
-#endif
-
-          
-            allWinNodeCount++;
-            isActiveCombat = false;
-            if (_currIndex >= _combatScenesConfig.allNodeConfig.Length)
-            {
-                _combatScenesConfig = combatController.CombatSenceController.MoveToNextConfig();
-                _currIndex = 0;
-                // _combatScenesConfig = combatController.CombatSenceController._currConfig;
-            }
-
-            nextConfig = _combatScenesConfig.allNodeConfig[_currIndex];
-            if (_currIndex == _combatScenesConfig.allNodeConfig.Length - 1)
-            {
-                combatController.CombatSenceController.NextScenesShow();
-            }
-
-            if (currBannerHero == null)
-            {
-                currBannerHero = new BannerHero();
-            }
-
-            if (_unRegister != null)
-            {
-                _unRegister.UnRegister();
-            }
-
-            _unRegister = nextConfig.targetMoveStartPoint.gameObject.OnTriggerEnterEvent(OnTriggerEnterEvent);
-            currBannerHero.GetThis<BannerHero>().Init(nextConfig.targetMoveStartPoint.gameObject);
-            _currIndex++;
-            CombatController.currActiveCombat.CombatHeroController.SetHpToMaxHp();
-        }
+  
 
         private void OnTriggerEnterEvent(Collider collider)
         {

+ 17 - 17
Assets/Scripts/GameLogic/Combat/CombatType/LevelBattleCombatType.cs

@@ -110,23 +110,23 @@ namespace GameLogic.Combat.CombatType
 
         private void InitPlayerHero(CTaskAwaitBuffer cTaskAwaitBuffer)
         {
-            int i = 0;
-            foreach (KeyValuePair<int, HeroInfo> keyValuePair in PlayerManager.Instance.heroController.heroDicInLead)
-            {
-                int index = i;
-                CombatHeroEntity heroEntity = CObjectPool.Instance.Fetch<CombatHeroEntity>();
-                heroEntity.IsEnemy = false;
-                heroEntity.number = i;
-                Vector3 pos = _combatScenesConfig.heroPoint[index].position;
-                cTaskAwaitBuffer.AddTask(heroEntity.Init(new CombatAIBasic(), keyValuePair.Value, pos,
-                    delegate(CombatHeroEntity entity) { combatController.CombatHeroController.AddHero(entity); }));
-
-                i++;
-            }
-
-            Vector3 p = _combatScenesConfig.heroPoint[0].position;
-            combatController.CombatCameraControllder.root.position = new Vector3(p.x,
-                combatController.CombatCameraControllder.root.position.y, p.z + 13);
+            // int i = 0;
+            // foreach (KeyValuePair<int, HeroInfo> keyValuePair in PlayerManager.Instance.heroController.heroDicInLead)
+            // {
+            //     int index = i;
+            //     CombatHeroEntity heroEntity = CObjectPool.Instance.Fetch<CombatHeroEntity>();
+            //     heroEntity.IsEnemy = false;
+            //     heroEntity.number = i;
+            //     Vector3 pos = _combatScenesConfig.heroPoint[index].position;
+            //     cTaskAwaitBuffer.AddTask(heroEntity.Init(new CombatAIBasic(), keyValuePair.Value, pos,
+            //         delegate(CombatHeroEntity entity) { combatController.CombatHeroController.AddHero(entity); }));
+            //
+            //     i++;
+            // }
+            //
+            // Vector3 p = _combatScenesConfig.heroPoint[0].position;
+            // combatController.CombatCameraControllder.root.position = new Vector3(p.x,
+            //     combatController.CombatCameraControllder.root.position.y, p.z + 13);
         }
 
        

+ 13 - 15
Assets/Scripts/GameLogic/Combat/CombatType/TestCombatType.cs

@@ -24,7 +24,6 @@ namespace GameLogic.Combat.CombatType
 
         protected override void ProInit()
         {
-          
         }
 
         protected override void ProHeroDie(CombatHeroEntity combatHeroEntity, HarmReturnInfo harmReturnInfo)
@@ -52,14 +51,6 @@ namespace GameLogic.Combat.CombatType
             }
         }
 
-        private void InitNewMonsterConfig()
-        {
-            _currBoChi = 0;
-            CombatController.currActiveCombat.CombatHeroController.SetFollowTarget();
-            FindNextConfig();
-            InitTestCombatBoChi();
-            CreateEnemy(new CTaskAwaitBuffer());
-        }
 
         protected override async CTask ProStartGame()
         {
@@ -92,11 +83,17 @@ namespace GameLogic.Combat.CombatType
                 heroEntity.IsEnemy = true;
                 CombatHeroInfo combatHeroInfo = new CombatHeroInfo();
                 testHeroInfoConfig.CopyToCombatHeroInfo((combatHeroInfo));
-                index %= nextConfig.monsterPoint.Length;
-                Vector3 pos = nextConfig.monsterPoint[index].position;
+                // index %= nextConfig.monsterPoint.Length;
+                Vector3 pos =
+                    CombatController.currActiveCombat.CombatSenceController.GetTarget(
+                        CombatController.currActiveCombat.CombatSenceController.currTime + 0.15f);
 
                 cTaskAwaitBuffer.AddTask(heroEntity.Init(new CombatHeroAi(), combatHeroInfo, pos,
-                    delegate(CombatHeroEntity entity) { combatController.CombatHeroController.AddHero(entity); }));
+                    delegate(CombatHeroEntity entity)
+                    {
+                        combatController.CombatHeroController.AddHero(entity);
+                       
+                    }));
             }
         }
 
@@ -110,8 +107,9 @@ namespace GameLogic.Combat.CombatType
 
         private void TestCombat(CTaskAwaitBuffer cTaskAwaitBuffer)
         {
-            Vector3 heroPoint = _combatScenesConfig.heroPoint[0].transform.position;
-            CombatController.currActiveCombat.MagicWeaponCombatSence.SetMagicWeaponCombatSence(heroPoint,Vector3.forward);
+            Vector3 heroPoint = CombatController.currActiveCombat.CombatSenceController.GetTarget(0);
+            CombatController.currActiveCombat.MagicWeaponCombatSence.SetMagicWeaponCombatSence(heroPoint,
+                Vector3.forward);
             testCombatHeroConfig = GameObject.FindObjectOfType<TestCombatHeroConfig>();
             if (testCombatHeroConfig != null)
             {
@@ -124,7 +122,7 @@ namespace GameLogic.Combat.CombatType
                     heroEntity.number = i;
                     CombatHeroInfo combatHeroInfo = new CombatHeroInfo();
                     testHeroInfoConfig.CopyToCombatHeroInfo((combatHeroInfo));
-                    Vector3 pos = _combatScenesConfig.heroPoint[index].position;
+                    Vector3 pos = heroPoint;
                     cTaskAwaitBuffer.AddTask(heroEntity.Init(new CombatHeroAi(), combatHeroInfo, pos,
                         delegate(CombatHeroEntity entity) { combatController.CombatHeroController.AddHero(entity); }));
                 }

+ 34 - 9
Assets/Scripts/GameLogic/Combat/Hero/CombatHeroAi.cs

@@ -11,9 +11,11 @@ namespace GameLogic.Combat.Hero
     public class CombatHeroAi : CombatAIBasic
     {
         // public NavMeshObstacle NavMeshObstacle;
-        protected CombatHeroEntity _combatHeroEntity {
-            get { return _showBaiscEntity as CombatHeroEntity;}
+        protected CombatHeroEntity _combatHeroEntity
+        {
+            get { return _showBaiscEntity as CombatHeroEntity; }
         }
+
         protected float _r = 5;
         public bool isAlert;
 
@@ -34,15 +36,13 @@ namespace GameLogic.Combat.Hero
                 _currFocusTarget = value;
             }
         }
-        
+
 
         private BetterList<GameObject> _areaList = new BetterList<GameObject>();
         private BetterList<GameObject> _HindAreaList = new BetterList<GameObject>();
         private float _t;
 
 
-
-        
         public GameObject[] AreaList
         {
             get { return _areaList.ToArray(); }
@@ -73,7 +73,6 @@ namespace GameLogic.Combat.Hero
 
         protected override void ProInitState()
         {
-            
             stateControl.AddState(CombatHeroStateType.idle, new CombatHeroIdleState(_combatHeroEntity));
             stateControl.AddState(CombatHeroStateType.move, new CombatHeroMoveState(_combatHeroEntity));
             stateControl.AddState(CombatHeroStateType.att, new CombatHeroAttState(_combatHeroEntity));
@@ -90,7 +89,6 @@ namespace GameLogic.Combat.Hero
             stateControl.AddState(CombatHeroStateType.Disappear, new CombatHeroDisappearState(_combatHeroEntity));
         }
 
-      
 
         public override void Update(float t)
         {
@@ -157,6 +155,34 @@ namespace GameLogic.Combat.Hero
 
             AreaUpdate();
             ProUpdate();
+            if (currFocusTarget != null)
+            {
+                _combatHeroEntity.GameObject.transform.rotation = Quaternion.LookRotation(currFocusTarget.dotPos-_combatHeroEntity.dotPos);
+            }
+            // float add = 0.1f;
+            // Vector3 pos = Vector3.zero;
+            // Vector3 dir = Vector3.zero;
+            // float fx = 1;
+            // if (_combatHeroEntity.IsEnemy)
+            // {
+            //     add = 0.15f;
+            //     float lt = CombatController.currActiveCombat.CombatSenceController.currTime + add;
+            //     pos = CombatController.currActiveCombat.CombatSenceController.GetTarget(lt);
+            //     Vector3 p = CombatController.currActiveCombat.CombatSenceController.GetTarget(lt - 0.01f);
+            //     dir = (pos - p).normalized;
+            //     fx = -1;
+            // }
+            // else
+            // {
+            //     pos = CombatController.currActiveCombat.CombatSenceController.Move(t * 0.1f);
+            //     float lt = CombatController.currActiveCombat.CombatSenceController.currTime - 0.01f;
+            //     Vector3 p = CombatController.currActiveCombat.CombatSenceController.GetTarget(lt);
+            //     dir = (pos - p).normalized;
+            // }
+            //
+            //
+            // _combatHeroEntity.combatHeroGameObject.SetPosition(pos);
+            // _combatHeroEntity.GameObject.transform.rotation = Quaternion.LookRotation(dir * fx);
         }
 
         private void AreaUpdate()
@@ -199,7 +225,6 @@ namespace GameLogic.Combat.Hero
             }
         }
 
- 
 
         protected IHero FindMinDixtance(CombatHeroEntity[] allHero)
         {
@@ -233,7 +258,7 @@ namespace GameLogic.Combat.Hero
             return minDistanceHero;
         }
 
-      
+
         protected override void ProDispose()
         {
             CombatEventManager.Instance.RemoveEventListener(CombatEventType.AlertTrigger, AlertTrigger);

+ 4 - 1
Assets/Scripts/GameLogic/Combat/Hero/CombatMagicWeaponEntity.cs

@@ -4,6 +4,7 @@ using Excel2Json;
 using Fort23.Core;
 using Fort23.UTool;
 using GameLogic.Combat.Buff;
+using GameLogic.Combat.CombatTool;
 using GameLogic.Combat.Hero.State;
 using UnityEngine;
 using UnityEngine.AI;
@@ -21,6 +22,7 @@ namespace GameLogic.Combat.Hero
         /// </summary>
         public CombatMagicWeaponEntity CollidingTarget;
 
+        public int MagicWeaponCollisionId=-1;
         protected MagicWeaponConfig _magicWeaponConfig;
         public float cd = 2;
 
@@ -132,7 +134,8 @@ namespace GameLogic.Combat.Hero
             if (CombatAIBasic.CurrState.GetType() == typeof(MagicWeapomDormancyState))
             {
                 cd -= t;
-                if (cd <= 0)
+             
+                if (cd <= 0&&_magicWeaponControl.combatHeroEntity.CombatAIBasic.currFocusTarget != null)
                 {
                     _HpBl = 100;
                     CollidingTarget = null;

+ 1 - 0
Assets/Scripts/GameLogic/Combat/Hero/MagicWeaponAi.cs

@@ -16,6 +16,7 @@ namespace GameLogic.Combat.Hero
             stateControl.AddState(CombatHeroStateType.move, new MagicWeaponMoveState(_showBaiscEntity));
             stateControl.AddState(CombatHeroStateType.MagicWeaponPingDou, new MagicWeaponPingDouState(_showBaiscEntity));
             stateControl.AddState(CombatHeroStateType.Active, new MagicWeaponChuChangState(_showBaiscEntity));
+            stateControl.AddState(CombatHeroStateType.att, new MagicWeaponAttState(_showBaiscEntity));
             
         }
 

+ 1 - 0
Assets/Scripts/GameLogic/Combat/Hero/State/CombatHeroIdleState.cs

@@ -19,6 +19,7 @@ namespace GameLogic.Combat.Hero.State
         {
             if (combatHeroEntity.CombatAIBasic.currFocusTarget == null)
             {
+                combatHeroEntity.CombatAIBasic.ChangeState(CombatHeroStateType.move);
                 return;
             }
 

+ 10 - 15
Assets/Scripts/GameLogic/Combat/Hero/State/CombatHeroMoveState.cs

@@ -1,6 +1,7 @@
 using Animancer;
 using Core.Event.Event;
 using Fort23.Core;
+using GameLogic.Combat.CombatTool;
 using OfficeOpenXml.FormulaParsing.Excel.Functions.Logical;
 using UnityEngine;
 using UnityEngine.AI;
@@ -15,6 +16,7 @@ namespace GameLogic.Combat.Hero.State
         protected HeroPlayStateInfoBasic _transitionAsset;
 
         protected bool isStop;
+
         public CombatHeroMoveState(CombatHeroEntity combatHeroEntity) : base(combatHeroEntity)
         {
         }
@@ -26,8 +28,8 @@ namespace GameLogic.Combat.Hero.State
 
         protected override void ProEnter()
         {
-            EventManager.Instance.AddEventListener(CustomEventType.RefreshFull,RefreshFull);
-         
+            EventManager.Instance.AddEventListener(CustomEventType.RefreshFull, RefreshFull);
+
             Start();
         }
 
@@ -35,19 +37,16 @@ namespace GameLogic.Combat.Hero.State
         {
             lasetTaregtPoint = new Vector3(999999, 99999, 99999);
             _transitionAsset = combatHeroEntity.combatHeroAnimtion.Play("run");
-        
-       
         }
 
         protected void RefreshFull(IEventData ieEventData)
         {
             RefreshFullEventData data = (RefreshFullEventData)ieEventData;
-            if (data.isFullShow&&!isStop)
+            if (data.isFullShow && !isStop)
             {
                 isStop = true;
-              
             }
-            else if(isStop)
+            else if (isStop)
             {
                 Start();
                 isStop = false;
@@ -56,9 +55,9 @@ namespace GameLogic.Combat.Hero.State
 
         protected override void ProExit()
         {
-            EventManager.Instance.RemoveEventListener(CustomEventType.RefreshFull,RefreshFull);
-         
-        
+            EventManager.Instance.RemoveEventListener(CustomEventType.RefreshFull, RefreshFull);
+
+
             // combatHeroEntity.CombatAIBasic.NavMeshAgent.acceleration = 0;
         }
 
@@ -66,12 +65,11 @@ namespace GameLogic.Combat.Hero.State
         {
             lastMovePoint = combatHeroEntity.dotPos;
             lasetTaregtPoint = taregtPos;
-          
         }
 
         protected override void ProUpdate(float t)
         {
-            
+        
             if (combatHeroEntity.CombatAIBasic.currFocusTarget == null)
             {
                 combatHeroEntity.CombatAIBasic.ChangeState(CombatHeroStateType.idle);
@@ -104,9 +102,6 @@ namespace GameLogic.Combat.Hero.State
                 combatHeroEntity.CombatAIBasic.ChangeState(CombatHeroStateType.idle);
                 return;
             }
-
-       
-          
         }
     }
 }

+ 27 - 0
Assets/Scripts/GameLogic/Combat/Hero/State/MagicWeaponAttState.cs

@@ -0,0 +1,27 @@
+using Common.Utility.CombatEvent;
+
+namespace GameLogic.Combat.Hero.State
+{
+    public class MagicWeaponAttState : CombatHeroStateBasic
+    {
+        private CombatMagicWeaponEntity myCombatMagicWeaponEntity;
+
+        public MagicWeaponAttState(CombatHeroEntity combatHeroEntity) : base(combatHeroEntity)
+        {
+            myCombatMagicWeaponEntity = combatHeroEntity as CombatMagicWeaponEntity;
+        }
+
+        /// <summary>
+        /// 开始攻击
+        /// </summary>
+        protected override void ProEnter()
+        {
+            HeroDieEventData heroDieEventData = HeroDieEventData.Create();
+            heroDieEventData.combatHeroEntity = myCombatMagicWeaponEntity;
+            CombatEventManager.Instance.Dispatch(CombatEventType.MagicWeaponDie,
+                heroDieEventData);
+
+            myCombatMagicWeaponEntity.CombatAIBasic.ChangeState(CombatHeroStateType.XiuMian);
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/GameLogic/Combat/Hero/State/MagicWeaponAttState.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 06ee2eb091284c0d8b0c48379593b649
+timeCreated: 1741143230

+ 13 - 11
Assets/Scripts/GameLogic/Combat/Hero/State/MagicWeaponIdleState.cs

@@ -15,6 +15,7 @@ namespace GameLogic.Combat.Hero
         private float _addTime;
 
         private float _currTime;
+        private float _awaitTime;
 
         public MagicWeaponIdleState(CombatHeroEntity combatHeroEntity) : base(combatHeroEntity)
         {
@@ -23,29 +24,30 @@ namespace GameLogic.Combat.Hero
 
         protected override void ProEnter()
         {
-           
-           
+            _awaitTime = 1.0f;
         }
 
 
         protected override void ProUpdate(float t)
         {
-            CombatMagicWeaponEntity combatMagicWeaponEntity =
-                CombatController.currActiveCombat.MagicWeaponCombatSence.FindCollidingTarget(
-                    myCombatMagicWeaponEntity);
-            if (combatMagicWeaponEntity != null)
+            if (myCombatMagicWeaponEntity.MagicWeaponCollisionId >= 0)
             {
                 myCombatMagicWeaponEntity.CombatAIBasic.ChangeState(CombatHeroStateType.move);
                 return;
             }
-            
-            Quaternion   newQuaternion = Quaternion.LookRotation(Vector3.up);
 
+            _awaitTime -= t;
+            if (_awaitTime <= 0)
+            {
+                myCombatMagicWeaponEntity.CombatAIBasic.ChangeState(CombatHeroStateType.att);
+                return;
+            }
 
-            myCombatMagicWeaponEntity.GameObject.transform.rotation = Quaternion.RotateTowards(myCombatMagicWeaponEntity.GameObject.transform.rotation,
-                newQuaternion, 5);
-
+            Quaternion newQuaternion = Quaternion.LookRotation(Vector3.up);
 
+            myCombatMagicWeaponEntity.GameObject.transform.rotation = Quaternion.RotateTowards(
+                myCombatMagicWeaponEntity.GameObject.transform.rotation,
+                newQuaternion, 5);
         }
 
         protected override void ProExit()

+ 8 - 6
Assets/Scripts/GameLogic/Combat/Hero/State/MagicWeaponMoveState.cs

@@ -114,14 +114,16 @@ namespace GameLogic.Combat.Hero.State
             if (myCombatMagicWeaponEntity.CollidingTarget == null ||
                 myCombatMagicWeaponEntity.CollidingTarget.HpBl <= 0)
             {
-                CombatMagicWeaponEntity combatMagicWeaponEntity =
-                    CombatController.currActiveCombat.MagicWeaponCombatSence.FindCollidingTarget(
-                        myCombatMagicWeaponEntity);
-
-
-                myCombatMagicWeaponEntity.CollidingTarget = combatMagicWeaponEntity;
+                // myCombatMagicWeaponEntity.CollidingTarget = combatMagicWeaponEntity;
             }
 
+            MagicWeaponCollisionInfo nMagicWeaponCollisionInfo =
+                CombatController.currActiveCombat.MagicWeaponCombatSence.FindMagicWeaponCollisionInfo(
+                    myCombatMagicWeaponEntity.MagicWeaponCollisionId);
+            myCombatMagicWeaponEntity.CollidingTarget =
+                nMagicWeaponCollisionInfo.a == combatHeroEntity
+                    ? nMagicWeaponCollisionInfo.b
+                    : nMagicWeaponCollisionInfo.a;
             Vector3 targetPos = Vector3.zero;
             CombatMagicWeaponEntity currCollidingTarget = myCombatMagicWeaponEntity.CollidingTarget;
             if (currCollidingTarget == null || !currCollidingTarget.isCombatState) //没有可碰撞的法宝了

+ 40 - 22
Assets/Scripts/GameLogic/Paritcle/ParitcleLogic/FxParabolaBulletLogic.cs

@@ -1,7 +1,6 @@
 using System.Collections.Generic;
 using Core.Audio;
 using Core.Triiger;
-using Core.Utility;
 using GameLogic.Combat.CombatTool;
 using GameLogic.Combat.Hero;
 using UnityEngine;
@@ -23,10 +22,12 @@ namespace Common.Combat.FxAILogic
 
         protected float maxDisSpr;
 
-        private BesselPath _besselPath;
+        // private BesselPath _besselPath;
 
 
         private float _addTime;
+        protected Vector3 startDir;
+        private float dirLerpTime;
 
         protected override void ProInit()
         {
@@ -40,25 +41,16 @@ namespace Common.Combat.FxAILogic
             else
             {
                 endPos = AttTarget.GetSpecialDotInfo("hitpos").GetWorlPos();
-                endPos = new Vector3(endPos.x, CurrPos.y, endPos.z);
+                // endPos = new Vector3(endPos.x, CurrPos.y, endPos.z);
             }
 
 
-            if (_besselPath == null)
-            {
-                _besselPath = new BesselPath();
-            }
-
-            Vector3 CrossNormalized = Vector3.Cross(CurrPos, endPos).normalized;
-            CrossNormalized = new Vector3(CrossNormalized.x, 0, CrossNormalized.z);
-            Vector3 pos2 = (endPos - CurrPos) * 0.5f + CurrPos + CrossNormalized * Random.Range(-15,15);
-            List<Vector3> PosList = new List<Vector3>();
-            PosList.Add(CurrPos);
-            PosList.Add(pos2);
-            PosList.Add(endPos);
-            _besselPath.SetPos(PosList);
-            float d = _besselPath.GetPathCount(10);
-            _addTime = 1.0f / (d / speed);
+            startDir = CombatHeroEntity.GameObject.transform.TransformPoint(new Vector3(Mathf.Sign(Random.Range(-1, 1)),
+                Random.Range(0.1F, 1),
+                1));
+            
+            startDir =( startDir-_currPos).normalized;
+            dirLerpTime = 0;
             // dir = (endPos - CurrPos).normalized;
             // gameObject.transform.rotation = Quaternion.LookRotation(dir);
         }
@@ -81,6 +73,20 @@ namespace Common.Combat.FxAILogic
             Dispose();
         }
 
+        protected void GetTargetPos()
+        {
+            if (isUseCustomTargetEndPos)
+            {
+                endPos = TimeLineEventParticleLogicBasic.customizePos[
+                    customTargetEndPosIndex];
+            }
+            else
+            {
+                endPos = AttTarget.GetSpecialDotInfo("hitpos").GetWorlPos();
+                // endPos = new Vector3(endPos.x, CurrPos.y, endPos.z);
+            }
+        }
+
         protected void OnTriggerEnterEvent(Collider collision)
         {
             ITimeLineTriggerEvent timeLineTriggerEvent =
@@ -136,16 +142,28 @@ namespace Common.Combat.FxAILogic
         protected override void ProCombatUpdate(float time)
         {
             currTime += _addTime * time;
+            dirLerpTime += time*1.2F;
+            if (dirLerpTime > 1)
+            {
+                dirLerpTime = 1;
+            }
 
-            Vector3 movePos = _besselPath.GetValue(currTime);
-            Vector3 dir = (movePos - _currPos).normalized;
-            _currPos = movePos;
+            GetTargetPos();
+            Vector3 dir = (endPos - _currPos).normalized;
+            dir = Vector3.Lerp(startDir, dir, dirLerpTime).normalized;
+            Vector3 lasetPos = _currPos;
+            _currPos += dir * speed * time;
             gameObject.transform.position = _currPos;
 
-            if (currTime >= 1)
+            gameObject.transform.rotation = Quaternion.LookRotation(dir);
+            if (Vector3.Distance(endPos, _currPos) < 0.5f)
             {
                 Dispose();
             }
+            // if (currTime >= 1)
+            // {
+            //     Dispose();
+            // }
 
             // if (!isTriggerGroundEnd)
             // {

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
Assets/StreamingAssets/assetConfig.txt


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2067 - 170
UserSettings/Layouts/default-2022.dwlt


+ 1 - 0
XiuXianGame.sln.DotSettings.user

@@ -1,4 +1,5 @@
 <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACollider_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F2193ba18cb0546b2832917f7674384cf20000_003F3a_003Fa0da6a1e_003FCollider_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003AC_0021_003FUsers_003Fck_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe4df6db7850b4c40b72002ff5da8188846ac00_003F3b_003F1a234af4_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AVector3_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F2008d2d6093f4149aaeafd5f414aa7a517c400_003F01_003F0ef8dd4a_003FVector3_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AVector3_002Ecs_002Fl_003AC_0021_003FUsers_003Fck_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F2008d2d6093f4149aaeafd5f414aa7a517c400_003Fd3_003F23d17a83_003FVector3_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio