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

Add Angle Getter #3255

Closed
wants to merge 1 commit into from
Closed

Add Angle Getter #3255

wants to merge 1 commit into from

Conversation

CobaltBar
Copy link

adds a blank getter to angle in FlxObject for other classes to override.
This could be used for an angle offset, for instance.

@Geokureli
Copy link
Member

Geokureli commented Sep 22, 2024

tbh i'm not a fan of these getter/setters and the complexity and obfuscation they cause, I'm trying to move away from them. Simply add a getSpecialAngle function to your FlxObject/sprite extending class and use that instead

@CobaltBar
Copy link
Author

I was trying to avoid using a custom variable, so i wrote a macro to add a getter for angle in my use case.
I thought this might be useful in case someone else needed to use get_angle

Should I close the PR? (I have no idea how to respond to this)

@Geokureli
Copy link
Member

Geokureli commented Sep 23, 2024

I was gonna close, but thought i'd wait for a response in case you had a compelling counter-argument. The effort is appreciated, but yeah, I think extension is a better route

@Geokureli Geokureli closed this Sep 23, 2024
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

Successfully merging this pull request may close these issues.

2 participants