CombatMonoBaisc.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. protected 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. public async CTask GameOver(bool isWin)
  33. {
  34. await ProGameOver(isWin);
  35. }
  36. protected virtual async CTask ProGameOver(bool isWin)
  37. {
  38. }
  39. // protected void HeroDie(IEventData iEventData)
  40. // {
  41. // HeroDieEventData heroDieEventData= iEventData as HeroDieEventData;
  42. // if (heroDieEventData.combatHeroEntity.IsEnemy)
  43. // {
  44. // return;
  45. // }
  46. //
  47. // BetterList<CombatHeroEntity> myHero = combatController.CombatHeroController.GetHeroList(false);
  48. // if (myHero.Count <= 0)
  49. // {
  50. // // BattleSettlementPanel.OpenPanel(true);
  51. // }
  52. // }
  53. protected void Combat_ItemShow(IEventData iEventData)
  54. {
  55. }
  56. private void SetTargetPoint(ImageMove imageMove)
  57. {
  58. }
  59. public void Update(float t)
  60. {
  61. }
  62. }
  63. }