瀏覽代碼

修改bug

DESKTOP-FB72PO8\Administrator 4 月之前
父節點
當前提交
287c637830

+ 16 - 0
Assets/Art/GuaiWuTimeline/Guaiwu01.playable

@@ -233,6 +233,22 @@ MonoBehaviour:
   m_Clips: []
   m_Markers:
     m_Objects: []
+--- !u!114 &-5798624984763836640
+MonoBehaviour:
+  m_ObjectHideFlags: 1
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 15c38f6fa1940124db1ab7f6fe7268d1, type: 3}
+  m_Name: Signal Emitter
+  m_EditorClassIdentifier: 
+  m_Time: 0
+  m_Retroactive: 0
+  m_EmitOnce: 0
+  m_Asset: {fileID: 0}
 --- !u!114 &-3798375387370889261
 MonoBehaviour:
   m_ObjectHideFlags: 1

+ 9 - 9
Assets/Res/AnimtionCurveLibrary/GameAnimationCurveLibrary.asset

@@ -29,7 +29,7 @@ MonoBehaviour:
     m_Curve:
     - serializedVersion: 3
       time: 0
-      value: 0
+      value: 1
       inSlope: 0
       outSlope: 0
       tangentMode: 34
@@ -38,7 +38,7 @@ MonoBehaviour:
       outWeight: 0.33333334
     - serializedVersion: 3
       time: 1
-      value: 0
+      value: 1
       inSlope: 0
       outSlope: 0
       tangentMode: 34
@@ -53,21 +53,21 @@ MonoBehaviour:
     m_Curve:
     - serializedVersion: 3
       time: 0
-      value: 0
-      inSlope: 3.9326963
-      outSlope: 3.9326963
+      value: 1
+      inSlope: 0.09412947
+      outSlope: 0.09412947
       tangentMode: 0
       weightedMode: 0
       inWeight: 0
-      outWeight: 0.21882498
+      outWeight: 0.8106184
     - serializedVersion: 3
       time: 0.3
       value: 0.9970398
-      inSlope: 0.77975965
-      outSlope: 0.77975965
+      inSlope: -0.06752735
+      outSlope: -0.06752735
       tangentMode: 0
       weightedMode: 0
-      inWeight: 0.33333334
+      inWeight: 0.6999547
       outWeight: 0.33333334
     - serializedVersion: 3
       time: 0.84

+ 5 - 2
Assets/Res/HeroAudio/MainAudio.asset

@@ -12,5 +12,8 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 1b099297e0f149559e4f5adf700639ce, type: 3}
   m_Name: MainAudio
   m_EditorClassIdentifier: 
-  useCount: 0
-  configs: []
+  useCount: 1
+  configs:
+  - describe: 
+    audionClipName: 
+    volume: 0

+ 81 - 1
Assets/Res/UI/MainUIPanel.prefab

@@ -3368,7 +3368,7 @@ RectTransform:
   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: 913.04346, y: 1624}
+  m_SizeDelta: {x: 750, y: 1624}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1056032702526251692
 MonoBehaviour:
@@ -4227,6 +4227,38 @@ PrefabInstance:
     serializedVersion: 3
     m_TransformParent: {fileID: 9073062006211861286}
     m_Modifications:
+    - target: {fileID: 2192921615180975605, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMax.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 2192921615180975605, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMin.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 2192921615180975605, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 2192921615180975605, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 2248459876073487429, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMax.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 2248459876073487429, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMin.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 2248459876073487429, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 2248459876073487429, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.y
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 5106666997551906113, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
       propertyPath: m_Pivot.x
       value: 0.5
@@ -4311,6 +4343,54 @@ PrefabInstance:
       propertyPath: m_Name
       value: WidgetHero
       objectReference: {fileID: 0}
+    - target: {fileID: 7229761929894092049, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMax.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 7229761929894092049, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMin.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 7229761929894092049, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 7229761929894092049, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 7878371381901126332, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMax.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 7878371381901126332, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMin.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 7878371381901126332, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 7878371381901126332, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8498367243636987744, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMax.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8498367243636987744, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchorMin.y
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8498367243636987744, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.x
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 8498367243636987744, guid: ea104609bd8374412bdaedf093dff35c, type: 3}
+      propertyPath: m_AnchoredPosition.y
+      value: 0
+      objectReference: {fileID: 0}
     m_RemovedComponents: []
     m_RemovedGameObjects: []
     m_AddedGameObjects: []

+ 4 - 0
Assets/Scripts/Core/Event/Event/CustomEventType.cs

@@ -8,5 +8,9 @@ namespace Fort23.Core
       /// 显示文本
       /// </summary>
       ShowText,
+      /// <summary>
+      /// 战斗道具飞行
+      /// </summary>
+      Combat_EquipFall,
     }
 }

