Replies: 2 comments 1 reply
-
Hi @tfkfan We don't have anything official at the moment. What would you like to see in your game? It might help us design an API that'd serve your purpose. In the past in our games we've used an external object that is known to all scenes (maybe even a singleton) to hold onto data between scenes. @jedeen @kamranayub Any other suggestions? |
Beta Was this translation helpful? Give feedback.
1 reply
-
You can use the class Henk extends Actor {
onInitialise(engine) {
this.game = engine
}
updateScore(){
this.game.score++
}
} Then in any other scene in any other actor you can get the score with class Wim extends Actor {
onInitialise(engine) {
this.game = engine
console.log(this.game.score)
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I didn't found any correct(!) option to do that
Beta Was this translation helpful? Give feedback.
All reactions