|
Nebula
|
Public Member Functions | |
| virtual Nebula.Game.FrameEvent[] | AcceptedEvents () |
| Override in subclass to tell the property manager which methods to call for this class. | |
| virtual uint | FixedTimeSource () |
| The time source this property's fixed events run on. | |
| virtual void | OnMessage (in Msg msg) |
| Called when a message is sent to the property's associated entity. | |
| override string | ToString () |
| String representation of this property. | |
| virtual void | OnActivate () |
| Called when the property is attached to an entity, or when Property.Active is changed to true. | |
| virtual void | OnDeactivate () |
| Called when the property is detached from an entity, or when Property.Active is changed to false. | |
| virtual void | OnBeginFrame () |
| Called once every frame at the beginning of the frame. | |
| virtual void | OnFixedFrame () |
| Called once for every fixed step the time source has available this frame. | |
| virtual void | OnFrame () |
| Called once every frame. | |
| virtual void | OnEndFrame () |
| Called once every frame at the end of the frame. | |
| void | Destroy () |
| Destroys the property. | |
Protected Member Functions | |
| virtual void | RegisterMessages () |
| void | RegisterMessage< T > () |
Package Functions | |
| bool | IsSimulating () |
| Whether the property's world is simulating. | |
| void | Activate () |
| Runs OnActivate and records that it has run. | |
| void | Deactivate () |
| Runs OnDeactivate for a property that was activated. | |
| FrameEvent[] | GetAcceptedEvents () |
| void | AttachMessages () |
| void | DetachMessages () |
Properties | |
| bool | Active [get, set] |
| Activate or deactivate property This is not trivial and can potentially be costly. | |
| bool | RequestedActive [get] |
| What the property was asked to be, which is what a world that starts simulating activates its properties from. | |
| Entity | Entity [get, set] |
| The entity that owns this property. | |
Private Attributes | |
| bool | requestedActive |
| bool | active |
| Entity | entity |
| FrameEvent[] | acceptedEvents |
| bool | acceptedEventsCached |
|
inlinevirtual |
Override in subclass to tell the property manager which methods to call for this class.
|
inlinepackage |
Runs OnActivate and records that it has run.
Called by the setter when the world is simulating, and by the world when its mode changes to simulating
|
inlinepackage |
|
inlinepackage |
Runs OnDeactivate for a property that was activated.
A property that was never activated has nothing to deactivate
|
inline |
Destroys the property.
You should not call this manually, it is called automatically by destroying an entity, or removing the property
|
inlinepackage |
|
inlinevirtual |
The time source this property's fixed events run on.
Override in subclass to run on a fixed source of its own, such as the physics one. The default is the game logic source.
|
inlinepackage |
|
inlinepackage |
Whether the property's world is simulating.
|
inlinevirtual |
Called when the property is attached to an entity, or when Property.Active is changed to true.
Override in subclass. This only happens in a world that is simulating. A property in a world the editor is only authoring is not running, so its activation waits for the world to start simulating.
|
inlinevirtual |
Called once every frame at the beginning of the frame.
Override in subclass. The property AcceptedEvents must return the Event code for this method to be called at all, and the property has to be active, which only happens in a world that is simulating.
|
inlinevirtual |
Called when the property is detached from an entity, or when Property.Active is changed to false.
Override in subclass. Only called for a property that was activated, and when its world stops simulating.
|
inlinevirtual |
Called once every frame at the end of the frame.
Override in subclass. The property AcceptedEvents must return the Event code for this method to be called at all, and the property has to be active, which only happens in a world that is simulating.
|
inlinevirtual |
Called once for every fixed step the time source has available this frame.
Override in subclass. The property AcceptedEvents must return the Event code for this method to be called at all, and the property has to be active, which only happens in a world that is simulating. A source with no fixed step gives one call per frame.
|
inlinevirtual |
Called once every frame.
Override in subclass. The property AcceptedEvents must return the Event code for this method to be called at all, and the property has to be active, which only happens in a world that is simulating.
|
inlinevirtual |
Called when a message is sent to the property's associated entity.
Only called for a property in a world that is simulating, which is the same rule the update methods have
|
inlineprotected |
| T | : | Msg |
|
inlineprotectedvirtual |
|
inline |
String representation of this property.
|
private |
|
private |
|
private |
|
private |
|
private |
|
getset |
Activate or deactivate property This is not trivial and can potentially be costly.
The value is whether the property is really running, which is the result of OnActivate having been called. When the world is not simulating the setter only records the intent, and the activation happens when the world starts simulating.
|
getset |
The entity that owns this property.
You cannot change the entity after one has been associated with the property.
|
getpackage |
What the property was asked to be, which is what a world that starts simulating activates its properties from.