+ 11 - 2
Assets/Scripts/Core/UI/Core/UIManager.cs

@@ -211,8 +211,17 @@ namespace Fort23.Mono
         public Vector2 WorldToUIWorld(Vector3 worldPos)
         {
             // Vector3 worldPos = harmReturnInfo.target.combatHeroEntity.combatHeroGameObject.hpTransform.position;
-            Vector3 p = UIManager.Instance.CurrCustomCameraStack.camera.WorldToScreenPoint(worldPos);
-            Vector3 p2 = UIManager.Instance.UICamera.ScreenToWorldPoint(p);
+            Vector3 p = CurrCustomCameraStack.camera.WorldToScreenPoint(worldPos);
+            Vector3 p2 = UICamera.ScreenToWorldPoint(p);
+            return p2;
+        }
+
+        public Vector3 UIWorldToWorld(Vector3 worldPos)
+        {
+            // Vector3 worldPos = harmReturnInfo.target.combatHeroEntity.combatHeroGameObject.hpTransform.position;
+            Vector3 p = UICamera.WorldToScreenPoint(worldPos);
+            p.z = 30;
+            Vector3 p2 = CurrCustomCameraStack.camera.ScreenToWorldPoint(p);
             return p2;
         }
 

+ 11 - 0
Assets/Scripts/GameLogic/Combat/CombatEvent/Combat_EquipFallEventData.cs

@@ -0,0 +1,11 @@
+using Core.Utility.Event;
+using UnityEngine;
+
+namespace Common.Utility.CombatEvent
+{
+    public class Combat_EquipFallEventData : EventDataBasic<Combat_EquipFallEventData>
+    {
+        public string[] fallEquip;
+        public Vector3 startPos_WorldPos;
+    }
+}

+ 3 - 0
Assets/Scripts/GameLogic/Combat/CombatEvent/Combat_EquipFallEventData.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 7747689bc72f4b3cbe0d745624b594b1
+timeCreated: 1732523935

+ 4 - 2
Assets/Scripts/GameLogic/Combat/CombatType/TestCombatType.cs

@@ -43,8 +43,10 @@ namespace GameLogic.Combat.CombatType
                 }
             }
 
-
-            CombatEquipFallManager.Instance.Fall(allEquip, combatItemShowEventData.startPos_WorldPos);
+            Combat_EquipFallEventData combatEquipFallEventData = Combat_EquipFallEventData.Create();
+            combatEquipFallEventData.fallEquip = allEquip.ToArray();
+            combatEquipFallEventData.startPos_WorldPos = combatItemShowEventData.startPos_WorldPos;
+            EventManager.Instance.Dispatch(CustomEventType.Combat_EquipFall, combatEquipFallEventData);
 
             ShowTextEventData showTextEventData = ShowTextEventData.Create();
             showTextEventData.text = "+金币 20";

+ 1 - 1
Assets/Scripts/GameLogic/Combat/Hero/HeroAanimtion/CombatHeroAnimtion.cs

