DESKTOP-FB72PO8\Administrator 5 godzin temu
rodzic
commit
43866b5ee8

+ 5 - 0
Assets/Bundles/BuildConfig.prefab

@@ -146,4 +146,9 @@ MonoBehaviour:
     isAssetBundle: 0
     isList: 0
     ListCollectorDatas: []
+  - key: -2007267707
+    gameObject: {fileID: 102900000, guid: 62ccaa0e95e448b4089ea55431b7229a, type: 3}
+    isAssetBundle: 0
+    isList: 0
+    ListCollectorDatas: []
   isAssetBundle: 1

Plik diff jest za duży
+ 65 - 5407
Assets/Res/UI/CombatPanel.prefab


+ 5 - 1
Assets/Scripts/Core/Utility/BesselPathGroup.cs

@@ -26,11 +26,15 @@ namespace Core.Utility
 
         public Vector3 CalculatePoint(float t)
         {
+         
+
             // BesselPath currBeselPath = null;
             float currLane = 0;
+            Vector3 endPos=Vector3.zero;
             for (int i = 0; i < allBesselPath.Count; i++)
             {
                 BesselPath besselPath = allBesselPath[i];
+                endPos=besselPath.controlPoints[^1];
                 float allLane = currLane;
                 allLane += besselPath.allDis;
                 float b = allLane / lane;
@@ -47,7 +51,7 @@ namespace Core.Utility
             }
 
 
-            return Vector3.zero;
+            return endPos;
         }
     }
 }

+ 15 - 7
Assets/Scripts/GameLogic/Combat/Hero/CombatHeroSkillControl.cs

@@ -99,14 +99,15 @@ namespace GameLogic.Combat.Hero
 
             if (!_combatHeroEntity.IsEnemy)
             {
-                float cd = _combatHeroEntity.CurrCombatHeroInfo.powerUpConfig.MaxActiveGongfaNum * PlayerManager.Instance.gameConstantConfig.BasicCDperSkill/1000;
+                float cd = _combatHeroEntity.CurrCombatHeroInfo.powerUpConfig.MaxActiveGongfaNum *
+                    PlayerManager.Instance.gameConstantConfig.BasicCDperSkill / 1000;
                 _combatHeroEntity.CurrCombatHeroInfo.SetSkillAttSpeed(
                     cd + SkillTurntable.skillAddSkillCd);
             }
             else
             {
-                
-                float cd = (SkillTurntable.skillCount * PlayerManager.Instance.gameConstantConfig.BasicCDperSkill)/1000;
+                float cd = (SkillTurntable.skillCount * PlayerManager.Instance.gameConstantConfig.BasicCDperSkill) /
+                           1000;
                 _combatHeroEntity.CurrCombatHeroInfo.SetSkillAttSpeed(
                     cd + SkillTurntable.skillAddSkillCd);
             }
@@ -130,6 +131,8 @@ namespace GameLogic.Combat.Hero
                 return;
             }
 
+            skill.DelayUseSkillCd = 0.5f;
+
             SkillCommands.Add(skill);
         }
 
@@ -178,14 +181,19 @@ namespace GameLogic.Combat.Hero
                 return null;
             }
 
-            SkillBasic skillBasic = null;
+            // SkillBasic skillBasic = null;
             for (int i = 0; i < SkillCommands.size; i++)
             {
-                skillBasic = SkillCommands[i];
-                break;
+               
+                if (!SkillCommands[i].IsCanUse())
+                {
+                    continue;
+                }
+
+                return SkillCommands[i];
             }
 
-            return skillBasic;
+            return null;
         }
 
 

+ 3 - 1
Assets/Scripts/GameLogic/Combat/Hero/Turntable/SkillTurntable.cs

@@ -287,11 +287,13 @@ namespace GameLogic.Combat.Hero.Turntable
             }
 
             skillSlots.useCount++;
