Updated Objects (markdown)

2017-06-14 15:58:06 -04:00
parent d7befea42b
commit 838edb29ff
+17
@@ -25,6 +25,7 @@ multi:mainloop() -- start the main runner
Note: I will not be giving the output to all examples on the wiki
As mentioned above you can load a process from file. This can only work if your lua environment allows for the usage of loadstring!
**testfile.lua**
```lua
process:newTLoop(function(self)
@@ -60,6 +61,22 @@ Here is a list of every actor within the library
* [updaters](https://github.com/rayaman/multi/wiki/Objects#updaters) - runner:newUpdater([**number** skip -- defualts to 0])
* [watchers](https://github.com/rayaman/multi/wiki/Objects#watchers) - runnet:newWatcher(**table** namespace, **string** name)
All actors have a few methods in common. These methods are
* Pause() - Pauses the object
* Resume() - Resumes the object
* Destroy() - destroys the object
* Hold(n)* - holds an object where it is while it waits for something to happen. where 'n' is an event or time
* IsHeld() - returns true or false whether the object is in a hold or not
* WaitFor(obj)* - holds the object until
* OnMainConnect(func) - connects to the main event of an actor object. These will be noted on each object below
* Reallocate(runner_other, index) -- More on this on the
*
*Note: that only one object can be held at a time, and only on the main runner! If you need more flexibility use [threads](https://github.com/rayaman/multi/wiki/threading). The threading page will explain how this works. Its just like regular objects so you will understand that easily after grasping how each actor itself works.
# events
The event object has this structure
event:
**function** OnEvent(func)
# Semi-Actors