예제 #1
0
    //コルーチンでコメントをチェックする。
    private IEnumerator commentChecker(JSON.CommentInfo _commentInfo)
    {
        var comment     = _commentInfo.Message;
        var isSuperChat = false;

        if (isDebug)
        {
            Debug.Log("check:" + comment);
        }

        if (isUseChannelInfo)
        {
            YouTubeChannelInfoCheck.Instance.channelCheck(_commentInfo.AuthorId);
        }

        if (YouTubeCommentType.isSuperChat(_commentInfo.Type))
        {
            superChatAction.superChatAction();
            isSuperChat = true;
        }

        for (int i = 0; i < commentActionSettings.Count; i++)
        {
            string _target = commentActionSettings[i].targetComment;
            if (comment.Contains(_target))
            {
                commentActionSettings[i]._commentAction.applyCommentAction(comment, _target, isSuperChat);
                yield break;
            }
        }

        yield break;
    }
예제 #2
0
 //コメントチェックのコルーチンを実行する
 internal void startCommentCheck(JSON.CommentInfo youtubeCommentInfo)
 {
     StartCoroutine(commentChecker(youtubeCommentInfo));
 }