+            combatHeroSkillControl.AddCommandSkill(skillBasic);
             AddUseGongFaEventData addUseGongFaEventData = AddUseGongFaEventData.Create();
             addUseGongFaEventData.SkillBasic = skillBasic;
             addUseGongFaEventData.SkillSlots = skillSlots;
+           
             CombatEventManager.Instance.Dispatch(CombatEventType.AddUseGongFa, addUseGongFaEventData);
-            combatHeroSkillControl.AddCommandSkill(skillBasic);
+           
         }
 
 

+ 10 - 2
Assets/Scripts/GameLogic/Combat/Skill/SkillBasic.cs

@@ -27,9 +27,11 @@ namespace GameLogic.Combat.Skill
     public abstract class SkillBasic : CObject, ITimeLineTriggerEntity, ITimeLineEndSing, ITimeLineTargetEntity,
         ITimeLineTriggerEvent, ITimeLineAlertTargetEnter
     {
+        /// <summary>
+        /// 使用时候延长多长时间才能使用
+        /// </summary>
+        public float DelayUseSkillCd;
         public int skillGuid;
-
-
         public int UseCount;
 
 
@@ -311,6 +313,11 @@ namespace GameLogic.Combat.Skill
 
         public virtual bool IsCanUse()
         {
+            if (DelayUseSkillCd > 0)
+            {
+                return false;
+            }
+
             return true;
         }
 
@@ -522,6 +529,7 @@ namespace GameLogic.Combat.Skill
         /// <param name="time"></param>
         public void CombatUpdate(float time)
         {
+            DelayUseSkillCd-=time;
             ProCombatUpdate(time);
         }
 

+ 32 - 1
Assets/Scripts/GameUI/UI/CombatPanel/UseQuqueSkill.cs

@@ -16,17 +16,31 @@ namespace Fort23.Mono
         public override void AddEvent()
         {
             CombatEventManager.Instance.AddEventListener(CombatEventType.UseSkillFinish, UseSkillFinish);
+            CombatEventManager.Instance.AddEventListener(CombatEventType.UseSkill, UseSkill);
+            StaticUpdater.Instance.AddRenderUpdateCallBack(Update);
         }
 
         public override void DelEvent()
         {
-            CombatEventManager.Instance.RemoveEventListener(CombatEventType.UseSkillFinish, UseSkillFinish);
+            StaticUpdater.Instance.RemoveRenderUpdateCallBack(Update);
+            CombatEventManager.Instance.RemoveEventListener(CombatEventType.UseSkill, UseSkill);
         }
 
         public override void AddButtonEvent()
         {
         }
 
+        private void UseSkill(IEventData ieveDtat)
+        {
+            CombatUseSkillEventData eventData = ieveDtat as CombatUseSkillEventData;
+            if (eventData.useSkill==skillBasic)
+            {
+                UIManager.Instance.DormancyGComponent(this);
+                return;
+            }
+
+        }
+
         private void UseSkillFinish(IEventData ieveDtat)
         {
             UseSkillFinishEventData useSkillFinishEventData = ieveDtat as UseSkillFinishEventData;
@@ -36,6 +50,17 @@ namespace Fort23.Mono
             }
         }
 
+        private void Update()
+        {
+            if (!transform.gameObject.activeSelf)
+            {
+                if (skillBasic.DelayUseSkillCd < 0)
+                {
+                    transform.gameObject.SetActive(true);
+                }
+            }
+        }
+
         public override void DormancyObj()
         {
             base.DormancyObj();
@@ -44,6 +69,12 @@ namespace Fort23.Mono
 
         public void ShowWidget(SkillBasic skillBasic)
         {
+            if (skillBasic.DelayUseSkillCd > 0)
+            {
+                transform.gameObject.SetActive(false);
+            }
+            useSkillIcon.icon_name=skillBasic.SelfSkillConfig.icon;
+
             this.skillBasic = skillBasic;
         }
     }

+ 42 - 7
Assets/Scripts/GameUI/UI/CombatPanel/UseSkillShowFxMono.cs

@@ -11,26 +11,59 @@ namespace Fort23.Mono
         protected ParticleSystemPool gObjectPoolInterface;
         protected float _currTime;
         protected float _timeAdd;
