コード例 #1
0
        /// <summary>
        /// Starts a infinte loop to constantly update and do it's job
        /// </summary>
        public void Update()
        {
            Debug.LogImportant("Started Witcher ReplyToResponses bot");

            while (true)
            {
                Debug.LogImportant("Started Scanning...");

                Debug.Log("Scanning New posts...");
                List <Post> newPosts = m_redditService.GetNewPosts(POST_LIMIT);
                CheckPostsForResponses(newPosts);

                Debug.Log("Scanning Hot posts...");
                List <Post> hotPosts = m_redditService.GetHotPosts(POST_LIMIT);
                CheckPostsForResponses(hotPosts);

                //Debug.Log("Scanning Stickied posts...");
                //List<Post> stickedPosts = m_redditService.GetStickiedPosts();
                //CheckPostsForResponses(stickedPosts);

                //Clear comments for next time
                m_repliedToComments.Clear();
            }
        }