diff --git a/doc/index.html b/doc/index.html index cd5610b..796f6ee 100644 --- a/doc/index.html +++ b/doc/index.html @@ -75,12 +75,9 @@

System functions

- - - - - - + +
tiny.processingSystem (filter, entityCallback, onAdd, onRemove)Creates a System that processes Entities every update.
tiny.system (callback, filter, entityCallback, onAdd, onRemove)Creates a System.tiny.system (table)Marks a table conforming to the System interface as a System recognized by + tiny-ecs.

World functions

@@ -91,7 +88,15 @@ tiny.add (world, ...) - Adds Entities and Systems to the World. + Shortcut for adding multiple Entities and Systems to the World. + + + tiny.addEntity (world, entity) + Adds an Entity to the world. + + + tiny.addSystem (world, system) + Adds a System to the world. tiny.clearEntities (world) @@ -114,6 +119,10 @@ Gets count of Systems in World. + tiny.getSystemIndex (world, system) + Gets the index of a System in the world. + + tiny.manageEntities (world) Adds and removes Entities that have been marked. @@ -123,7 +132,19 @@ tiny.remove (world, ...) - Removes Entities and Systems from the World. + Shortcut for removing multiple Entities and Systems from the World. + + + tiny.removeEntity (world, entity) + Removes an Entity to the World. + + + tiny.removeSystem (world, system) + Removes a System from the world. + + + tiny.setSystemIndex (world, system, index) + Sets the index of a System in the world. tiny.update (world, dt) @@ -212,67 +233,30 @@

System functions

- A System a wrapper around function callbacks for manipulating Entities. + A System is a wrapper around function callbacks for manipulating Entities.
-
- - tiny.processingSystem (filter, entityCallback, onAdd, onRemove) -
-
- Creates a System that processes Entities every update. Also provides - optional callbacks for when Entities are added or removed from the System. - - -

Parameters:

- - - - - - -
- tiny.system (callback, filter, entityCallback, onAdd, onRemove) + tiny.system (table)
- Creates a System. + Marks a table conforming to the System interface as a System recognized by + tiny-ecs. Systems are tables that contain at least one field, an update + function that takes parameters like so: + function system:update(world, entities, dt). world is the World the System + belongs to, entities is an unordered table of Entities with Entities as KEYS, + and dt is the delta time. There are also a few other optional callbacks: + function system:filter(entity) - returns a boolean, + function system:onAdd(entity) - returns nil, + function system:onRemove(entity) - returns nil. + For Filters, it is conveient to use tiny.requireAll or tiny.requireOne, + but one can write their own filters as well.

Parameters:

@@ -320,7 +304,7 @@ tiny.add (world, ...)
- Adds Entities and Systems to the World. + Shortcut for adding multiple Entities and Systems to the World. New objects will enter the World the next time World:update(dt) is called. Also call this method when an Entity has had its Components changed, such that it matches different Filters. @@ -340,6 +324,56 @@ +
+
+ + tiny.addEntity (world, entity) +
+
+ Adds an Entity to the world. + The new Entity will enter the world next time World:update is called. + Also call this on Entities that have changed Components such that it + matches different systems. + + +

Parameters:

+ + + + + + +
+
+ + tiny.addSystem (world, system) +
+
+ Adds a System to the world. + The new System will enter the world next time World:update is called. + + +

Parameters:

+ + + + + +
@@ -451,6 +485,30 @@ + +
+ + tiny.getSystemIndex (world, system) +
+
+ Gets the index of a System in the world. Lower indexed Systems are processed + before higher indexed systems. + + +

Parameters:

+ + + + + +
@@ -499,8 +557,8 @@ tiny.remove (world, ...)
- Removes Entities and Systems from the World. Objects will exit the World the - next time World:update(dt) is called. + Shortcut for removing multiple Entities and Systems from the World. + Objects will exit the World the next time World:update(dt) is called.

Parameters:

@@ -517,6 +575,84 @@ +
+
+ + tiny.removeEntity (world, entity) +
+
+ Removes an Entity to the World. + The Entity will exit the World next time World:update is called. + Also call this on Entities that have changed Components such that it + matches different systems. + + +

Parameters:

+ + + + + + +
+
+ + tiny.removeSystem (world, system) +
+
+ Removes a System from the world. + The System will exit the World next time World:update is called. + + +

Parameters:

+ + + + + + +
+
+ + tiny.setSystemIndex (world, system, index) +
+
+ Sets the index of a System in the world. Changes the order in + which they Systems processed, because lower indexed Systems are processed + first. + + +

Parameters:

+ + + + + +
@@ -602,7 +738,7 @@
generated by LDoc 1.4.3 -Last updated 2015-03-31 19:59:57 +Last updated 2015-04-21 21:58:31