-        private float _speed =0.5f;
+        private float _speed = 0.5f;
 
-        public void Init(BesselPathGroup besselPathGroup, ParticleSystemPool gObjectPoolInterface)
+        private ParticleSystemPool particleSystemEnd;
+        private ParticleSystemPool particleSystemTar;
+        private bool isEnd;
+
+        public void Init(BesselPathGroup besselPathGroup, ParticleSystemPool gObjectPoolInterface,
+            ParticleSystemPool particleSystemEnd, ParticleSystemPool particleSystemTar)
         {
+            isEnd = false;
             besselPathGroup.Start();
             this.besselPathGroup = besselPathGroup;
             this.gObjectPoolInterface = gObjectPoolInterface;
+
+            this.particleSystemEnd = particleSystemEnd;
+            this.particleSystemTar = particleSystemTar;
+        
+            // gObjectPoolInterface.SetActive(true);
             _currTime = 0;
-            _timeAdd = 1.0f /_speed;
+            _timeAdd = 1.0f / _speed;
             StaticUpdater.Instance.AddRenderUpdateCallBack(Update);
         }
 
         public void Update()
         {
-            _currTime += Time.deltaTime*_timeAdd;
+            if (isEnd)
+            {
+                _currTime += Time.deltaTime;
+                if (_currTime > 2)
+                {
+                    CObjectPool.Instance.Recycle(this);
+                }
+
+                return;
+            }
+
+            _currTime += Time.deltaTime * _timeAdd;
+            if (_currTime > 0.3f&&!particleSystemTar.own.activeSelf)
+            {
+                particleSystemTar.ActiveObj();
+            }
+            if (_currTime > 1)
+            {
+                _currTime = 1;
+            }
             Vector3 pos = besselPathGroup.CalculatePoint(_currTime);
             gObjectPoolInterface.gameObject.transform.position = pos;
-            if (_currTime >= 1)
+            if (_currTime >= 1 && !isEnd)
             {
-                CObjectPool.Instance.Recycle(this);
+                GObjectPool.Instance.Recycle(gObjectPoolInterface);
+                particleSystemEnd.ActiveObj();
+                _currTime = 0;
+                isEnd = true;
             }
         }
 
@@ -40,9 +73,11 @@ namespace Fort23.Mono
 
         public override void DormancyObj()
         {
-            GObjectPool.Instance.Recycle(gObjectPoolInterface);
+           
             besselPathGroup = null;
             gObjectPoolInterface = null;
+            particleSystemEnd = null;
+            particleSystemTar = null;
             StaticUpdater.Instance.RemoveRenderUpdateCallBack(Update);
         }
     }

+ 129 - 30
Assets/Scripts/GameUI/UI/CombatPanel/ZhuanPanPanel.cs

