{"action":"created","issue":{"url":"https://api.github.com/repos/craftyjs/Crafty/issues/899","labels_url":"https://api.github.com/repos/craftyjs/Crafty/issues/899/labels{/name}","comments_url":"https://api.github.com/repos/craftyjs/Crafty/issues/899/comments","events_url":"https://api.github.com/repos/craftyjs/Crafty/issues/899/events","html_url":"https://github.com/craftyjs/Crafty/issues/899","id":73099607,"number":899,"title":"Improve checkHits and onHit functionality","user":{"login":"mucaho","id":3935691,"avatar_url":"https://avatars.githubusercontent.com/u/3935691?v=3","gravatar_id":"","url":"https://api.github.com/users/mucaho","html_url":"https://github.com/mucaho","followers_url":"https://api.github.com/users/mucaho/followers","following_url":"https://api.github.com/users/mucaho/following{/other_user}","gists_url":"https://api.github.com/users/mucaho/gists{/gist_id}","starred_url":"https://api.github.com/users/mucaho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mucaho/subscriptions","organizations_url":"https://api.github.com/users/mucaho/orgs","repos_url":"https://api.github.com/users/mucaho/repos","events_url":"https://api.github.com/users/mucaho/events{/privacy}","received_events_url":"https://api.github.com/users/mucaho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-04T19:03:06Z","updated_at":"2015-05-14T21:01:33Z","closed_at":null,"body":"Feature request from [forum post](https://groups.google.com/forum/#!topic/craftyjs/GOQvUYrc0jU)\r\n\r\nWithout changing the ease-of-use of `checkHits` and `onHit` `Collision` methods, they could also inform user that the colliding entities, having the desired component, have changed. \r\nPossibilities include introducing a new event that is fired each time the colliding entities change (e.g. `HitOn(component)` -> `HitChange(component, oldestHitList)` -> ... -> `HitChange(component, newestHitList)` -> `HitOff(component)` ), or restructuring the event completely (e.g. seperate `HitOn(component, entity)` & `HitOff(component, entity)` events for each colliding entity.)"},"comment":{"url":"https://api.github.com/repos/craftyjs/Crafty/issues/comments/102168679","html_url":"https://github.com/craftyjs/Crafty/issues/899#issuecomment-102168679","issue_url":"https://api.github.com/repos/craftyjs/Crafty/issues/899","id":102168679,"user":{"login":"starwed","id":34907,"avatar_url":"https://avatars.githubusercontent.com/u/34907?v=3","gravatar_id":"","url":"https://api.github.com/users/starwed","html_url":"https://github.com/starwed","followers_url":"https://api.github.com/users/starwed/followers","following_url":"https://api.github.com/users/starwed/following{/other_user}","gists_url":"https://api.github.com/users/starwed/gists{/gist_id}","starred_url":"https://api.github.com/users/starwed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starwed/subscriptions","organizations_url":"https://api.github.com/users/starwed/orgs","repos_url":"https://api.github.com/users/starwed/repos","events_url":"https://api.github.com/users/starwed/events{/privacy}","received_events_url":"https://api.github.com/users/starwed/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T21:01:32Z","updated_at":"2015-05-14T21:01:32Z","body":"It's worth remembering that someone can always just use `.hit()` and analyze the results.  That way you know exactly how it works, and know exactly when it's called, and ultimately it isn't that much more work then hooking into these sorts of events.\r\n\r\nSince I tend to think that's superior in most cases, that's invariably what I do, so I'm not sure I have much opinion here... I think it'd be ok to err on the side of it being simple, and only useful for some common use cases.  When people want more control, then they can use the underlying collision functions that this is built on."}}