PropertyCollection
Last updated
Was this helpful?
Last updated
Was this helpful?
PropertyCollections are a method of encapsulating a group of property values. Using PropertyCollections can simplify and make code more readable.
The following example creates a and sets its properties through a PropertyCollection.
Unlike assigning properties using regular code the values assigned to properties through PropertyCollections must match the type exactly. For example the following code is acceptable:
The value of 3 is an integer value, as opposed to 3.0f, but the compiler casts the value to a float without any problem. However, the following code would result in a crash:
Instead, XVelocity must be explicitly given a float:
Did this article leave any questions unanswered? Post any question in our for a rapid response.