@@ -65,7 +65,7 @@ namespace GameLogic.Combat.Hero
         {
             if (!_transitionMap.TryGetValue(name, out TransitionAsset clipTransition))
             {
-                LogTool.Log("没有找到要播放的动画" + name);
+                // LogTool.Log("没有找到要播放的动画" + name);
                 return null;
             }
 

+ 9 - 18
Assets/Scripts/GameLogic/Paritcle/CombatParticleSystemPool.cs

@@ -57,13 +57,13 @@ namespace Fort23.Common
         private int _lastOder;
         private string _lastLayerName;
 
-        public SortingGroup RootSortingGroup;
+        // public SortingGroup RootSortingGroup;
 
-        public void SetRootSortingGroup(SortingGroup sortingGroup)
-        {
-            SetOder(sortingGroup.sortingOrder, sortingGroup.sortingLayerName);
-            this.RootSortingGroup = sortingGroup;
-        }
+        // public void SetRootSortingGroup(SortingGroup sortingGroup)
+        // {
+        //     SetOder(sortingGroup.sortingOrder, sortingGroup.sortingLayerName);
+        //     this.RootSortingGroup = sortingGroup;
+        // }
 
         public override void DormancyObj()
         {
@@ -80,7 +80,7 @@ namespace Fort23.Common
 
         public void SetOder(int oder, string layerName)
         {
-            RootSortingGroup = null;
+            // RootSortingGroup = null;
 
             // if (own != null)
             // {
@@ -186,7 +186,7 @@ namespace Fort23.Common
         {
             base.ProDormancyObj();
 
-            RootSortingGroup = null;
+            // RootSortingGroup = null;
         }
 
         protected override void ProOnDestroy()
@@ -219,16 +219,7 @@ namespace Fort23.Common
 
             deltaTime = _currUpdateTime;
             _currUpdateTime = 0;
-            if (RootSortingGroup != null)
-            {
-                if (!RootSortingGroup.sortingLayerName.Equals(_lastLayerName) ||
-                    RootSortingGroup.sortingOrder != _lastOder)
-                {
-                    SortingGroup sortingGroup = RootSortingGroup;
-                    SetOder(sortingGroup.sortingOrder, sortingGroup.sortingLayerName);
-                    RootSortingGroup = sortingGroup;
-                }
-            }
+           
 
             UpdateTime += deltaTime;
 

+ 4 - 4
Assets/Scripts/GameLogic/Paritcle/GameTimeLineParticleFactory.cs

@@ -14,14 +14,14 @@ using UTool.CustomizeTimeLogic.FxLogic.TimeLineEventLogic;
 
 public class GameTimeLineParticleFactory : ITimeLineParticleFactory
 {
-    protected List<CombatParticleSystemPool> allCombatParticleSystem =
-        new List<CombatParticleSystemPool>();
+    protected BetterList <CombatParticleSystemPool> allCombatParticleSystem =
+        new BetterList<CombatParticleSystemPool>();
 
-    protected List<FxAILogicBasic> allFxAiLogicBasic = new List<FxAILogicBasic>();
+    protected BetterList<FxAILogicBasic> allFxAiLogicBasic = new BetterList<FxAILogicBasic>();
 
 
     protected bool _isUpdateState;
-    private List<FxAILogicBasic> _removeFxAiLogicBasic = new List<FxAILogicBasic>();
+    private BetterList<FxAILogicBasic> _removeFxAiLogicBasic = new BetterList<FxAILogicBasic>();
 
     public void RemoveFxAILogicBasic(FxAILogicBasic fxAILogicBasic)
     {

+ 3 - 0
Assets/Scripts/GameUI/Combat/CombatDrive.cs

@@ -2,6 +2,7 @@
 using Fort23.Core;
 using Fort23.Mono;
 using GameLogic.Combat.CombatTool;
+using GameLogic.CombatScenesTool;
 using UnityEngine;
 using Utility;
 
@@ -13,6 +14,8 @@ namespace GameLogic.Combat
 
         public async CTask AddCombatController(CombatController combatController)
         {
+            CombatEquipFallManager.Instance.Dispose();
+            CombatEquipFallManager.Instance.Init();
             CTaskAwaitBuffer cTaskAwaitBuffer = new CTaskAwaitBuffer();
             cTaskAwaitBuffer.AddTask(CombatHPPanel.OpenCombatHPPanel());
             cTaskAwaitBuffer.AddTask(ShowTextPanel.OpenShowTextPanel());

+ 32 - 36
Assets/Scripts/GameLogic/CombatScenesTool/CombatEquipFallManager.cs → Assets/Scripts/GameUI/Combat/CombatEquipFallManager.cs

@@ -1,6 +1,8 @@
 using System.Collections.Generic;
+using Common.Utility.CombatEvent;
 using Core.Utility;
 using Fort23.Core;
+using Fort23.Mono;
 using Fort23.UTool;
 using GameLogic.Combat.CombatTool;
 using UnityEngine;
@@ -77,42 +79,52 @@ namespace GameLogic.CombatScenesTool
                 {
                     EquipFallObjectMono.idleObject.SetActive(false);
                     _currTime += t;
-                    CombatHeroEntity[] heroEntities =
-                        CombatController.currActiveCombat.CombatHeroController.GetHero(false);
-                    if (heroEntities == null)
-                    {
-                        return;
-                    }
 
-                    if (heroEntities.Length > 0)
+
+                    Vector3 pos = CombatEquipFallManager.Instance.GetUIPos();
+                    var position = GameObjectPool.own.transform.position;
+                    float d = Vector3.SqrMagnitude(position - pos);
+                    float addTime = 1.0f / (d / 64);
+                    position = Vector3.Lerp(position,
+                        pos, addTime * t);
+                    GameObjectPool.own.transform.position = position;
+                    if (d < 0.3f)
                     {
-                        Transform heroT = heroEntities[0].combatHeroGameObject.transform;
-
-                        GameObjectPool.own.transform.position = Vector3.Lerp(GameObjectPool.own.transform.position,
-                            heroT.position, 0.2f);
-                        if (Vector3.SqrMagnitude(GameObjectPool.own.transform.position - heroT.position) < 0.3f)
-                        {
-                            CombatEquipFallManager.Instance.allEquipFall.Remove(this);
-                            CObjectPool.Instance.Recycle(this);
-                        }
+                        CombatEquipFallManager.Instance.allEquipFall.Remove(this);
+                        CObjectPool.Instance.Recycle(this);
                     }
                 }
             }
         }
 
-        public CombatEquipFallManager()
+        public Vector3 GetUIPos()
+        {
+            MainUIPanel mainUIPanel = UIManager.Instance.GetComponent<MainUIPanel>();
+            Vector3 pos = UIManager.Instance.UIWorldToWorld(mainUIPanel.transform.position);
+            return pos;
+        }
+
+        public void Init()
         {
             StaticUpdater.Instance.AddRenderUpdateCallBack(Update);
+            EventManager.Instance.AddEventListener(CustomEventType.Combat_EquipFall, Combat_EquipFall);
+        }
+
+        protected void Combat_EquipFall(IEventData ievetEquia)
+        {
+            Combat_EquipFallEventData combatEquipFallEventData = ievetEquia as Combat_EquipFallEventData;
+            Fall(combatEquipFallEventData.fallEquip, combatEquipFallEventData.startPos_WorldPos);
         }
 
         public override void Dispose()
         {
             StaticUpdater.Instance.RemoveRenderUpdateCallBack(Update);
+            EventManager.Instance.RemoveEventListener(CustomEventType.Combat_EquipFall, Combat_EquipFall);
         }
 
-        public void Fall(List<string> allEquip, Vector3 worldPos)
+        public void Fall(string[] allEquip, Vector3 worldPos)
         {
-            for (int i = 0; i < allEquip.Count; i++)
+            for (int i = 0; i < allEquip.Length; i++)
             {
                 GObjectPool.Instance.FetchAsync<GameObjectPool>(allEquip[i], delegate(GameObjectPool pool)
                 {
@@ -123,23 +135,7 @@ namespace GameLogic.CombatScenesTool
                     Vector3 startPos = worldPos;
                     float x = Random.Range(-2f, 2f);
                     float z = Random.Range(-2f, 2f);
-                    // if (x < 0)
-                    // {
-                    //     x = Mathf.Clamp(x, -1, -2.5f);
-                    // }
-                    // else
-                    // {
-                    //     x = Mathf.Clamp(x, 1, 2.5f);
-                    // }
-                    //
-                    // if (z < 0)
-                    // {
-                    //     z = Mathf.Clamp(z, -1, -2.5f);
-                    // }
-                    // else
-                    // {
-                    //     z = Mathf.Clamp(z, 1, 2.5f);
-                    // }
+
 
                     Vector3 endPos = startPos + new Vector3(x, 0, z);
                     parabolaPath.SetPos(startPos, endPos);

+ 0 - 0
Assets/Scripts/GameLogic/CombatScenesTool/CombatEquipFallManager.cs.meta → Assets/Scripts/GameUI/Combat/CombatEquipFallManager.cs.meta


+ 1 - 1
Assets/Scripts/GameUI/UI/ShowItemMoveTarget/ShowItemMoveToTargetPanel.cs

@@ -141,7 +141,7 @@ namespace Fort23.Mono
             currImageMove.SizeCurve = AnimationCurveManager.Instance.AnimationCurveLibrary.ui_moveSize;
             currImageMove.moveSpeed = AnimationCurveManager.Instance.AnimationCurveLibrary.ui_moveSpped;
             currImageMove.ShowSizeCurve = AnimationCurveManager.Instance.AnimationCurveLibrary.ui_showSize;
-            currImageMove.showSizeSpeed = 50;
+            currImageMove.showSizeSpeed = 10;
             GameObjectPool gameObjectPool =
                 GObjectPool.Instance.FetchAsyncForGameObject<GameObjectPool>(moveIcon.gameObject, "moveIcon");
             gameObjectPool.own.transform.SetParent(transform);

文件差異過大導致無法顯示
+ 198 - 1909
UserSettings/Layouts/default-2022.dwlt


部分文件因文件數量過多而無法顯示