{"action":"opened","issue":{"url":"https://api.github.com/repos/tasssystyle/NET-WORK/issues/1","labels_url":"https://api.github.com/repos/tasssystyle/NET-WORK/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/tasssystyle/NET-WORK/issues/1/comments","events_url":"https://api.github.com/repos/tasssystyle/NET-WORK/issues/1/events","html_url":"https://github.com/tasssystyle/NET-WORK/issues/1","id":95789174,"number":1,"title":"Controller","user":{"login":"tasssystyle","id":7411755,"avatar_url":"https://avatars.githubusercontent.com/u/7411755?v=3","gravatar_id":"","url":"https://api.github.com/users/tasssystyle","html_url":"https://github.com/tasssystyle","followers_url":"https://api.github.com/users/tasssystyle/followers","following_url":"https://api.github.com/users/tasssystyle/following{/other_user}","gists_url":"https://api.github.com/users/tasssystyle/gists{/gist_id}","starred_url":"https://api.github.com/users/tasssystyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasssystyle/subscriptions","organizations_url":"https://api.github.com/users/tasssystyle/orgs","repos_url":"https://api.github.com/users/tasssystyle/repos","events_url":"https://api.github.com/users/tasssystyle/events{/privacy}","received_events_url":"https://api.github.com/users/tasssystyle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-18T05:11:55Z","updated_at":"2015-07-18T05:11:55Z","closed_at":null,"body":"using UnityEngine;\r\nusing System.Collections;\r\n\r\npublic class Controller : MonoBehaviour {\r\n\r\n\tpublic bool inMine;\r\n\tpublic GameObject Bullet;\r\n\r\n\t// Update is called once per frame\r\n\tvoid Update () {\r\n\t\r\n\t\tif (!NetworkViewManager.connected) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (inMine) {\r\n\t\t\tif(Input.GetKeyUp(KeyCode.Space)){\r\n\t\t\t\tNetwork.Instantiate (Bullet, transform.position, transform.rotation, 1);\r\n\t\t\t}\r\n\t\t\tfloat dx = Input.GetAxis (\"Horizontal\");\r\n\t\t\tfloat dy = Input.GetAxis (\"Vertical\");\r\n\t\t\ttransform.Translate (dx * 0.5f, dy * 0.5f, 0.0f);\r\n\t\t\r\n\t\t\tGetComponent<NetworkView> ().RPC (\r\n\t\t\t\"MovePlayer\",\r\n\t\t\tRPCMode.Others,\r\n\t\t\ttransform.position);\r\n\t\t}\r\n\t}\r\n\t[RPC]\r\n\tpublic void MovePlayer(Vector3 position){\r\n\t\ttransform.position = position;\r\n\t}\r\n}\r\n"}}