Cover for the App

Studio: GLOBAL SCORE CONTROLLER

Studio

A sample project designed to help you understand global events and specifically how they can be used to update a score.

A sample project designed to help you understand global events and specifically how they can be used to update a score.

This sample project is designed to help you understand global events and specifically how they can be used to update a score.

In this example "ScreenTapper" is simply used as a form of interaction - every time the user taps on the screen the score is added. For your game this could be anything.

"ScoreController" is where the score is added and also where the score UI is updated.

Simply write

"world.events.dispatch(world.events.globalId, 'addScore')"

anywhere in any script to update the score value and score UI.