|
@@ -11,16 +11,11 @@ using UnityEngine;
|
|
namespace Fort23.Mono
|
|
namespace Fort23.Mono
|
|
{
|
|
{
|
|
[UIBinding(prefab = "ZhuanPanPanel")]
|
|
[UIBinding(prefab = "ZhuanPanPanel")]
|
|
- public partial class ZhuanPanPanel : UIPanel
|
|
|
|
|
|
+ public partial class ZhuanPanPanel : UIComponent
|
|
{
|
|
{
|
|
private List<gf_widget> _gfWidgets = new List<gf_widget>();
|
|
private List<gf_widget> _gfWidgets = new List<gf_widget>();
|
|
|
|
|
|
- public static async CTask OpenZhuanPanPanel()
|
|
|
|
- {
|
|
|
|
- ZhuanPanPanel zhuanPanPanel =
|
|
|
|
- await UIManager.Instance.LoadAndOpenPanel<ZhuanPanPanel>(null, UILayer.Bottom);
|
|
|
|
- zhuanPanPanel.ShowPanel();
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
public async CTask ShowPanel()
|
|
public async CTask ShowPanel()
|
|
{
|
|
{
|
|
@@ -32,8 +27,8 @@ namespace Fort23.Mono
|
|
double b = -Math.Sin(hd);
|
|
double b = -Math.Sin(hd);
|
|
double c = Math.Sin(hd);
|
|
double c = Math.Sin(hd);
|
|
double d = a;
|
|
double d = a;
|
|
- double x = a * 0 + b * 120;
|
|
|
|
- double y = c * 0 + d * 120;
|
|
|
|
|
|
+ double x = a * 0 + b * 57;
|
|
|
|
+ double y = c * 0 + d * 57;
|
|
|
|
|
|
int index = i;
|
|
int index = i;
|
|
WuXingGongFaWidget widget = await UIManager.Instance.CreateGComponentForObject<WuXingGongFaWidget>(
|
|
WuXingGongFaWidget widget = await UIManager.Instance.CreateGComponentForObject<WuXingGongFaWidget>(
|
|
@@ -48,21 +43,21 @@ namespace Fort23.Mono
|
|
{
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
- protected override void AddEvent()
|
|
|
|
|
|
+ public override void AddEvent()
|
|
{
|
|
{
|
|
StaticUpdater.Instance.AddLateUpdateCallBack(Update);
|
|
StaticUpdater.Instance.AddLateUpdateCallBack(Update);
|
|
CombatEventManager.Instance.AddEventListener(CombatEventType.ExercisesAlter, ExercisesAlter);
|
|
CombatEventManager.Instance.AddEventListener(CombatEventType.ExercisesAlter, ExercisesAlter);
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
CombatEventManager.Instance.AddEventListener(CombatEventType.TaoismSkillAlter, TaoismSkillAlter);
|
|
CombatEventManager.Instance.AddEventListener(CombatEventType.TaoismSkillAlter, TaoismSkillAlter);
|
|
}
|
|
}
|
|
|
|
|
|
- protected override void DelEvent()
|
|
|
|
|
|
+ public override void DelEvent()
|
|
{
|
|
{
|
|
StaticUpdater.Instance.RemoveLateUpdateCallBack(Update);
|
|
StaticUpdater.Instance.RemoveLateUpdateCallBack(Update);
|
|
CombatEventManager.Instance.RemoveEventListener(CombatEventType.ExercisesAlter, ExercisesAlter);
|
|
CombatEventManager.Instance.RemoveEventListener(CombatEventType.ExercisesAlter, ExercisesAlter);
|
|
// CombatEventManager.Instance.RemoveEventListener(CombatEventType.AddUseGongFa, AddUseGongFa);
|
|
// CombatEventManager.Instance.RemoveEventListener(CombatEventType.AddUseGongFa, AddUseGongFa);
|
|
-
|
|
|
|
|
|
+
|
|
CombatEventManager.Instance.RemoveEventListener(CombatEventType.TaoismSkillAlter, TaoismSkillAlter);
|
|
CombatEventManager.Instance.RemoveEventListener(CombatEventType.TaoismSkillAlter, TaoismSkillAlter);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -77,8 +72,6 @@ namespace Fort23.Mono
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
private async void ExercisesAlter(IEventData iEventData)
|
|
private async void ExercisesAlter(IEventData iEventData)
|
|
{
|
|
{
|
|
_gfWidgets.Clear();
|
|
_gfWidgets.Clear();
|
|
@@ -128,44 +121,18 @@ namespace Fort23.Mono
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- // lanLiang.fillAmount = combatHeroSkillControl.addChongNeng / 150f;
|
|
|
|
- // lanLiang.color = !combatHeroSkillControl.isKuoLiQuanKai
|
|
|
|
- // ? new Color(1f, 0.96f, 0f)
|
|
|
|
- // : new Color(0.96f, 0f, 1f);
|
|
|
|
|
|
+
|
|
for (int i = 0; i < _gfWidgets.Count; i++)
|
|
for (int i = 0; i < _gfWidgets.Count; i++)
|
|
{
|
|
{
|
|
gf_widget gfWidget = _gfWidgets[i];
|
|
gf_widget gfWidget = _gfWidgets[i];
|
|
- // if (gfWidget.useCount != gfWidget.SkillBasic.useCount)
|
|
|
|
- // {
|
|
|
|
- // gfWidget.useCount = gfWidget.SkillBasic.useCount;
|
|
|
|
- // switch (gfWidget.SkillBasic.useTriggerType)
|
|
|
|
- // {
|
|
|
|
- // case 0:
|
|
|
|
- // jin.Play("show", false);
|
|
|
|
- // break;
|
|
|
|
- // case 1:
|
|
|
|
- // mu.Play("show", false);
|
|
|
|
- // break;
|
|
|
|
- // case 2:
|
|
|
|
- // shui.Play("show", false);
|
|
|
|
- // break;
|
|
|
|
- // case 3:
|
|
|
|
- // huo.Play("show", false);
|
|
|
|
- // break;
|
|
|
|
- // case 4:
|
|
|
|
- // tu.Play("show", false);
|
|
|
|
- // break;
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ gfWidget.Update();
|
|
double hd = gfWidget.SkillBasic.angle * Math.PI / 180f;
|
|
double hd = gfWidget.SkillBasic.angle * Math.PI / 180f;
|
|
double a = Math.Cos(hd);
|
|
double a = Math.Cos(hd);
|
|
double b = -Math.Sin(hd);
|
|
double b = -Math.Sin(hd);
|
|
double c = Math.Sin(hd);
|
|
double c = Math.Sin(hd);
|
|
double d = a;
|
|
double d = a;
|
|
- double x = a * 0 + b * 60;
|
|
|
|
- double y = c * 0 + d * 60;
|
|
|
|
|
|
+ double x = a * 0 + b * 110;
|
|
|
|
+ double y = c * 0 + d * 110;
|
|
|
|
|
|
gfWidget.transform.anchoredPosition = new Vector2((float)x, (float)y);
|
|
gfWidget.transform.anchoredPosition = new Vector2((float)x, (float)y);
|
|
}
|
|
}
|