@@ -25,6 +25,20 @@ namespace Fort23.Mono
 
         public async CTask ShowPanel()
         {
+            CTaskAwaitBuffer cTaskAwaitBuffer = new CTaskAwaitBuffer();
+            cTaskAwaitBuffer.AddTask(
+                GObjectPool.Instance.FetchAsync<ParticleSystemPool>("fx_ui_jin_tw", Prestore: true));
+            cTaskAwaitBuffer.AddTask(
+                GObjectPool.Instance.FetchAsync<ParticleSystemPool>("fx_ui_shui_tw", Prestore: true));
+            cTaskAwaitBuffer.AddTask(
+                GObjectPool.Instance.FetchAsync<ParticleSystemPool>("fx_ui_mu_tw", Prestore: true));
+            cTaskAwaitBuffer.AddTask(
+                GObjectPool.Instance.FetchAsync<ParticleSystemPool>("fx_ui_huo_tw", Prestore: true));
+            cTaskAwaitBuffer.AddTask(
+                GObjectPool.Instance.FetchAsync<ParticleSystemPool>("fx_ui_tu_tw", Prestore: true));
+
+            await cTaskAwaitBuffer.WaitAll();
+            cTaskAwaitBuffer.Dispose();
             for (_wuXingGongFaWidgets.Begin(); _wuXingGongFaWidgets.Next();)
             {
                 UIManager.Instance.DormancyGComponent(_wuXingGongFaWidgets.Value);
@@ -56,7 +70,7 @@ namespace Fort23.Mono
             ExercisesAlter(null);
         }
 
-        private void SetSkillFxMovePlay(SkillSlots skillSlots)
+        private async CTask SetSkillFxMovePlay(SkillSlots skillSlots)
         {
             WuXingType wuXingType = skillSlots.SkillBasic.wuXingType;
             Vector2 startPos = Vector2.zero;
@@ -64,7 +78,7 @@ namespace Fort23.Mono
             {
                 if (_gfWidgets[i].SkillSlots == skillSlots)
                 {
-                    startPos=  _gfWidgets[i].transform.position;
+                    startPos = _gfWidgets[i].transform.position;
                 }
             }
             // double hd = skillSlots.angle * Math.PI / 180f;
@@ -76,55 +90,99 @@ namespace Fort23.Mono
             // double y = c * 0 + d * 150;
 
 
-          
             Vector2 endPos = _wuXingGongFaWidgets[wuXingType].transform.position;
-            Vector2 center = endPos - startPos;
-            center = startPos + (center * 0.5f);
+            Vector2 endPos2 = currUseSkillRoot.transform.position;
+
             BesselPath besselPath = new BesselPath();
             besselPath.controlPoints.Add(startPos);
-            besselPath.controlPoints.Add(new Vector3(center.x, center.y, -0.5f));
-            besselPath.controlPoints.Add(endPos);
-            besselPath.controlPoints.Add(endPos);
+            besselPath.controlPoints.Add(startPos);
+            besselPath.controlPoints.Add(endPos2);
+            besselPath.controlPoints.Add(endPos2);
 
-            Vector2 startPos2 = endPos;
-            Vector2 endPos2 = currUseSkillRoot.transform.position;
-            Vector2 center2 = endPos2 - startPos2;
-            center2 = startPos2 + (center2 * 0.5f);
-            BesselPath besselPath2 = new BesselPath();
-            besselPath2.controlPoints.Add(startPos2);
-            besselPath2.controlPoints.Add(new Vector3(center2.x, center2.y, -0.5f));
-            besselPath2.controlPoints.Add(endPos2);
-            besselPath2.controlPoints.Add(endPos2);
 
             BesselPathGroup besselPathGroup = new BesselPathGroup();
             besselPathGroup.AddBesselPath(besselPath);
-            besselPathGroup.AddBesselPath(besselPath2);
+            // besselPathGroup.AddBesselPath(besselPath2);
 
-            GameObject fxObject = null;
+            // GameObject fxObject = null;
+            string fxName = null;
+            string fxName_end = null;
+            string fxName_tar = null;
             switch (wuXingType)
             {
                 case WuXingType.Gold:
-                    fxObject = fx_skill_jing;
+                    // fxObject = fx_skill_jing;
+                    fxName = "fx_ui_jin_tw";
+                    fxName_end = "fx_ui_jin_end";
+                    fxName_tar = "fx_ui_jin_tar";
                     break;
                 case WuXingType.Water:
-                    fxObject = fx_skill_shui;
+                    // fxObject = fx_skill_shui;
+                    fxName = "fx_ui_shui_tw";
+                    fxName_end = "fx_ui_shui_end";
+                    fxName_tar = "fx_ui_shui_tar";
                     break;
                 case WuXingType.Wood:
-                    fxObject = fx_skill_huo;
+                    // fxObject = fx_skill_huo;
+                    fxName = "fx_ui_mu_tw";
+                    fxName_end = "fx_ui_mu_end";
+                    fxName_tar = "fx_ui_mu_tar";
                     break;
                 case WuXingType.Fire:
-                    fxObject = fx_skill_huo;
+                    // fxObject = fx_skill_huo;
+                    fxName = "fx_ui_huo_tw";
+                    fxName_end = "fx_ui_huo_end";
+                    fxName_tar = "fx_ui_huo_tar";
                     break;
                 case WuXingType.Earth:
-                    fxObject = fx_skill_shui;
+                    // fxObject = fx_skill_shui;
+                    fxName = "fx_ui_tu_tw";
+                    fxName_end = "fx_ui_tu_end";
+                    fxName_tar = "fx_ui_tu_tar";
                     break;
             }
 
+
             UseSkillShowFxMono useSkillShowFxMono = CObjectPool.Instance.Fetch<UseSkillShowFxMono>();
-            ParticleSystemPool particleSystemPool =
-                GObjectPool.Instance.FetchAsyncForGameObject<ParticleSystemPool>(fxObject, fxObject.name);
-            particleSystemPool.transform.parent = fxObject.transform.parent;
-            useSkillShowFxMono.Init(besselPathGroup, particleSystemPool);
+
+            ParticleSystemPool particleSystemPool1 = null;
+            ParticleSystemPool particleSystemPool2 = null;
+            ParticleSystemPool particleSystemPool3 = null;
+            using (CTaskAwaitBuffer cTaskAwaitBuffer = new CTaskAwaitBuffer())
+            {
+                cTaskAwaitBuffer.AddTask(
+                    GObjectPool.Instance.FetchAsync<ParticleSystemPool>(fxName,
+                        delegate(ParticleSystemPool pool)
+                        {
+                            particleSystemPool1 = pool;
+                            particleSystemPool1.SetParent(fxRoot);
+                            particleSystemPool1.transform.position = startPos;
+                        }));
+                cTaskAwaitBuffer.AddTask(
+                    GObjectPool.Instance.FetchAsync<ParticleSystemPool>(fxName_end,
+                        delegate(ParticleSystemPool pool)
+                        {
+                            particleSystemPool2 = pool;
+                            particleSystemPool2.SetParent(fxRoot);
+                            particleSystemPool2.transform.position = endPos2;
+                            particleSystemPool2.SetActive(false);
+                        }));
+                cTaskAwaitBuffer.AddTask(
+                    GObjectPool.Instance.FetchAsync<ParticleSystemPool>(fxName_tar,
+                        delegate(ParticleSystemPool pool)
+                        {
+                            particleSystemPool3 = pool;
+                            particleSystemPool3.SetParent(fxRoot);
+                            particleSystemPool3.transform.position =
+                                _wuXingGongFaWidgets[wuXingType].transform.position;
+                            particleSystemPool3.SetActive(false);
+                        }));
+                await cTaskAwaitBuffer.WaitAll();
+            }
+
+
+            // particleSystemPool.transform.parent = fxObject.transform.parent;
+            useSkillShowFxMono.Init(besselPathGroup, particleSystemPool1, particleSystemPool2, particleSystemPool3);
         }
 
         private void Init()
@@ -133,7 +191,6 @@ namespace Fort23.Mono
 
         public override void AddEvent()
         {
-            
             StaticUpdater.Instance.AddLateUpdateCallBack(Update);
             CombatEventManager.Instance.AddEventListener(CombatEventType.ExercisesAlter, ExercisesAlter);
             CombatEventManager.Instance.AddEventListener(CombatEventType.TaoismSkillAlter, TaoismSkillAlter);
@@ -176,6 +233,48 @@ namespace Fort23.Mono
                 return;
             }
 
+            string fxName_end = "";
+            switch (eventData.useSkill.wuXingType)
+            {
+                case WuXingType.Gold:
+                    // fxObject = fx_skill_jing;
+
+                    fxName_end = "fx_ui_jin_end";
+
+                    break;
+                case WuXingType.Water:
+                    // fxObject = fx_skill_shui;
+
+                    fxName_end = "fx_ui_shui_end";
+
+                    break;
+                case WuXingType.Wood:
+                    // fxObject = fx_skill_huo;
+
+                    fxName_end = "fx_ui_mu_end";
+
+                    break;
+                case WuXingType.Fire:
+                    // fxObject = fx_skill_huo;
+
+                    fxName_end = "fx_ui_huo_end";
+
+                    break;
+                case WuXingType.Earth:
+                    // fxObject = fx_skill_shui;
+
+                    fxName_end = "fx_ui_tu_end";
+
+                    break;
+            }
+
+            Vector2 endPos2 = currUseSkillRoot.transform.position;
+            GObjectPool.Instance.FetchAsync<ParticleSystemPool>(fxName_end,
+                delegate(ParticleSystemPool pool)
+                {
+                    pool.SetParent(fxRoot);
+                    pool.transform.position = endPos2;
+                });
             currUseSkillRoot.SetActive(true);
             currUseSkillIcon.icon_name = eventData.useSkill.SelfSkillConfig.icon;
         }
