Replies: 1 comment 3 replies
-
It would also be very nice if the filter callback return type served as a typeguard and narrowed the actor type in the callback of the action. const trigger = new Trigger({
// ...
target: player,
// or
filter: (actor) => actor instanceof Player
action: (player) => {
// type of player is Player here
}
}) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! It would be very useful to have access to the Actor, which calls Trigger's action callback. Something like this:
I want to use triggers as areas of view for AI enemies, so it's important for me to know which Actor called action. Now I have to do my own implementation of the trigger, which takes this into account.
It would be great if it appeared in Excalibur!
Beta Was this translation helpful? Give feedback.
All reactions