PropertyCollection - TogetherGames/Public-Corona-Lua GitHub Wiki
Together::PropertyCollection
The PropertyCollection class contains a list of TogetherProperties and additional child PropertyCollections.
string Name
The name of this collection node.
table Properties
A list of TogetherProperties.
table Children
A list of children PropertyCollections.
Creates a new PropertyCollection object
Returns PropertyCollection
PropertyCollection:New( )
Gets the property with the specified name if it exists, otherwise returns nil.
Returns TogetherProperty
PropertyCollection:FindProperty( propertyName )
string propertyName
The name of the property to find
--------------------------------------------------------------------------------Gets the property value with the specified name if it exists, otherwise returns nil.
Returns string
PropertyCollection:Get( propertyName )
string propertyName
The name of the property to find
--------------------------------------------------------------------------------Gets the value of the property with the specified name if it exists, otherwise this will create the new property with the default value and return that value.
Returns string
PropertyCollection:GetEx( propertyName, defaultValue )
string propertyName
The name of the property to find
[string](#) defaultValueThe value to be returned when the property is not found
--------------------------------------------------------------------------------Sets the value of the property with the specified name if it exists, otherwise creates it with the set value.
Returns TogetherProperty
PropertyCollection:Set( propertyName, propertyValue )
string propertyName
The name of the property to set or create
[string](#) propertyValueThe value to set for the property
--------------------------------------------------------------------------------Checks to see whether a property with the specified name exists.
Returns boolean
PropertyCollection:HasProperty( propertyName )
string propertyName
The name of the property to check for
--------------------------------------------------------------------------------Returns the number of properties in the collection. This does not include children collections.
Returns number
PropertyCollection:GetCount( )
Gets the property at the specified index.
Returns TogetherProperty
PropertyCollection:GetAt( index )
number index
The index to return from the collection
--------------------------------------------------------------------------------