Skip to content

关于回调后,场景无法暂停的问题,请帮助我 #6535

@dasdssdasdas

Description

@dasdssdasdas

Here is my code.When the execution scenario "pauses", regardless of whether parameters are added, an error will be returned: "Cannot sleep non running Scene Example".I also used 'sleep()', which is the same. I don't know why!

But I use 'this. scene. start ('Example') ', which can perfectly jump through scenes.

Later, I tried to call a timer (triggering the scene 'pause'), which could be executed correctly.

I find it difficult to understand why, it feels like it's a problem with the direction of 'this'!

layer.setTileIndexCallback(6, (player, tile)=>{
this.scene.pause()
// this.scene.pause('Example')
// this.scene.start('Example')

})

Please help me! Thank you very much. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions