{"action":"closed","issue":{"url":"https://api.github.com/repos/farice/ARShooter/issues/5","repository_url":"https://api.github.com/repos/farice/ARShooter","labels_url":"https://api.github.com/repos/farice/ARShooter/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/farice/ARShooter/issues/5/comments","events_url":"https://api.github.com/repos/farice/ARShooter/issues/5/events","html_url":"https://github.com/farice/ARShooter/issues/5","id":235554313,"number":5,"title":"sound effects enhancement","user":{"login":"wave-electron","id":16273780,"avatar_url":"https://avatars3.githubusercontent.com/u/16273780?v=3","gravatar_id":"","url":"https://api.github.com/users/wave-electron","html_url":"https://github.com/wave-electron","followers_url":"https://api.github.com/users/wave-electron/followers","following_url":"https://api.github.com/users/wave-electron/following{/other_user}","gists_url":"https://api.github.com/users/wave-electron/gists{/gist_id}","starred_url":"https://api.github.com/users/wave-electron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wave-electron/subscriptions","organizations_url":"https://api.github.com/users/wave-electron/orgs","repos_url":"https://api.github.com/users/wave-electron/repos","events_url":"https://api.github.com/users/wave-electron/events{/privacy}","received_events_url":"https://api.github.com/users/wave-electron/received_events","type":"User","site_admin":false},"labels":[{"id":620767779,"url":"https://api.github.com/repos/farice/ARShooter/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"farice","id":13244177,"avatar_url":"https://avatars2.githubusercontent.com/u/13244177?v=3","gravatar_id":"","url":"https://api.github.com/users/farice","html_url":"https://github.com/farice","followers_url":"https://api.github.com/users/farice/followers","following_url":"https://api.github.com/users/farice/following{/other_user}","gists_url":"https://api.github.com/users/farice/gists{/gist_id}","starred_url":"https://api.github.com/users/farice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farice/subscriptions","organizations_url":"https://api.github.com/users/farice/orgs","repos_url":"https://api.github.com/users/farice/repos","events_url":"https://api.github.com/users/farice/events{/privacy}","received_events_url":"https://api.github.com/users/farice/received_events","type":"User","site_admin":false},"assignees":[{"login":"farice","id":13244177,"avatar_url":"https://avatars2.githubusercontent.com/u/13244177?v=3","gravatar_id":"","url":"https://api.github.com/users/farice","html_url":"https://github.com/farice","followers_url":"https://api.github.com/users/farice/followers","following_url":"https://api.github.com/users/farice/following{/other_user}","gists_url":"https://api.github.com/users/farice/gists{/gist_id}","starred_url":"https://api.github.com/users/farice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farice/subscriptions","organizations_url":"https://api.github.com/users/farice/orgs","repos_url":"https://api.github.com/users/farice/repos","events_url":"https://api.github.com/users/farice/events{/privacy}","received_events_url":"https://api.github.com/users/farice/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-06-13T13:29:24Z","updated_at":"2017-07-01T22:27:52Z","closed_at":"2017-07-01T22:27:51Z","body":"A simple enhancement is adding sound effects using AVFoundation. I added 3 basic sound effects, torpedo.mp3 (bullet sound), explosion.mp3 , collison.mp3. \r\n\r\nsound effects available: \r\n[torpedo.mp3](http://www.trekcore.com/audio/weapons/tng_torpedo3_clean.mp3)\r\n[explosion.mp3](https://www.freesoundeffects.com/free-sounds/bomb-10076/)\r\n[collision.mp3](http://soundbible.com/996-Kick.html)\r\n\r\nimport AVFoundation\r\nvar Player: AVAudioPlayer = AVAudioPlayer()\r\n\r\n```\r\n\r\n// added this basic code snippet in three places just change the forResource for each mp3 name.\r\ndo\r\n        {\r\n           let MusicURL = Bundle.main.path(forResource: \"torpedo\", ofType: \"mp3\")\r\n            try Player = AVAudioPlayer(contentsOf: NSURL (fileURLWithPath:MusicURL!) as URL)\r\n            Player.prepareToPlay()\r\n           Player.play()\r\n        }\r\n        catch let error as NSError {\r\n           print(error.description)\r\n       }\r\n```\r\n\r\n1st spot.  after  \r\n\r\n```\r\n@IBAction func didTapScreen(_ sender: UITapGestureRecognizer) { // fire bullet in direction camera is facing\r\n```\r\n\r\n2nd spot.  after \r\n```\r\n\r\n func removeNodeWithAnimation(_ node: SCNNode, explosion: Bool) {\r\n        \r\n        \r\n        if explosion {\r\n\r\n```\r\n\r\n3rd spot after\r\n\r\n```\r\n func physicsWorld(_ world: SCNPhysicsWorld, didBegin contact: SCNPhysicsContact) {\r\n        //print(\"did begin contact\", contact.nodeA.physicsBody!.categoryBitMask, contact.nodeB.physicsBody!.categoryBitMask)\r\n        if contact.nodeA.physicsBody?.categoryBitMask == CollisionCategory.ship.rawValue || contact.nodeB.physicsBody?.categoryBitMask == CollisionCategory.ship.rawValue { // this conditional is not required--we've used the bit masks to ensure only one type of collision takes place--will be necessary as soon as more collisions are created/enabled\r\n            do\r\n            {\r\n\r\n```\r\n\r\nThats it!"}}
{"actor":{"display_login":"farice"}}