O'Reilly logo

Collaborative Online Game Creation by Naveena Aswadhati, Nanu Swamy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Variables

Variables are storage areas to hold numbers, text, arrays, and other types of data. GameBrix supports three types of variables with different access scopes. World variables in GameBrix are variables that you can access from anywhere. Class variables are accessible from within the instance of the object. Local variables are accessible within the function where they are defined. Figure 8.8 shows the three buttons used to create these types of variables.

Figure 8.8. Creating variables.

You can create all three kinds of variables from the Object Editor screen. Clicking the New Var button in the bottom right ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required