| Package | com.pblabs.engine.entity |
| Class | public class PropertyReference |
| Inheritance | PropertyReference Object |
| Implements | ISerializable |
These are used to facilitate retrieving information from entities without requiring a specific interface to be implemented. For example, a component that handles display information would need to retrieve spatial information from a spatial component. The spatial component can store its information however it sees fit. The display component would have a PropertyReference member that would be initialized to the path of the desired property on the spatial component.
Property References follow one of three formats, component lookup, global entity lookup, or xml lookup. For component lookup the property reference should start with an @, for global entity lookup the property reference should start with a #, and for xml lookup the property reference should start with a !. Following this starting symbol comes the name of the component, entity or XML Template respectively.
See also
| Property | Defined By | ||
|---|---|---|---|
| cachedLookup : Array | PropertyReference | ||
| property : String
The path to the property that this references. | PropertyReference | ||
| Method | Defined By | ||
|---|---|---|---|
PropertyReference(property:String = null) | PropertyReference | ||
deserialize(xml:XML):*
deserializes the object from xml. | PropertyReference | ||
serialize(xml:XML):void
serializes the object to XML. | PropertyReference | ||
toString():String | PropertyReference | ||
| cachedLookup | property |
public var cachedLookup:Array| property | property |
property:StringThe path to the property that this references.
public function get property():String public function set property(value:String):void| PropertyReference | () | Constructor |
public function PropertyReference(property:String = null)property:String (default = null) |
| deserialize | () | method |
public function deserialize(xml:XML):*deserializes the object from xml. The format of the xml passed is custom, depending on the way the object was serialized with the serialize method.
Parameters
xml:XML — The xml containing the serialized definition of the class.
|
* — The deserialized object. Usually 'this' should be returned, but in
some cases it may be useful to return something else. The Enumerable class
does this to force all values to be a member of the enumeration.
|
| serialize | () | method |
public function serialize(xml:XML):voidserializes the object to XML. This should not include the main tag defining the class itself.
Parameters
xml:XML — The xml object to which the serialization of this class should
be added. This xml object is a single tag containing the main class definition,
so only children of this class should be added to it.
|
| toString | () | method |
public function toString():StringReturnsString |
@spatial.position.x
@ai.targets.0.x
#Level.timer.timeLeft
!Enemy.life.health