@@ -192,7 +291,7 @@ namespace Fort23.Mono
             SetSkillFxMovePlay(eventData.SkillSlots);
             CombatHeroSkillControl combatHeroSkillControl =
                 skillBasic.CombatHeroEntity.CombatHeroSkillControl.This<CombatHeroSkillControl>();
-            if (combatHeroSkillControl.useSkillCount > 0 || combatHeroSkillControl.currUseSkill != null)
+            if (combatHeroSkillControl.useSkillCount > 1 || combatHeroSkillControl.currUseSkill != null)
             {
                 UseQuqueSkill useQuqueSkill =
                     await UIManager.Instance.CreateGComponentForObject<UseQuqueSkill>(UseQuqueSkill, null,

+ 5 - 49
Assets/Scripts/GameUI/UI/CombatPanel/ZhuanPanPanelData.cs

@@ -153,59 +153,15 @@ namespace Fort23.Mono
 	      return _UseQuqueSkill;
 	     }
 	   }
-	  private GameObject _fx_skill_mu;
-	  public GameObject fx_skill_mu
+	  private RectTransform _fxRoot;
+	  public RectTransform fxRoot
 	   {
 	   get{
-	      if (_fx_skill_mu == null)
+	      if (_fxRoot == null)
 	       {
-	         _fx_skill_mu  = GetUIUnit<GameObject>("fx_skill_mu"); 
+	         _fxRoot  = GetUIUnit<RectTransform>("fxRoot"); 
 	       }
-	      return _fx_skill_mu;
-	     }
-	   }
-	  private GameObject _fx_skill_jing;
-	  public GameObject fx_skill_jing
-	   {
-	   get{
-	      if (_fx_skill_jing == null)
-	       {
-	         _fx_skill_jing  = GetUIUnit<GameObject>("fx_skill_jing"); 
-	       }
-	      return _fx_skill_jing;
-	     }
-	   }
-	  private GameObject _fx_skill_shui;
-	  public GameObject fx_skill_shui
-	   {
-	   get{
-	      if (_fx_skill_shui == null)
-	       {
-	         _fx_skill_shui  = GetUIUnit<GameObject>("fx_skill_shui"); 
-	       }
-	      return _fx_skill_shui;
-	     }
-	   }
-	  private GameObject _fx_skill_huo;
-	  public GameObject fx_skill_huo
-	   {
-	   get{
-	      if (_fx_skill_huo == null)
-	       {
-	         _fx_skill_huo  = GetUIUnit<GameObject>("fx_skill_huo"); 
-	       }
-	      return _fx_skill_huo;
-	     }
-	   }
-	  private GameObject _fx_skill_tu;
-	  public GameObject fx_skill_tu
-	   {
-	   get{
-	      if (_fx_skill_tu == null)
-	       {
-	         _fx_skill_tu  = GetUIUnit<GameObject>("fx_skill_tu"); 
-	       }
-	      return _fx_skill_tu;
+	      return _fxRoot;
 	     }
 	   }
 	  #endregion 自定义数据结束 

Plik diff jest za duży
+ 0 - 0
Assets/StreamingAssets/assetConfig.txt


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików