You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import*asexfrom"excalibur";classScene1extendsex.Scene{overridebackgroundColor=ex.Color.DarkGray;overrideonInitialize(){this.input.pointers.on("down",()=>{console.warn("should change scenes");this.engine.goToScene("Scene2");});}}classScene2extendsex.Scene{overridebackgroundColor=ex.Color.Viridian;// issue still occurs if onPreLoad is not defined or// if we call super.onPreLoad(loader)overrideonPreLoad(loader: ex.DefaultLoader){// un-commenting this call fixes the issue.// loader.addResource({// data: {},// isLoaded: () => true,// load: () => Promise.resolve(),// });}}constgame=newex.Engine({scenes: {
Scene1,Scene2: {scene: Scene2,loader: ex.Loader},},});game.start();game.goToScene("Scene1");
Expected Result
Game logs should change scene and transitions to Scene2 on click.
Actual Result
Game logs message but does not change scene. No more events are fired (e.g. pointer move), essentially locking up the engine.
Environment
browsers and versions: Firefox (128.0, 64-bit), Chrome (126.0.6478.127, arm64)
operating system: macOS 14.5 (Sonoma) - MacBook Air (M1, 2020)
Excalibur versions: 0.30.0-alpha.1106
Current Workaround
Adding a fake resource to the loader fixes the issue.
The text was updated successfully, but these errors were encountered:
eonarheim
added
the
bug
This issue describes undesirable, incorrect, or unexpected behavior
label
Jul 18, 2024
Steps to Reproduce
Expected Result
should change scene
and transitions toScene2
on click.Actual Result
Environment
Current Workaround
Adding a fake resource to the loader fixes the issue.
The text was updated successfully, but these errors were encountered: