Game Development Reference
In-Depth Information
// Iterate through all of the input objects
foreach(node : InputObjects)
{
foreach(field : node.Fields)
{
// Try to find a variable reference by name
var = FindVariableByName(field.Value);
if (var != null)
{
// Ensure that the variable is the same
// type as the field. This type may be
// application specific.
Assert(var.Type == field.Type);
// Unflatten the variable
field.Value = var.Value;
}
}
}
14.4 Conclusion
By using basic concepts from object-oriented programming, it is possible to make
custom data more powerful and safer for designers. By relying on a build-time data
transformation, much like a code compiler, there is no performance cost to these
features, and they can be added to an existing tool chain without significant risk
or overhead added to the tool chain as a whole.
Search WWH ::




Custom Search