LIL is a Language Make games, nicely

@element

An element object is a handle to the primary data in the ECS system. It only contains the id of the entity as a field. The rest of the interface is defined trough vvars, which in turn access the storage on the app object.

Example code

var myElem: @element { id: 0 };
var sel: myElem.selectable;
print sel.typeId;

Virtual variables

  • selectable

    Type: vvar.@selectable

    The @selectable data object this element points to.

    var sel: theElem.selectable;
  • action

    Type: vvar.ptr(any)|null

    Returns the associated action pointer if it has one. Otherwise returns null.

    if theElem.action => ptr(any) {
    	var callback: theElem.action => ptr(fn);
    	callback();
    }

Member variables

  • id

    Type: var.i64

    The unique identifier in the ECS system.

    return app.selectables[@self.id];

Member functions

  • getSelectable

    Type: fn => @selectable

    Value accessor for the selectable vvar.

    var.@selectable sel: theElem.getSelectable();
  • getSelectablePointer

    Type: fn => ptr(@selectable)

    Pointer accessor for the selectable vvar.

    var.ptr(@selectable) sel: theElem.getSelectablePointer();
  • getName

    Type: fn => ptr(i8)

    Returns the name.

    var name: theElem.getName();
  • getAction

    Type: fn => ptr(any)|null

    Value accessor for the action vvar.

    var action: theElem.getAction();
  • setAction

    Type: fn(ptr(any))

    Setter for the action vvar.

    Arguments
    • var.ptr(any) ptr:

      The pointer to the function to be called.