CombatMonoBaisc.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System.Collections.Generic;
  2. using CombatLibrary.CombatLibrary.CombatCore.Utility;
  3. using Common.Utility.CombatEvent;
  4. using Core.Audio;
  5. using Fort23.Core;
  6. using Fort23.Mono;
  7. using Fort23.UTool;
  8. using GameLogic.Bag;
  9. using GameLogic.Combat.CombatTool;
  10. using GameLogic.Combat.CombatType;
  11. using UnityEngine;
  12. using UnityEngine.UI;
  13. using Utility.UITool;
  14. namespace GameUI.Combat
  15. {
  16. /// <summary>
  17. /// 战斗和mono层的桥接
  18. /// </summary>
  19. public class CombatMonoBaisc
  20. {
  21. private CombatController combatController;
  22. public async CTask Init(CombatController combatController)
  23. {
  24. this.combatController = combatController;
  25. AddEvent();
  26. }
  27. protected void AddEvent()
  28. {
  29. EventManager.Instance.AddEventListener(CustomEventType.Combat_ItemShow, Combat_ItemShow);
  30. CombatEventManager.Instance.AddEventListener(CombatEventType.HeroDieFinish, HeroDie);
  31. }
  32. protected void HeroDie(IEventData iEventData)
  33. {
  34. HeroDieEventData heroDieEventData= iEventData as HeroDieEventData;
  35. if (heroDieEventData.combatHeroEntity.IsEnemy)
  36. {
  37. return;
  38. }
  39. BetterList<CombatHeroEntity> myHero = combatController.CombatHeroController.GetHeroList(false);
  40. if (myHero.Count <= 0)
  41. {
  42. }
  43. }
  44. protected void Combat_ItemShow(IEventData iEventData)
  45. {
  46. }
  47. private void SetTargetPoint(ImageMove imageMove)
  48. {
  49. }
  50. public void Update(float t)
  51. {
  52. }
  53. }
  54. }