From 32cb3859fcd029f0c214b0e3d69537b53ea9e145 Mon Sep 17 00:00:00 2001 From: Ryan Ward Date: Wed, 14 Jun 2017 16:29:01 -0400 Subject: [PATCH] Updated Objects (markdown) --- Objects.md | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/Objects.md b/Objects.md index f59231c..1b6d5d8 100644 --- a/Objects.md +++ b/Objects.md @@ -65,18 +65,39 @@ 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 +* Hold(**number** 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 -* +* OnMainConnect(**function**) - connects to the main event of an actor object. This will be noted on each object below +* Reallocate(runner_other, index) -- More on this on the features page +* FreeMainEvent() - frees all connections to the main event +* ConnectFinal(**function**) - connects to the final event of an object. This will be noted on each object below +* GetParentProcess() - returns the runner that is running the current object +* Break() - breaks an object pausing it and triggering the OnBreak() Connection +* OnBreak(**function**(self)) - a connection to the Break event on each actor +* IsPaused() - returns true if an object is paused +* IsActive() - returns true if an object is active +* GetType() - returns the type of object that it is. The expected returns will be noted below with each object +* Sleep(n)* - makes an object sleep for a while +* SetTime(**number** n) - sets the time until an object should timeout +* OnTimedOut(func) - triggers if an object times out. Note: an object will not time out unless you call SetTime(n) on it! +* ResetTime(**number** n) - resets a timed out object +* ResolveTimer(...) - triggers the OnTimerResloved event and passes along the arguments you pass +* OnTimerResolved(**function**(self,...)) - is triggered by the ResolveTimer() function +* Reset() - resets an object, in most cases this acts like Resume() +* IsDone() - returns true if an object is done doing something. In most cases it works like IsActive() +* NewCondition - creates a condition object [features](https://github.com/rayaman/multi/wiki/features#Conditions) +* NewRange() - creates a range object [features](https://github.com/rayaman/multi/wiki/features#Ranges) +* Condition() - tests a condition [features](https://github.com/rayaman/multi/wiki/features#Conditions) + *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) - +* **function** OnEvent(func) +* **string** Type + # Semi-Actors