Function
pushScene
(id: string, args: unknown[]): voidPush the current active scene to a stack and then goes to the new scene
param id- The scene name.
param args- The args passed to the scene definition.
scene("mainScene", () => {
add([
text("this is the first scene", { size: 32 }),
pos(center()),
]);
});
scene("otherScene", () => {
add([
sprite("bean"),
pos(center()),
]);
});
pushScene("mainScene")since v3001.1
group Scenes
see