Copied the 89 uncopied AI*SimulationUtility/extension files defining the AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
59 lines
1.8 KiB
C#
59 lines
1.8 KiB
C#
using System;
|
|
using Cute;
|
|
using UnityEngine;
|
|
|
|
namespace Wizard;
|
|
|
|
public class ChatSendReplayUI : MonoBehaviour, IChatActionUI
|
|
{
|
|
[SerializeField]
|
|
private UIButton _buttonReplayShare;
|
|
|
|
[SerializeField]
|
|
private ChatReplayListDialog _prefabReplayShareDialog;
|
|
|
|
[SerializeField]
|
|
private ChatReplaySendConfirmDialog _prefabReplaySendConfirmDialog;
|
|
|
|
private ChatSendReplayListUI _chatSendReplayListUI;
|
|
|
|
private IChatApiSettings _chatApiSettings;
|
|
|
|
private ChatConnectController _chatConnectController;
|
|
|
|
private Action _eventOnSendRepleySuccess;
|
|
|
|
public void Init(IChatSettings chatSettings, ChatConnectController chatConnectController, ChatLogUI chatLogUI, Action actionAddNewChatLogAfterSendChat)
|
|
{
|
|
_chatApiSettings = chatSettings.ApiSettings;
|
|
_chatConnectController = chatConnectController;
|
|
_eventOnSendRepleySuccess = actionAddNewChatLogAfterSendChat;
|
|
_chatSendReplayListUI = new ChatSendReplayListUI(_prefabReplayShareDialog, _prefabReplaySendConfirmDialog, OnDecideReplay);
|
|
_buttonReplayShare.onClick.Clear();
|
|
_buttonReplayShare.onClick.Add(new EventDelegate(delegate
|
|
{
|
|
OnClickReplayShareButton();
|
|
}));
|
|
}
|
|
|
|
private void OnClickReplayShareButton()
|
|
{
|
|
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE);
|
|
ReplayInfoTask task = new ReplayInfoTask();
|
|
_chatConnectController.StartConnectCommon(task, delegate
|
|
{
|
|
_chatSendReplayListUI.CreateReplayListDialog();
|
|
});
|
|
}
|
|
|
|
private void OnDecideReplay(ReplayInfoItem infoItem)
|
|
{
|
|
ChatAddReplayTask chatAddReplayTask = new ChatAddReplayTask(_chatApiSettings.ApiChatAddReplay);
|
|
chatAddReplayTask.SetParameter(infoItem.BattleId);
|
|
_chatConnectController.StartConnectCommon(chatAddReplayTask, delegate
|
|
{
|
|
_eventOnSendRepleySuccess.Call();
|
|
});
|
|
}
|
|
}
|