Game Development Reference
In-Depth Information
</class>
<class name="JigsawAvatar" parent="GameAvatar" classId="601" >
<public>
<property name="x" type="float"/>
<property name="y" count="1" type="float"/>
</public>
</class>
</ObjectSchema>
The entire schema should be defined within the <ObjectSchema> tag.
The import section remains pretty much static and must be included as part of your
schema. Failing to do so would get you compiler errors. The import section tells the
code generator to include the parent class files so that it can resolve the parent class
references in the generated class files.
Each class is defined within the <class> tag; the name attribute is the name of the
class that gets generated; and the parent must be one of GameAvatar, GameRoom,
or GameState. You would normally want to define just zero or one GameAvatar and
GameRoom entities as required. Depending on the game, you may want to define
zero or as many GameState entities. It is important to note that the class ID must be
unique and must start from 600 or above.
The generated code for PieceMatch is PieceMatchClient—the suffix indicates that
the generated class is a client-side entity.
All properties defined must be within the <public> tag. The private and system
tags are used only in the GNet product family. The name of the property must be
unique within the class definition. The following table describes data types allowed
in the schema.
The count by default is 1 if specified, and if the count is greater than 1, then the
property generated will be of AS3 type Array.
 
Search WWH ::




Custom Search