mirror of
https://github.com/rayaman/multi.git
synced 2026-09-05 07:27:35 -04:00
Updated Objects (markdown)
+11
-3
@@ -25,13 +25,13 @@ multi:mainloop() -- start the main runner
|
|||||||
Note: I will not be giving the output to all examples on the wiki
|
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!
|
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
|
**testfile.lua**
|
||||||
```lua
|
```lua
|
||||||
process:newTLoop(function(self)
|
process:newTLoop(function(self)
|
||||||
print("Looping every second...")
|
print("Looping every second...")
|
||||||
end,1)
|
end,1)
|
||||||
```
|
```
|
||||||
main.lua
|
**main.lua**
|
||||||
```lua
|
```lua
|
||||||
require("multi.all")
|
require("multi.all")
|
||||||
pro=multi:newProcess("testfile.lua")
|
pro=multi:newProcess("testfile.lua")
|
||||||
@@ -50,7 +50,15 @@ multi:mainloop() -- start the main runner
|
|||||||
|
|
||||||
Now that we see how we can use Actors on a runner let's get into each Actor and how they work
|
Now that we see how we can use Actors on a runner let's get into each Actor and how they work
|
||||||
# Actors
|
# Actors
|
||||||
*
|
Here is a list of every actor within the library
|
||||||
|
* [events](https://github.com/rayaman/multi/wiki/Objects#events) - runner:newEvent(**function** task(self))
|
||||||
|
* [alarms](https://github.com/rayaman/multi/wiki/Objects#alarms) - runner:newAlarm(**number** set)
|
||||||
|
* [loops](https://github.com/rayaman/multi/wiki/Objects#loops) - runner:newLoop(**function** loop(dt,self)) Note: dt stands for the change in time from the objects creation
|
||||||
|
* [tloops](https://github.com/rayaman/multi/wiki/Objects#tloops) - runner:newTLoop(**function** loop(self), **number** set)
|
||||||
|
* [steps](https://github.com/rayaman/multi/wiki/Objects#steps) - runner:newStep(**number** start,**number** endAt, [**number** count - defualts to 1 or -1], [**number** skip - defualts to 0])
|
||||||
|
* [tsteps](https://github.com/rayaman/multi/wiki/Objects#tsteps) - runner:newTStep(**number** start,**number** endAt, [**number** count - defualts to 1 or -1], [**number** set - defualts to 1])
|
||||||
|
* [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)
|
||||||
|
|
||||||
# Semi-Actors
|
# Semi-Actors
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user