{"action":"created","comment":{"url":"https://api.github.com/repos/mocsarcade/starjunk/pulls/comments/53419512","id":53419512,"diff_hunk":"@@ -0,0 +1,32 @@\n+var Pixi = require(\"pixi.js\")\n+var Utility = require(\"./Utility\")\n+\n+import Reference from \"./Reference.js\"\n+import Junkership from \"./Junkership.js\"\n+import Trashbot from \"./Trashbot.js\"\n+import Score from \"./Score.js\"\n+\n+export default class Junk extends Pixi.Sprite {\n+    constructor(x, y) {\n+        super(PIXI.loader.resources.junk.texture)\n+        this.position.x = x\n+        this.position.y = y\n+        this.despawn = Date.now()\n+    }\n+\n+    update(delta) {\n+        if (Date.now() - this.despawn >= 5000) {\n+            game.removeChild(this)\n+            this.destroy()\n+        } else\n+            game.children.forEach((child) => {\n+                if (child instanceof Junkership) {\n+                    if (Utility.hasCollision(this, child.hitBox)) {\n+                        game.removeChild(this)\n+                        this.destroy()\n+                        child.score.incrementScore()\n+                    }\n+                }\n+            })\n+    }\n+}","path":"source/Junk.js","position":32,"original_position":32,"commit_id":"9e79c3d3f4f4588ea8ea42821b9139148ba1261f","original_commit_id":"9e79c3d3f4f4588ea8ea42821b9139148ba1261f","user":{"login":"codaventure","id":6219448,"avatar_url":"https://avatars.githubusercontent.com/u/6219448?v=3","gravatar_id":"","url":"https://api.github.com/users/codaventure","html_url":"https://github.com/codaventure","followers_url":"https://api.github.com/users/codaventure/followers","following_url":"https://api.github.com/users/codaventure/following{/other_user}","gists_url":"https://api.github.com/users/codaventure/gists{/gist_id}","starred_url":"https://api.github.com/users/codaventure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codaventure/subscriptions","organizations_url":"https://api.github.com/users/codaventure/orgs","repos_url":"https://api.github.com/users/codaventure/repos","events_url":"https://api.github.com/users/codaventure/events{/privacy}","received_events_url":"https://api.github.com/users/codaventure/received_events","type":"User","site_admin":false},"body":"Again the magic number. I would suggest using the form `Reference.JUNK_DESPAWN_RATE * 1000` because whatever number is used I'm sure we would prefer in terms of seconds instead of milliseconds.","created_at":"2016-02-19T03:35:52Z","updated_at":"2016-02-19T03:35:52Z","html_url":"https://github.com/mocsarcade/starjunk/pull/65#discussion_r53419512","pull_request_url":"https://api.github.com/repos/mocsarcade/starjunk/pulls/65","_links":{"self":{"href":"https://api.github.com/repos/mocsarcade/starjunk/pulls/comments/53419512"},"html":{"href":"https://github.com/mocsarcade/starjunk/pull/65#discussion_r53419512"},"pull_request":{"href":"https://api.github.com/repos/mocsarcade/starjunk/pulls/65"}}},"pull_request":{"url":"https://api.github.com/repos/mocsarcade/starjunk/pulls/65","id":59740239,"html_url":"https://github.com/mocsarcade/starjunk/pull/65","diff_url":"https://github.com/mocsarcade/starjunk/pull/65.diff","patch_url":"https://github.com/mocsarcade/starjunk/pull/65.patch","issue_url":"https://api.github.com/repos/mocsarcade/starjunk/issues/65","number":65,"state":"open","locked":false,"title":"Junk added to the game","user":{"login":"dhowerton","id":11837027,"avatar_url":"https://avatars.githubusercontent.com/u/11837027?v=3","gravatar_id":"","url":"https://api.github.com/users/dhowerton","html_url":"https://github.com/dhowerton","followers_url":"https://api.github.com/users/dhowerton/followers","following_url":"https://api.github.com/users/dhowerton/following{/other_user}","gists_url":"https://api.github.com/users/dhowerton/gists{/gist_id}","starred_url":"https://api.github.com/users/dhowerton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhowerton/subscriptions","organizations_url":"https://api.github.com/users/dhowerton/orgs","repos_url":"https://api.github.com/users/dhowerton/repos","events_url":"https://api.github.com/users/dhowerton/events{/privacy}","received_events_url":"https://api.github.com/users/dhowerton/received_events","type":"User","site_admin":false},"body":"Closes #34, closes #35, closes #38, and closes #39.  Adds junk to the game.  Junk spawns in place on enemy death \"randomly\", increases score when touched by player, and despawns after five seconds","created_at":"2016-02-18T02:01:30Z","updated_at":"2016-02-19T03:35:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"364c5db9ef7684568e54034c4044c57d469ba42b","assignee":{"login":"codaventure","id":6219448,"avatar_url":"https://avatars.githubusercontent.com/u/6219448?v=3","gravatar_id":"","url":"https://api.github.com/users/codaventure","html_url":"https://github.com/codaventure","followers_url":"https://api.github.com/users/codaventure/followers","following_url":"https://api.github.com/users/codaventure/following{/other_user}","gists_url":"https://api.github.com/users/codaventure/gists{/gist_id}","starred_url":"https://api.github.com/users/codaventure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codaventure/subscriptions","organizations_url":"https://api.github.com/users/codaventure/orgs","repos_url":"https://api.github.com/users/codaventure/repos","events_url":"https://api.github.com/users/codaventure/events{/privacy}","received_events_url":"https://api.github.com/users/codaventure/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mocsarcade/starjunk/milestones/2","html_url":"https://github.com/mocsarcade/starjunk/milestones/v0.2.0","labels_url":"https://api.github.com/repos/mocsarcade/starjunk/milestones/2/labels","id":1562502,"number":2,"title":"v0.2.0","description":"","creator":{"login":"ehgoodenough","id":1202938,"avatar_url":"https://avatars.githubusercontent.com/u/1202938?v=3","gravatar_id":"","url":"https://api.github.com/users/ehgoodenough","html_url":"https://github.com/ehgoodenough","followers_url":"https://api.github.com/users/ehgoodenough/followers","following_url":"https://api.github.com/users/ehgoodenough/following{/other_user}","gists_url":"https://api.github.com/users/ehgoodenough/gists{/gist_id}","starred_url":"https://api.github.com/users/ehgoodenough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehgoodenough/subscriptions","organizations_url":"https://api.github.com/users/ehgoodenough/orgs","repos_url":"https://api.github.com/users/ehgoodenough/repos","events_url":"https://api.github.com/users/ehgoodenough/events{/privacy}","received_events_url":"https://api.github.com/users/ehgoodenough/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":3,"state":"open","created_at":"2016-02-04T04:42:53Z","updated_at":"2016-02-18T07:14:35Z","due_on":"2016-03-12T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mocsarcade/starjunk/pulls/65/commits","review_comments_url":"https://api.github.com/repos/mocsarcade/starjunk/pulls/65/comments","review_comment_url":"https://api.github.com/repos/mocsarcade/starjunk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mocsarcade/starjunk/issues/65/comments","statuses_url":"https://api.github.com/repos/mocsarcade/starjunk/statuses/9e79c3d3f4f4588ea8ea42821b9139148ba1261f","head":{"label":"dhowerton:master","ref":"master","sha":"9e79c3d3f4f4588ea8ea42821b9139148ba1261f","user":{"login":"dhowerton","id":11837027,"avatar_url":"https://avatars.githubusercontent.com/u/11837027?v=3","gravatar_id":"","url":"https://api.github.com/users/dhowerton","html_url":"https://github.com/dhowerton","followers_url":"https://api.github.com/users/dhowerton/followers","following_url":"https://api.github.com/users/dhowerton/following{/other_user}","gists_url":"https://api.github.com/users/dhowerton/gists{/gist_id}","starred_url":"https://api.github.com/users/dhowerton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhowerton/subscriptions","organizations_url":"https://api.github.com/users/dhowerton/orgs","repos_url":"https://api.github.com/users/dhowerton/repos","events_url":"https://api.github.com/users/dhowerton/events{/privacy}","received_events_url":"https://api.github.com/users/dhowerton/received_events","type":"User","site_admin":false},"repo":{"id":51042205,"name":"starjunk","full_name":"dhowerton/starjunk","owner":{"login":"dhowerton","id":11837027,"avatar_url":"https://avatars.githubusercontent.com/u/11837027?v=3","gravatar_id":"","url":"https://api.github.com/users/dhowerton","html_url":"https://github.com/dhowerton","followers_url":"https://api.github.com/users/dhowerton/followers","following_url":"https://api.github.com/users/dhowerton/following{/other_user}","gists_url":"https://api.github.com/users/dhowerton/gists{/gist_id}","starred_url":"https://api.github.com/users/dhowerton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhowerton/subscriptions","organizations_url":"https://api.github.com/users/dhowerton/orgs","repos_url":"https://api.github.com/users/dhowerton/repos","events_url":"https://api.github.com/users/dhowerton/events{/privacy}","received_events_url":"https://api.github.com/users/dhowerton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhowerton/starjunk","description":"A game about intergalactic salvaging.","fork":true,"url":"https://api.github.com/repos/dhowerton/starjunk","forks_url":"https://api.github.com/repos/dhowerton/starjunk/forks","keys_url":"https://api.github.com/repos/dhowerton/starjunk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhowerton/starjunk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhowerton/starjunk/teams","hooks_url":"https://api.github.com/repos/dhowerton/starjunk/hooks","issue_events_url":"https://api.github.com/repos/dhowerton/starjunk/issues/events{/number}","events_url":"https://api.github.com/repos/dhowerton/starjunk/events","assignees_url":"https://api.github.com/repos/dhowerton/starjunk/assignees{/user}","branches_url":"https://api.github.com/repos/dhowerton/starjunk/branches{/branch}","tags_url":"https://api.github.com/repos/dhowerton/starjunk/tags","blobs_url":"https://api.github.com/repos/dhowerton/starjunk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhowerton/starjunk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhowerton/starjunk/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhowerton/starjunk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhowerton/starjunk/statuses/{sha}","languages_url":"https://api.github.com/repos/dhowerton/starjunk/languages","stargazers_url":"https://api.github.com/repos/dhowerton/starjunk/stargazers","contributors_url":"https://api.github.com/repos/dhowerton/starjunk/contributors","subscribers_url":"https://api.github.com/repos/dhowerton/starjunk/subscribers","subscription_url":"https://api.github.com/repos/dhowerton/starjunk/subscription","commits_url":"https://api.github.com/repos/dhowerton/starjunk/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhowerton/starjunk/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhowerton/starjunk/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhowerton/starjunk/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhowerton/starjunk/contents/{+path}","compare_url":"https://api.github.com/repos/dhowerton/starjunk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhowerton/starjunk/merges","archive_url":"https://api.github.com/repos/dhowerton/starjunk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhowerton/starjunk/downloads","issues_url":"https://api.github.com/repos/dhowerton/starjunk/issues{/number}","pulls_url":"https://api.github.com/repos/dhowerton/starjunk/pulls{/number}","milestones_url":"https://api.github.com/repos/dhowerton/starjunk/milestones{/number}","notifications_url":"https://api.github.com/repos/dhowerton/starjunk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhowerton/starjunk/labels{/name}","releases_url":"https://api.github.com/repos/dhowerton/starjunk/releases{/id}","deployments_url":"https://api.github.com/repos/dhowerton/starjunk/deployments","created_at":"2016-02-04T00:52:00Z","updated_at":"2016-02-04T00:52:01Z","pushed_at":"2016-02-18T01:56:29Z","git_url":"git://github.com/dhowerton/starjunk.git","ssh_url":"git@github.com:dhowerton/starjunk.git","clone_url":"https://github.com/dhowerton/starjunk.git","svn_url":"https://github.com/dhowerton/starjunk","homepage":"","size":20632,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mocsarcade:master","ref":"master","sha":"d79fb967f003ae63c3e5b9f22ca22cbfb76d65ac","user":{"login":"mocsarcade","id":10573777,"avatar_url":"https://avatars.githubusercontent.com/u/10573777?v=3","gravatar_id":"","url":"https://api.github.com/users/mocsarcade","html_url":"https://github.com/mocsarcade","followers_url":"https://api.github.com/users/mocsarcade/followers","following_url":"https://api.github.com/users/mocsarcade/following{/other_user}","gists_url":"https://api.github.com/users/mocsarcade/gists{/gist_id}","starred_url":"https://api.github.com/users/mocsarcade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mocsarcade/subscriptions","organizations_url":"https://api.github.com/users/mocsarcade/orgs","repos_url":"https://api.github.com/users/mocsarcade/repos","events_url":"https://api.github.com/users/mocsarcade/events{/privacy}","received_events_url":"https://api.github.com/users/mocsarcade/received_events","type":"Organization","site_admin":false},"repo":{"id":42917335,"name":"starjunk","full_name":"mocsarcade/starjunk","owner":{"login":"mocsarcade","id":10573777,"avatar_url":"https://avatars.githubusercontent.com/u/10573777?v=3","gravatar_id":"","url":"https://api.github.com/users/mocsarcade","html_url":"https://github.com/mocsarcade","followers_url":"https://api.github.com/users/mocsarcade/followers","following_url":"https://api.github.com/users/mocsarcade/following{/other_user}","gists_url":"https://api.github.com/users/mocsarcade/gists{/gist_id}","starred_url":"https://api.github.com/users/mocsarcade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mocsarcade/subscriptions","organizations_url":"https://api.github.com/users/mocsarcade/orgs","repos_url":"https://api.github.com/users/mocsarcade/repos","events_url":"https://api.github.com/users/mocsarcade/events{/privacy}","received_events_url":"https://api.github.com/users/mocsarcade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mocsarcade/starjunk","description":"A game about intergalactic salvaging.","fork":false,"url":"https://api.github.com/repos/mocsarcade/starjunk","forks_url":"https://api.github.com/repos/mocsarcade/starjunk/forks","keys_url":"https://api.github.com/repos/mocsarcade/starjunk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mocsarcade/starjunk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mocsarcade/starjunk/teams","hooks_url":"https://api.github.com/repos/mocsarcade/starjunk/hooks","issue_events_url":"https://api.github.com/repos/mocsarcade/starjunk/issues/events{/number}","events_url":"https://api.github.com/repos/mocsarcade/starjunk/events","assignees_url":"https://api.github.com/repos/mocsarcade/starjunk/assignees{/user}","branches_url":"https://api.github.com/repos/mocsarcade/starjunk/branches{/branch}","tags_url":"https://api.github.com/repos/mocsarcade/starjunk/tags","blobs_url":"https://api.github.com/repos/mocsarcade/starjunk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mocsarcade/starjunk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mocsarcade/starjunk/git/refs{/sha}","trees_url":"https://api.github.com/repos/mocsarcade/starjunk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mocsarcade/starjunk/statuses/{sha}","languages_url":"https://api.github.com/repos/mocsarcade/starjunk/languages","stargazers_url":"https://api.github.com/repos/mocsarcade/starjunk/stargazers","contributors_url":"https://api.github.com/repos/mocsarcade/starjunk/contributors","subscribers_url":"https://api.github.com/repos/mocsarcade/starjunk/subscribers","subscription_url":"https://api.github.com/repos/mocsarcade/starjunk/subscription","commits_url":"https://api.github.com/repos/mocsarcade/starjunk/commits{/sha}","git_commits_url":"https://api.github.com/repos/mocsarcade/starjunk/git/commits{/sha}","comments_url":"https://api.github.com/repos/mocsarcade/starjunk/comments{/number}","issue_comment_url":"https://api.github.com/repos/mocsarcade/starjunk/issues/comments{/number}","contents_url":"https://api.github.com/repos/mocsarcade/starjunk/contents/{+path}","compare_url":"https://api.github.com/repos/mocsarcade/starjunk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mocsarcade/starjunk/merges","archive_url":"https://api.github.com/repos/mocsarcade/starjunk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mocsarcade/starjunk/downloads","issues_url":"https://api.github.com/repos/mocsarcade/starjunk/issues{/number}","pulls_url":"https://api.github.com/repos/mocsarcade/starjunk/pulls{/number}","milestones_url":"https://api.github.com/repos/mocsarcade/starjunk/milestones{/number}","notifications_url":"https://api.github.com/repos/mocsarcade/starjunk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mocsarcade/starjunk/labels{/name}","releases_url":"https://api.github.com/repos/mocsarcade/starjunk/releases{/id}","deployments_url":"https://api.github.com/repos/mocsarcade/starjunk/deployments","created_at":"2015-09-22T07:06:15Z","updated_at":"2016-02-18T18:37:13Z","pushed_at":"2016-02-19T03:19:45Z","git_url":"git://github.com/mocsarcade/starjunk.git","ssh_url":"git@github.com:mocsarcade/starjunk.git","clone_url":"https://github.com/mocsarcade/starjunk.git","svn_url":"https://github.com/mocsarcade/starjunk","homepage":"","size":21328,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":34,"forks":4,"open_issues":34,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mocsarcade/starjunk/pulls/65"},"html":{"href":"https://github.com/mocsarcade/starjunk/pull/65"},"issue":{"href":"https://api.github.com/repos/mocsarcade/starjunk/issues/65"},"comments":{"href":"https://api.github.com/repos/mocsarcade/starjunk/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/mocsarcade/starjunk/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/mocsarcade/starjunk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mocsarcade/starjunk/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/mocsarcade/starjunk/statuses/9e79c3d3f4f4588ea8ea42821b9139148ba1261f"}}}}