Game Development Reference
In-Depth Information
SpriteBuilder has added these properties at the bottom of the Item Properties tab,
as seen in Figure 4-4 . You can now edit these properties like any other node property.
Figure 4-4 . Custom properties are editable on the Item Properties tab
Note SpriteBuilder makes no distinction between properties and ivars. For
SpriteBuilder, custom properties are all termed “properties” although, like in
this example, they can be declared as ivars as well.
Publish, build, and run as usual. You'll notice no change in behavior compared to the pre-
vious run. But now these three design parameters are stored and edited in SpriteBuilder.
Try making changes to these custom properties in SpriteBuilder, and observe how the
player's behavior changes accordingly.
If you ever need to rename or remove a custom property, just click the Edit Custom Prop-
erties button and double-click the Property name column to rename, or click the -
(minus sign) button to delete the selected property.
Caution Keep in mind that SpriteBuilder assumes you've declared correspond-
ing ivars or properties of the same name in the node's custom class for each
custom property. If you forgot to declare a property or ivar, misspelled the name
of one, or renamed a custom property only in SpriteBuilder, loading the CCB
will fail with errors beginning with *** [PROPERTY] ERROR HINT prin-
ted to the debug Console. To see the Console, go to View
Debug Area
Activate Console in Xcode.
Constructing the Level Physics
Search WWH ::




Custom Search