Skip to content

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

Closed

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!

Activity

  1. locked and limited conversation to collaborators on Jul 6, 2023
  2. converted this issue into a discussion #6540 on Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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