|
@@ -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,
|