public void StartTalk(TalkCloudBase cloud, TalkData talkData) { if (!_isTalking) { _talkCloud = cloud; _talkCloud.Init(talkData.PagesCount); _talkCloud.OnCloudShown += OnCloudShown; _talkCloud.OnCloudHidden += OnCloudHidden; _talkData = talkData; _currentPage = _talkData.GetPage(_firstPage); _talkCloud.SetPage(_currentPage, _firstPage); if (_talkData) { _isTalking = true; _pageIndex = default; _isLastPage = default; _canShowNextPage = default; _writerControl.Init(_currentPage, _talkCloud.TextControl); _talkCloud.OnShowCloud(); _talkCallback?.Invoke(TalkEvent.Started); } else { Debug.LogError($"Talk Data is null"); } } }
public void StartTalk(TalkCloudBase cloud, TalkInfo talkInfo, Action <TalkEvent> talkCallback, Action <string> wordEventCallback) { if (!_isTalking) { _onWordEventCallBack = wordEventCallback; StartTalk(cloud, talkInfo, talkCallback); } }
public void StartTalk(TalkCloudBase cloud, TalkInfo talkInfo) { if (!_isTalking) { _talkData = _scriptableContainer.Container.GetTalkAsset(talkInfo); StartTalk(cloud, _talkData); } }
public void StartTalk(TalkCloudBase cloud, TalkInfo talkInfo, Action <TalkEvent> talkCallback) { if (!_isTalking) { _talkCallback = talkCallback; StartTalk(cloud, talkInfo); } }
public void StartTalk(TalkCloudBase cloud, TalkData talkData, Action <string> wordEventCallback) { if (!_isTalking) { _onWordEventCallBack = wordEventCallback; StartTalk(cloud, talkData); } }