-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
feat: Refactor Actions to ECS System and Component #2061
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
enhancement
Label applied to enhancements or improvements to existing features
label
Oct 16, 2021
kamranayub
approved these changes
Oct 17, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woo 🚢
kamranayub
reviewed
Oct 17, 2021
kamranayub
reviewed
Oct 17, 2021
eonarheim
commented
Oct 17, 2021
@@ -282,8 +282,8 @@ export class ActionsComponent extends Component<'ex.actions'> implements ActionC | |||
* @param entity The entity to follow | |||
* @param followDistance The distance to maintain when following, if not specified the actor will follow at the current distance. | |||
*/ | |||
public follow(actor: Actor, followDistance?: number): ActionContext { | |||
return this._ctx.follow(actor, followDistance); | |||
public follow(entity: Actor, followDistance?: number): ActionContext { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ope! Totes missed these thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
Label applied to enhancements or improvements to existing features
hacktoberfest-accepted
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
===:clipboard: PR Checklist :clipboard:===
==================
This is a backwards compatible change that refactors Actions into an ECS style System and Component, this removes actions out of the Actor core update loop.
This means it is now possible to share the Actions feature with all entities by adding the
ActionsComponent
!See related discussion #2059
Related Actions goals on the roadmap for v0.26.0 #1161
Changes:
asPromise()
marked deprecated but not removedActionsComponent
that wraps the existingActionContext
ActionsSystem
that updates all Entities with anActionComponent