{"action":"created","comment":{"url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/comments/366021082","pull_request_review_id":342126884,"id":366021082,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2NjAyMTA4Mg==","diff_hunk":"@@ -0,0 +1,58 @@\n+﻿using System.Collections;\n+using System.Collections.Generic;\n+using UnityEngine;\n+using System.Linq;\n+\n+public class Sonar : MonoBehaviour\n+{\n+    //Script counts all distances from objects in tasks\n+\n+    public float viewRadious;\n+    public Transform tasks;\n+    private Dictionary<Transform, int> children;\n+\n+    \n+    \n+\n+    private void Start()\n+    {\n+\n+        children = new Dictionary<Transform, int>();\n+\n+\n+        //this read all children in the 1 hierarchy from tasks and give transform of object\n+        //value 0 in dictonary becouse objects are too far \n+        for (int ID = 0; ID < tasks.childCount; ID++)\n+        {\n+            children.Add(tasks.GetChild(ID), 0);\n+        }\n+\n+    }\n+\n+    // Update is called once per frame\n+    void Update()\n+    {\n+        for (int i = 0; i < children.Count; i++) {\n+\n+            var element = children.ElementAt(i);\n+\n+            //if distance beetween object and robot is smaller then viewRadious => Value in dictonary changes to 1\n+            if (Vector3.Distance(element.Key.position, transform.position) <= viewRadious)","path":"Assets/Scripts/Robot/Sonar.cs","position":40,"original_position":40,"commit_id":"e032e0cf700688bac2ec0a57d99bc49ce3a4893c","original_commit_id":"e032e0cf700688bac2ec0a57d99bc49ce3a4893c","user":{"login":"Korczak","id":29844618,"node_id":"MDQ6VXNlcjI5ODQ0NjE4","avatar_url":"https://avatars2.githubusercontent.com/u/29844618?v=4","gravatar_id":"","url":"https://api.github.com/users/Korczak","html_url":"https://github.com/Korczak","followers_url":"https://api.github.com/users/Korczak/followers","following_url":"https://api.github.com/users/Korczak/following{/other_user}","gists_url":"https://api.github.com/users/Korczak/gists{/gist_id}","starred_url":"https://api.github.com/users/Korczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Korczak/subscriptions","organizations_url":"https://api.github.com/users/Korczak/orgs","repos_url":"https://api.github.com/users/Korczak/repos","events_url":"https://api.github.com/users/Korczak/events{/privacy}","received_events_url":"https://api.github.com/users/Korczak/received_events","type":"User","site_admin":false},"body":"same as above, more comments means less readibility, Imho we should use comments only in cases when it is neccessary.","created_at":"2020-01-13T20:50:45Z","updated_at":"2020-01-13T20:52:10Z","html_url":"https://github.com/pwrdc/TransdecEnvironment/pull/56#discussion_r366021082","pull_request_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/56","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/comments/366021082"},"html":{"href":"https://github.com/pwrdc/TransdecEnvironment/pull/56#discussion_r366021082"},"pull_request":{"href":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/56","id":350089557,"node_id":"MDExOlB1bGxSZXF1ZXN0MzUwMDg5NTU3","html_url":"https://github.com/pwrdc/TransdecEnvironment/pull/56","diff_url":"https://github.com/pwrdc/TransdecEnvironment/pull/56.diff","patch_url":"https://github.com/pwrdc/TransdecEnvironment/pull/56.patch","issue_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues/56","number":56,"state":"open","locked":false,"title":"sonar","user":{"login":"szczoteczka","id":49596872,"node_id":"MDQ6VXNlcjQ5NTk2ODcy","avatar_url":"https://avatars1.githubusercontent.com/u/49596872?v=4","gravatar_id":"","url":"https://api.github.com/users/szczoteczka","html_url":"https://github.com/szczoteczka","followers_url":"https://api.github.com/users/szczoteczka/followers","following_url":"https://api.github.com/users/szczoteczka/following{/other_user}","gists_url":"https://api.github.com/users/szczoteczka/gists{/gist_id}","starred_url":"https://api.github.com/users/szczoteczka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szczoteczka/subscriptions","organizations_url":"https://api.github.com/users/szczoteczka/orgs","repos_url":"https://api.github.com/users/szczoteczka/repos","events_url":"https://api.github.com/users/szczoteczka/events{/privacy}","received_events_url":"https://api.github.com/users/szczoteczka/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-12-06T16:37:43Z","updated_at":"2020-01-13T20:52:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"643b8d5bffe8aaa6dfdb12f59435ff4adfddf534","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/56/commits","review_comments_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/56/comments","review_comment_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues/56/comments","statuses_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/statuses/e032e0cf700688bac2ec0a57d99bc49ce3a4893c","head":{"label":"pwrdc:sonar","ref":"sonar","sha":"e032e0cf700688bac2ec0a57d99bc49ce3a4893c","user":{"login":"pwrdc","id":57331607,"node_id":"MDQ6VXNlcjU3MzMxNjA3","avatar_url":"https://avatars1.githubusercontent.com/u/57331607?v=4","gravatar_id":"","url":"https://api.github.com/users/pwrdc","html_url":"https://github.com/pwrdc","followers_url":"https://api.github.com/users/pwrdc/followers","following_url":"https://api.github.com/users/pwrdc/following{/other_user}","gists_url":"https://api.github.com/users/pwrdc/gists{/gist_id}","starred_url":"https://api.github.com/users/pwrdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwrdc/subscriptions","organizations_url":"https://api.github.com/users/pwrdc/orgs","repos_url":"https://api.github.com/users/pwrdc/repos","events_url":"https://api.github.com/users/pwrdc/events{/privacy}","received_events_url":"https://api.github.com/users/pwrdc/received_events","type":"User","site_admin":false},"repo":{"id":158308628,"node_id":"MDEwOlJlcG9zaXRvcnkxNTgzMDg2Mjg=","name":"TransdecEnvironment","full_name":"pwrdc/TransdecEnvironment","private":false,"owner":{"login":"pwrdc","id":57331607,"node_id":"MDQ6VXNlcjU3MzMxNjA3","avatar_url":"https://avatars1.githubusercontent.com/u/57331607?v=4","gravatar_id":"","url":"https://api.github.com/users/pwrdc","html_url":"https://github.com/pwrdc","followers_url":"https://api.github.com/users/pwrdc/followers","following_url":"https://api.github.com/users/pwrdc/following{/other_user}","gists_url":"https://api.github.com/users/pwrdc/gists{/gist_id}","starred_url":"https://api.github.com/users/pwrdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwrdc/subscriptions","organizations_url":"https://api.github.com/users/pwrdc/orgs","repos_url":"https://api.github.com/users/pwrdc/repos","events_url":"https://api.github.com/users/pwrdc/events{/privacy}","received_events_url":"https://api.github.com/users/pwrdc/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pwrdc/TransdecEnvironment","description":"Unity model of TRANSDEC facility for RoboSub 2019","fork":false,"url":"https://api.github.com/repos/pwrdc/TransdecEnvironment","forks_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/forks","keys_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/teams","hooks_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/hooks","issue_events_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues/events{/number}","events_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/events","assignees_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/assignees{/user}","branches_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/branches{/branch}","tags_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/tags","blobs_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/refs{/sha}","trees_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/statuses/{sha}","languages_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/languages","stargazers_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/stargazers","contributors_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/contributors","subscribers_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/subscribers","subscription_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/subscription","commits_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/commits{/sha}","git_commits_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/commits{/sha}","comments_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/comments{/number}","issue_comment_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues/comments{/number}","contents_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/contents/{+path}","compare_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/merges","archive_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/downloads","issues_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues{/number}","pulls_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls{/number}","milestones_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/milestones{/number}","notifications_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/labels{/name}","releases_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/releases{/id}","deployments_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/deployments","created_at":"2018-11-20T00:39:57Z","updated_at":"2019-12-14T13:20:10Z","pushed_at":"2020-01-13T19:29:09Z","git_url":"git://github.com/pwrdc/TransdecEnvironment.git","ssh_url":"git@github.com:pwrdc/TransdecEnvironment.git","clone_url":"https://github.com/pwrdc/TransdecEnvironment.git","svn_url":"https://github.com/pwrdc/TransdecEnvironment","homepage":null,"size":244704,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"pwrdc:master","ref":"master","sha":"c81dfc6d04dc242b6760619f91d923ad7a6582c3","user":{"login":"pwrdc","id":57331607,"node_id":"MDQ6VXNlcjU3MzMxNjA3","avatar_url":"https://avatars1.githubusercontent.com/u/57331607?v=4","gravatar_id":"","url":"https://api.github.com/users/pwrdc","html_url":"https://github.com/pwrdc","followers_url":"https://api.github.com/users/pwrdc/followers","following_url":"https://api.github.com/users/pwrdc/following{/other_user}","gists_url":"https://api.github.com/users/pwrdc/gists{/gist_id}","starred_url":"https://api.github.com/users/pwrdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwrdc/subscriptions","organizations_url":"https://api.github.com/users/pwrdc/orgs","repos_url":"https://api.github.com/users/pwrdc/repos","events_url":"https://api.github.com/users/pwrdc/events{/privacy}","received_events_url":"https://api.github.com/users/pwrdc/received_events","type":"User","site_admin":false},"repo":{"id":158308628,"node_id":"MDEwOlJlcG9zaXRvcnkxNTgzMDg2Mjg=","name":"TransdecEnvironment","full_name":"pwrdc/TransdecEnvironment","private":false,"owner":{"login":"pwrdc","id":57331607,"node_id":"MDQ6VXNlcjU3MzMxNjA3","avatar_url":"https://avatars1.githubusercontent.com/u/57331607?v=4","gravatar_id":"","url":"https://api.github.com/users/pwrdc","html_url":"https://github.com/pwrdc","followers_url":"https://api.github.com/users/pwrdc/followers","following_url":"https://api.github.com/users/pwrdc/following{/other_user}","gists_url":"https://api.github.com/users/pwrdc/gists{/gist_id}","starred_url":"https://api.github.com/users/pwrdc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwrdc/subscriptions","organizations_url":"https://api.github.com/users/pwrdc/orgs","repos_url":"https://api.github.com/users/pwrdc/repos","events_url":"https://api.github.com/users/pwrdc/events{/privacy}","received_events_url":"https://api.github.com/users/pwrdc/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pwrdc/TransdecEnvironment","description":"Unity model of TRANSDEC facility for RoboSub 2019","fork":false,"url":"https://api.github.com/repos/pwrdc/TransdecEnvironment","forks_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/forks","keys_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/teams","hooks_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/hooks","issue_events_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues/events{/number}","events_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/events","assignees_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/assignees{/user}","branches_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/branches{/branch}","tags_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/tags","blobs_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/refs{/sha}","trees_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/statuses/{sha}","languages_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/languages","stargazers_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/stargazers","contributors_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/contributors","subscribers_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/subscribers","subscription_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/subscription","commits_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/commits{/sha}","git_commits_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/git/commits{/sha}","comments_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/comments{/number}","issue_comment_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues/comments{/number}","contents_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/contents/{+path}","compare_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/merges","archive_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/downloads","issues_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues{/number}","pulls_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls{/number}","milestones_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/milestones{/number}","notifications_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/labels{/name}","releases_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/releases{/id}","deployments_url":"https://api.github.com/repos/pwrdc/TransdecEnvironment/deployments","created_at":"2018-11-20T00:39:57Z","updated_at":"2019-12-14T13:20:10Z","pushed_at":"2020-01-13T19:29:09Z","git_url":"git://github.com/pwrdc/TransdecEnvironment.git","ssh_url":"git@github.com:pwrdc/TransdecEnvironment.git","clone_url":"https://github.com/pwrdc/TransdecEnvironment.git","svn_url":"https://github.com/pwrdc/TransdecEnvironment","homepage":null,"size":244704,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/56"},"html":{"href":"https://github.com/pwrdc/TransdecEnvironment/pull/56"},"issue":{"href":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues/56"},"comments":{"href":"https://api.github.com/repos/pwrdc/TransdecEnvironment/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pwrdc/TransdecEnvironment/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/pwrdc/TransdecEnvironment/statuses/e032e0cf700688bac2ec0a57d99bc49ce3a4893c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Korczak"}}