excaliburjs / Excalibur

🎮 Your friendly TypeScript 2D game engine for the web 🗡️
https://excaliburjs.com
BSD 2-Clause "Simplified" License
1.77k stars 189 forks source link

Feat: [#3157] return target on trigger #3176

Closed Autsider666 closed 1 month ago

Autsider666 commented 1 month ago

===:clipboard: PR Checklist :clipboard:===

==================

Couldn't get the suggested setup to work without adding a lot of extra (code) complexity. I'd recommend dropping that requirement, because it's a lot easier to implement by the developers themselves by adding the check in their own filter callback to assure an entity is of a specific type (and use as .... to placate TS if needed).

I'll finish the last 2 points on the checklist after there's a green light on my current implementation.

Closes #3157

Changes:

Autsider666 commented 1 month ago

Ah, those tests have to be fixed. Is there any magic ritual to get the sandbox command to run locally? I was hope sacrificing a chicken was enough, but it'll take a bit to find a goat... image

eonarheim commented 1 month ago

Ah, those tests have to be fixed. Is there any magic ritual to get the sandbox command to run locally? I was hope sacrificing a chicken was enough, but it'll take a bit to find a goat... image

There indeed is some hidden magic apologies, I've been meaning to fix up the sandbox to a modern build. I've got a half completed stale branch (https://github.com/excaliburjs/Excalibur/tree/chore/improve-sandbox-qol)

The gist is you copy the built artifacts into the sandbox lib folder then run the build

  1. Build ex umd module npm run core:bundle
  2. Copy ex to lib and build sandbox npm run sandbox:copy && npm run sandbox:build
eonarheim commented 1 month ago

@Autsider666 there are some flakey unit tests on main I haven't nailed down yet either :/

Autsider666 commented 1 month ago

@eonarheim Updated the changelog, so PR is ready to be merged

eonarheim commented 1 month ago

@Autsider666 Many thanks!