{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540/comments","events_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540/events","html_url":"https://github.com/HaxeFlixel/flixel/issues/1540","id":90474085,"number":1540,"title":"Move screenCenter() from FlxSpriteUtil to FlxObject","user":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HaxeFlixel/flixel/labels/Breaking%20Change","name":"Breaking Change","color":"eb6420"},{"url":"https://api.github.com/repos/HaxeFlixel/flixel/labels/Improvement","name":"Improvement","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/milestones/7","html_url":"https://github.com/HaxeFlixel/flixel/milestones/4.0.0","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel/milestones/7/labels","id":1141136,"number":7,"title":"4.0.0","description":"","creator":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":7,"state":"open","created_at":"2015-05-30T10:47:00Z","updated_at":"2015-06-29T19:31:17Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-06-23T19:42:21Z","updated_at":"2015-06-30T14:33:27Z","closed_at":null,"body":"\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/22852627-move-screencenter-from-flxspriteutil-to-flxobject?utm_campaign=plugin&utm_content=tracker%2F254189&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F254189&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/comments/117208898","html_url":"https://github.com/HaxeFlixel/flixel/issues/1540#issuecomment-117208898","issue_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540","id":117208898,"user":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T14:33:27Z","updated_at":"2015-06-30T14:33:27Z","body":"Sounds quite useful, two issues with your suggestion:\r\n\r\n- `FlxG.state` is not a `FlxObject`\r\n- an array it quite messy, it doesn't restrict the amount of values you can pass, you can pass the same value multiple times, array allocations, etc etc... lots of undefined behavior. It would be much better to use two enums like [these](https://github.com/HaxeFlixel/flixel/blob/dev/flixel/system/scaleModes/BaseScaleMode.hx#L120-L132).\r\n\r\nFor further discussion on that, we should probably open a new issue. I feel like we would still want to keep `screeCenter()` (in some form anyway) when adding an `alignTo()`."}}