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

Restrict access to package-private vars in PhysicsComponent #795

Open
AlmasB opened this issue May 5, 2020 · 0 comments
Open

Restrict access to package-private vars in PhysicsComponent #795

AlmasB opened this issue May 5, 2020 · 0 comments
Labels
codefest23-24 difficulty:medium API design elements, need time to think through help wanted Contributions welcome / high PR acceptance rate type:refactor Clean up / upgrade code

Comments

@AlmasB
Copy link
Owner

AlmasB commented May 5, 2020

File: https://github.com/AlmasB/FXGL/blob/dev/fxgl-entity/src/main/java/com/almasb/fxgl/physics/PhysicsComponent.java

These:

    FixtureDef fixtureDef = new FixtureDef();
    BodyDef bodyDef = new BodyDef();

    Body body;

should be private with appropriate accessors (probably package-private methods). Plus there is a getBody() method already, which can be used.

@AlmasB AlmasB added type:refactor Clean up / upgrade code help wanted Contributions welcome / high PR acceptance rate difficulty:medium API design elements, need time to think through labels May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codefest23-24 difficulty:medium API design elements, need time to think through help wanted Contributions welcome / high PR acceptance rate type:refactor Clean up / upgrade code
Projects
None yet
Development

No branches or pull requests

1 participant