|
Nebula
|
A data model.
Bind its variables before loading documents that use it
Public Member Functions | |
| void | BindComponent< T > (string name, Nebula.Game.Entity entity) |
| Bind a component of an entity as a variable, its fields become members ({{ name.field }}). | |
| void | BindComponent (string name, ulong entityId, uint componentId) |
| Bind a component by its native id. | |
| void | BindEvent (string name, Action< UiEvent > handler) |
| Bind a data event, used as data-event-click="name". | |
| void | DirtyVariable (string name) |
| Mark a variable dirty so the views using it update. | |
| void | Remove () |
| Remove the model and its bindings from the UI. | |
Package Functions | |
| DataModel (string name) | |
Properties | |
| string | Name [get] |
Private Attributes | |
| readonly List< GCHandle > | eventHandles = new List<GCHandle>() |
|
inlinepackage |
Bind a component by its native id.
|
inline |
Bind a component of an entity as a variable, its fields become members ({{ name.field }}).
The UI reads and writes the component in place
| T | : | Nebula.Game.NativeComponent |
|
inline |
Bind a data event, used as data-event-click="name".
The handler gets the element the event is on
|
inline |
Mark a variable dirty so the views using it update.
|
inline |
Remove the model and its bindings from the UI.
|
get |