{"action":"created","comment":{"url":"https://api.github.com/repos/Capstrong/Godlands/pulls/comments/24726821","id":24726821,"diff_hunk":"@@ -0,0 +1,168 @@\n+﻿using UnityEngine;\n+using System.Collections;\n+\n+[RequireComponent( typeof( ActorPhysics ) )]\n+public class PlayerControls : MonoBehaviour\n+{\n+\tPlayerActor _actor;\n+\tActorPhysics _actorPhysics;\n+\tbool _jumpButtonDown = false;\n+\tbool _glideButtonDown = false;\n+\tbool _isGrabbing = false;\n+\n+\tvoid Awake()\n+\t{\n+\t\t_actor = GetComponent<PlayerActor>();\n+\t\t_actorPhysics = GetComponent<ActorPhysics>();\n+\n+\t\tSetupStateMethodMap();\n+\t}\n+\n+\tvoid Update()\n+\t{\n+\t\tif ( Input.GetKeyDown( KeyCode.Escape ) )\n+\t\t{\n+\t\t\tApplication.Quit();\n+\t\t}\n+\n+\t\t_isGrabbing = WadeUtils.ValidAxisInput(\"Grab\");\n+\t\t_jumpButtonDown = Input.GetButtonDown( \"Jump\" + WadeUtils.platformName );\n+\t\t_glideButtonDown = Input.GetKey( KeyCode.F );\n+\t}\n+\n+\tvoid SetupStateMethodMap()\n+\t{\n+\t\t_actorPhysics.RegisterStateMethod( ActorStates.Jumping, Jumping );\n+\t\t_actorPhysics.RegisterStateMethod( ActorStates.Falling, Jumping );\n+\t\t_actorPhysics.RegisterStateMethod( ActorStates.Grounded, Grounded );\n+\t\t_actorPhysics.RegisterStateMethod( ActorStates.Rolling, Rolling );\n+\t\t_actorPhysics.RegisterStateMethod( ActorStates.Climbing, Climbing );\n+\t}\n+\n+\tvoid Jumping()\n+\t{\n+\t\tif ( _jumpButtonDown )\n+\t\t{\n+\t\t\t_actorPhysics.JumpCheck();\n+\t\t}\n+\n+\t\tif ( _isGrabbing )\n+\t\t{\n+\t\t\t_actorPhysics.ClimbCheck();\n+\t\t}\n+\n+\t\t_actorPhysics.RollCheck();\n+\n+\t\tif ( _glideButtonDown )\n+\t\t{\n+\t\t\t_actorPhysics.GlideMovement( GetMoveDirection() );\n+\t\t}\n+\t\telse\n+\t\t{\n+\t\t\t_actorPhysics.JumpMovement( GetMoveDirection() );\n+\t\t}\n+\t}\n+\n+\tvoid Rolling()\n+\t{\n+\t\t_actorPhysics.RollCheck();\n+\t\t_actorPhysics.RollMovement();\n+\t}\n+\n+\tvoid Climbing()\n+\t{\n+\t\tif ( _actorPhysics.ClimbCheck() &&\n+\t\t\t_isGrabbing &&","path":"Assets/Scripts/PlayerControls.cs","position":75,"original_position":75,"commit_id":"4e00f8f6d165d5686dfc66558233b6e29e9438de","original_commit_id":"4e00f8f6d165d5686dfc66558233b6e29e9438de","user":{"login":"brickman1444","id":598011,"avatar_url":"https://avatars.githubusercontent.com/u/598011?v=3","gravatar_id":"","url":"https://api.github.com/users/brickman1444","html_url":"https://github.com/brickman1444","followers_url":"https://api.github.com/users/brickman1444/followers","following_url":"https://api.github.com/users/brickman1444/following{/other_user}","gists_url":"https://api.github.com/users/brickman1444/gists{/gist_id}","starred_url":"https://api.github.com/users/brickman1444/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brickman1444/subscriptions","organizations_url":"https://api.github.com/users/brickman1444/orgs","repos_url":"https://api.github.com/users/brickman1444/repos","events_url":"https://api.github.com/users/brickman1444/events{/privacy}","received_events_url":"https://api.github.com/users/brickman1444/received_events","type":"User","site_admin":false},"body":"consider realigning conditions with spaces","created_at":"2015-02-15T22:18:08Z","updated_at":"2015-02-15T22:18:08Z","html_url":"https://github.com/Capstrong/Godlands/pull/44#discussion_r24726821","pull_request_url":"https://api.github.com/repos/Capstrong/Godlands/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/Capstrong/Godlands/pulls/comments/24726821"},"html":{"href":"https://github.com/Capstrong/Godlands/pull/44#discussion_r24726821"},"pull_request":{"href":"https://api.github.com/repos/Capstrong/Godlands/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/Capstrong/Godlands/pulls/44","id":29327490,"html_url":"https://github.com/Capstrong/Godlands/pull/44","diff_url":"https://github.com/Capstrong/Godlands/pull/44.diff","patch_url":"https://github.com/Capstrong/Godlands/pull/44.patch","issue_url":"https://api.github.com/repos/Capstrong/Godlands/issues/44","number":44,"state":"open","locked":false,"title":"Convert PlayerActorPhysics into PlayerControls","user":{"login":"excaliburHisSheath","id":1900829,"avatar_url":"https://avatars.githubusercontent.com/u/1900829?v=3","gravatar_id":"","url":"https://api.github.com/users/excaliburHisSheath","html_url":"https://github.com/excaliburHisSheath","followers_url":"https://api.github.com/users/excaliburHisSheath/followers","following_url":"https://api.github.com/users/excaliburHisSheath/following{/other_user}","gists_url":"https://api.github.com/users/excaliburHisSheath/gists{/gist_id}","starred_url":"https://api.github.com/users/excaliburHisSheath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/excaliburHisSheath/subscriptions","organizations_url":"https://api.github.com/users/excaliburHisSheath/orgs","repos_url":"https://api.github.com/users/excaliburHisSheath/repos","events_url":"https://api.github.com/users/excaliburHisSheath/events{/privacy}","received_events_url":"https://api.github.com/users/excaliburHisSheath/received_events","type":"User","site_admin":false},"body":"work on #40\r\n- Updated the Player prefab to reflect the changes, and patched some references that got broken at some point.\r\n- Also updated the buddy animator to clear up some warnings.","created_at":"2015-02-14T23:52:21Z","updated_at":"2015-02-15T22:18:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc8d8ebefbeb0e9fdd7e742a4a5a57ee51c17619","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Capstrong/Godlands/pulls/44/commits","review_comments_url":"https://api.github.com/repos/Capstrong/Godlands/pulls/44/comments","review_comment_url":"https://api.github.com/repos/Capstrong/Godlands/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Capstrong/Godlands/issues/44/comments","statuses_url":"https://api.github.com/repos/Capstrong/Godlands/statuses/4e00f8f6d165d5686dfc66558233b6e29e9438de","head":{"label":"Capstrong:gliding","ref":"gliding","sha":"4e00f8f6d165d5686dfc66558233b6e29e9438de","user":{"login":"Capstrong","id":10466570,"avatar_url":"https://avatars.githubusercontent.com/u/10466570?v=3","gravatar_id":"","url":"https://api.github.com/users/Capstrong","html_url":"https://github.com/Capstrong","followers_url":"https://api.github.com/users/Capstrong/followers","following_url":"https://api.github.com/users/Capstrong/following{/other_user}","gists_url":"https://api.github.com/users/Capstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/Capstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Capstrong/subscriptions","organizations_url":"https://api.github.com/users/Capstrong/orgs","repos_url":"https://api.github.com/users/Capstrong/repos","events_url":"https://api.github.com/users/Capstrong/events{/privacy}","received_events_url":"https://api.github.com/users/Capstrong/received_events","type":"Organization","site_admin":false},"repo":{"id":29553492,"name":"Godlands","full_name":"Capstrong/Godlands","owner":{"login":"Capstrong","id":10466570,"avatar_url":"https://avatars.githubusercontent.com/u/10466570?v=3","gravatar_id":"","url":"https://api.github.com/users/Capstrong","html_url":"https://github.com/Capstrong","followers_url":"https://api.github.com/users/Capstrong/followers","following_url":"https://api.github.com/users/Capstrong/following{/other_user}","gists_url":"https://api.github.com/users/Capstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/Capstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Capstrong/subscriptions","organizations_url":"https://api.github.com/users/Capstrong/orgs","repos_url":"https://api.github.com/users/Capstrong/repos","events_url":"https://api.github.com/users/Capstrong/events{/privacy}","received_events_url":"https://api.github.com/users/Capstrong/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Capstrong/Godlands","description":"Actual game for the Capstrong DePaul capstone team","fork":false,"url":"https://api.github.com/repos/Capstrong/Godlands","forks_url":"https://api.github.com/repos/Capstrong/Godlands/forks","keys_url":"https://api.github.com/repos/Capstrong/Godlands/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Capstrong/Godlands/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Capstrong/Godlands/teams","hooks_url":"https://api.github.com/repos/Capstrong/Godlands/hooks","issue_events_url":"https://api.github.com/repos/Capstrong/Godlands/issues/events{/number}","events_url":"https://api.github.com/repos/Capstrong/Godlands/events","assignees_url":"https://api.github.com/repos/Capstrong/Godlands/assignees{/user}","branches_url":"https://api.github.com/repos/Capstrong/Godlands/branches{/branch}","tags_url":"https://api.github.com/repos/Capstrong/Godlands/tags","blobs_url":"https://api.github.com/repos/Capstrong/Godlands/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Capstrong/Godlands/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Capstrong/Godlands/git/refs{/sha}","trees_url":"https://api.github.com/repos/Capstrong/Godlands/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Capstrong/Godlands/statuses/{sha}","languages_url":"https://api.github.com/repos/Capstrong/Godlands/languages","stargazers_url":"https://api.github.com/repos/Capstrong/Godlands/stargazers","contributors_url":"https://api.github.com/repos/Capstrong/Godlands/contributors","subscribers_url":"https://api.github.com/repos/Capstrong/Godlands/subscribers","subscription_url":"https://api.github.com/repos/Capstrong/Godlands/subscription","commits_url":"https://api.github.com/repos/Capstrong/Godlands/commits{/sha}","git_commits_url":"https://api.github.com/repos/Capstrong/Godlands/git/commits{/sha}","comments_url":"https://api.github.com/repos/Capstrong/Godlands/comments{/number}","issue_comment_url":"https://api.github.com/repos/Capstrong/Godlands/issues/comments/{number}","contents_url":"https://api.github.com/repos/Capstrong/Godlands/contents/{+path}","compare_url":"https://api.github.com/repos/Capstrong/Godlands/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Capstrong/Godlands/merges","archive_url":"https://api.github.com/repos/Capstrong/Godlands/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Capstrong/Godlands/downloads","issues_url":"https://api.github.com/repos/Capstrong/Godlands/issues{/number}","pulls_url":"https://api.github.com/repos/Capstrong/Godlands/pulls{/number}","milestones_url":"https://api.github.com/repos/Capstrong/Godlands/milestones{/number}","notifications_url":"https://api.github.com/repos/Capstrong/Godlands/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Capstrong/Godlands/labels{/name}","releases_url":"https://api.github.com/repos/Capstrong/Godlands/releases{/id}","created_at":"2015-01-20T21:37:50Z","updated_at":"2015-02-14T22:36:05Z","pushed_at":"2015-02-15T21:52:43Z","git_url":"git://github.com/Capstrong/Godlands.git","ssh_url":"git@github.com:Capstrong/Godlands.git","clone_url":"https://github.com/Capstrong/Godlands.git","svn_url":"https://github.com/Capstrong/Godlands","homepage":null,"size":175268,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"base":{"label":"Capstrong:master","ref":"master","sha":"212f9479a739e337bee9b8fc92bd9137db782be6","user":{"login":"Capstrong","id":10466570,"avatar_url":"https://avatars.githubusercontent.com/u/10466570?v=3","gravatar_id":"","url":"https://api.github.com/users/Capstrong","html_url":"https://github.com/Capstrong","followers_url":"https://api.github.com/users/Capstrong/followers","following_url":"https://api.github.com/users/Capstrong/following{/other_user}","gists_url":"https://api.github.com/users/Capstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/Capstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Capstrong/subscriptions","organizations_url":"https://api.github.com/users/Capstrong/orgs","repos_url":"https://api.github.com/users/Capstrong/repos","events_url":"https://api.github.com/users/Capstrong/events{/privacy}","received_events_url":"https://api.github.com/users/Capstrong/received_events","type":"Organization","site_admin":false},"repo":{"id":29553492,"name":"Godlands","full_name":"Capstrong/Godlands","owner":{"login":"Capstrong","id":10466570,"avatar_url":"https://avatars.githubusercontent.com/u/10466570?v=3","gravatar_id":"","url":"https://api.github.com/users/Capstrong","html_url":"https://github.com/Capstrong","followers_url":"https://api.github.com/users/Capstrong/followers","following_url":"https://api.github.com/users/Capstrong/following{/other_user}","gists_url":"https://api.github.com/users/Capstrong/gists{/gist_id}","starred_url":"https://api.github.com/users/Capstrong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Capstrong/subscriptions","organizations_url":"https://api.github.com/users/Capstrong/orgs","repos_url":"https://api.github.com/users/Capstrong/repos","events_url":"https://api.github.com/users/Capstrong/events{/privacy}","received_events_url":"https://api.github.com/users/Capstrong/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Capstrong/Godlands","description":"Actual game for the Capstrong DePaul capstone team","fork":false,"url":"https://api.github.com/repos/Capstrong/Godlands","forks_url":"https://api.github.com/repos/Capstrong/Godlands/forks","keys_url":"https://api.github.com/repos/Capstrong/Godlands/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Capstrong/Godlands/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Capstrong/Godlands/teams","hooks_url":"https://api.github.com/repos/Capstrong/Godlands/hooks","issue_events_url":"https://api.github.com/repos/Capstrong/Godlands/issues/events{/number}","events_url":"https://api.github.com/repos/Capstrong/Godlands/events","assignees_url":"https://api.github.com/repos/Capstrong/Godlands/assignees{/user}","branches_url":"https://api.github.com/repos/Capstrong/Godlands/branches{/branch}","tags_url":"https://api.github.com/repos/Capstrong/Godlands/tags","blobs_url":"https://api.github.com/repos/Capstrong/Godlands/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Capstrong/Godlands/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Capstrong/Godlands/git/refs{/sha}","trees_url":"https://api.github.com/repos/Capstrong/Godlands/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Capstrong/Godlands/statuses/{sha}","languages_url":"https://api.github.com/repos/Capstrong/Godlands/languages","stargazers_url":"https://api.github.com/repos/Capstrong/Godlands/stargazers","contributors_url":"https://api.github.com/repos/Capstrong/Godlands/contributors","subscribers_url":"https://api.github.com/repos/Capstrong/Godlands/subscribers","subscription_url":"https://api.github.com/repos/Capstrong/Godlands/subscription","commits_url":"https://api.github.com/repos/Capstrong/Godlands/commits{/sha}","git_commits_url":"https://api.github.com/repos/Capstrong/Godlands/git/commits{/sha}","comments_url":"https://api.github.com/repos/Capstrong/Godlands/comments{/number}","issue_comment_url":"https://api.github.com/repos/Capstrong/Godlands/issues/comments/{number}","contents_url":"https://api.github.com/repos/Capstrong/Godlands/contents/{+path}","compare_url":"https://api.github.com/repos/Capstrong/Godlands/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Capstrong/Godlands/merges","archive_url":"https://api.github.com/repos/Capstrong/Godlands/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Capstrong/Godlands/downloads","issues_url":"https://api.github.com/repos/Capstrong/Godlands/issues{/number}","pulls_url":"https://api.github.com/repos/Capstrong/Godlands/pulls{/number}","milestones_url":"https://api.github.com/repos/Capstrong/Godlands/milestones{/number}","notifications_url":"https://api.github.com/repos/Capstrong/Godlands/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Capstrong/Godlands/labels{/name}","releases_url":"https://api.github.com/repos/Capstrong/Godlands/releases{/id}","created_at":"2015-01-20T21:37:50Z","updated_at":"2015-02-14T22:36:05Z","pushed_at":"2015-02-15T21:52:43Z","git_url":"git://github.com/Capstrong/Godlands.git","ssh_url":"git@github.com:Capstrong/Godlands.git","clone_url":"https://github.com/Capstrong/Godlands.git","svn_url":"https://github.com/Capstrong/Godlands","homepage":null,"size":175268,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Capstrong/Godlands/pulls/44"},"html":{"href":"https://github.com/Capstrong/Godlands/pull/44"},"issue":{"href":"https://api.github.com/repos/Capstrong/Godlands/issues/44"},"comments":{"href":"https://api.github.com/repos/Capstrong/Godlands/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/Capstrong/Godlands/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/Capstrong/Godlands/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Capstrong/Godlands/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/Capstrong/Godlands/statuses/4e00f8f6d165d5686dfc66558233b6e29e9438de"}}}}