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

Entity `silenceWarnings` option isn't available through Actor #3141

Closed Autsider666 closed 1 month ago

Autsider666 commented 2 months ago

Context

The silenceWarnings option was added last week to prevent the "Entity X was not added to a scene" messages during development. But it's not yet useable for Actors.

Proposal

The most direct solution is adding it to ActorArgs and tunneling it to the Entity constructor, but that's not by definition the most sexy solution. Another option would be to move the silence check to inside the setTimeout and either add a setter to Entity or do something experimental like using a silence tag to block the warning.

eonarheim commented 1 month ago

@Autsider666 ope! we should make this visible on actors at minimum. Passing through the ctor arg would be the lowest effort fix