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 custom bounds implementation for game objects #408

Open
wants to merge 3 commits into
base: kotlin-experiments
Choose a base branch
from

Conversation

stevesoltys
Copy link
Contributor

This is just a review request for now, unless the other contributors are interested in merging this before the remaining object types are supported. Apollo should be capable of supporting an updated DistancedAction once this functionality is available.

This PR in its current state is capable of getting the interaction positions for (AFAIK) all types of GameObject that are being used today in Apollo's plugins.

@stevesoltys stevesoltys force-pushed the feature/game-object-bounds branch from eca25f1 to 48f0d69 Compare July 31, 2018 03:09
*
* @return The set of interaction positions.
*/
private Set<Position> getInteractablePositions() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need an example of this in use. I'm not sure that creating this Set all the time is optimal. Maybe roll this up into your distanced action changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garyttierney In the distanced action we provide an Entity and check the interaction positions of that entity to decide when to trigger the action for a Mob.

Here's an example: https://gist.github.com/stevesoltys/197e7a604f8bfe495ae070c2db0c89c1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that in my example, I've made the getInteractionPositions method abstract in EntityBounds.

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