Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup static variables from FlxPoint / FlxRect / FlxMatrix #1698

Closed
gamedevsam opened this issue Jan 20, 2016 · 3 comments
Closed

Cleanup static variables from FlxPoint / FlxRect / FlxMatrix #1698

gamedevsam opened this issue Jan 20, 2016 · 3 comments
Milestone

Comments

@gamedevsam
Copy link
Contributor

These variables should be stored where they are used: https://github.com/HaxeFlixel/flixel/blob/dev/flixel/math/FlxPoint.hx#L16-L19
https://github.com/HaxeFlixel/flixel/blob/dev/flixel/math/FlxRect.hx#L13-L15

We should think about cleaning up this type of API bloat for this major release.

@gamedevsam gamedevsam modified the milestone: 4.0.0 Jan 20, 2016
@Gama11
Copy link
Member

Gama11 commented Jan 20, 2016

Make them private or remove them, using pooling instead?

@Gama11 Gama11 changed the title Cleanup static variables from FlxPoint and FlxRect Cleanup static variables from FlxPoint / FlxRect / FlxMatrix Jan 24, 2016
@gamedevsam
Copy link
Contributor Author

I would use pooling, or in cases where the points are hit every frame, store them as static variables on the class that actually uses them.

@Gama11
Copy link
Member

Gama11 commented Feb 1, 2016

I've already done the cleanup, see the referenced commits. It's just the static flash objects that are leftover (but made private).

Gama11 added a commit that referenced this issue Feb 5, 2016
@Gama11 Gama11 closed this as completed in dce1b5c Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants