Game Development Reference
In-Depth Information
Figure 4-2
.
The ominous Edit Custom Properties button
Note
The Edit Custom Properties button does not appear on every node. It is
available only on nodes that have their Custom class field on the Item Code
Connections tab set to a specific class name. Custom properties will be assigned
to the custom class of a node. Without a custom class, there can't be custom
properties.
If you click on the Edit Custom Properties button, a dialog will appear. It's empty at first,
with no properties defined, but otherwise it looks the same as in
Figure 4-3
.
Figure 4-3
.
The custom properties editing dialog with some properties defined
By clicking on the
+
button, you can add properties that will be assigned to ivars or prop-
erties of the same name in the node's custom class. Since you are editing the properties of
the
GameScene.ccb
root node whose custom class is set to
GameScene
, the variables
entered here must be declared in the
GameScene
class. This part you already completed
earlier in
Listing 4-1
.
Now you need to add three custom properties. Name them exactly like the three ivars in
Search WWH ::
Custom Search