excaliburjs / Excalibur

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

Actor PreDraw/PostDraw events not working, or are incorrectly typed #2854

Closed mattjennings closed 10 months ago

mattjennings commented 10 months ago

It seems there are predraw and postdraw events in the ActorEvents types, but I don't believe they are actually emitted.

I think these were added in the strong event types refactor - perhaps by accident, but FWIW it would be handy to have these events directly on the actor 😄

Steps to Reproduce

Add an event listener on the actor for predraw or postdraw

https://codesandbox.io/p/devbox/admiring-elion-dqsvzf?file=/index.js:23,1-26,8

Expected Result

Events should emit

Actual Result

Events do not emit

Environment

Current Workaround

N/A

eonarheim commented 10 months ago

@mattjennings Good find! yup they should still emit! Should be an easy fix