DialogueMono.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using Common.Utility.CombatEvent;
  4. using Fort23.Core;
  5. using Fort23.Mono;
  6. using GameLogic.Bag;
  7. using GameLogic.Combat;
  8. namespace GameUI
  9. {
  10. public class DialogueMono : IDialogueMono
  11. {
  12. public void OpenDialoguePanel(int id, string[] icon, ShowDialogueEventData.MessageShowType messageShowType,
  13. Action<int?> finish)
  14. {
  15. DialoguePanel.OpenDialoguePanel(id, icon, messageShowType, finish);
  16. }
  17. public async CTask OpenRewardsPanel(List<ItemInfo> rewardsDic, Action onClose = null, int titleId = 0)
  18. {
  19. CTask cTask = CTask.Create();
  20. RewardsPanel rewardsPanel = await RewardsPanel.OpenPanel(rewardsDic, onClose, titleId);
  21. await rewardsPanel.UIClosed();
  22. cTask.SetResult();
  23. }
  24. public async CTask OpenDialoguePanel(int id, Action<int?> finish)
  25. {
  26. await DialogueBubblePanel.OpenDialoguePanel(id, finish);
  27. }
  28. public void StartCombat(int levelBattle, Action<bool> finishCombat)
  29. {
  30. CombatDrive.Instance.LoadLevelBattleCombat(levelBattle, finishCombat);
  31. }
  32. }
  33. }