|
|
Line 1: |
Line 1: |
− | Composts of ScriptingData class.
| + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/sscriptingdata |
− | =Members=
| + | |
− | | + | |
− | {{ScriptFunction|bool|Enabled|{get; set;}|Return if the ScriptingData component is Enabled or not|5=local thisObject=Space.Host.ExecutingObject<br>
| + | |
− | local thisObjectData=thisObject.Data<br>
| + | |
− | Space.Log(thisObjectData.Enabled)|6=<pre>--clicking this object will Enable/Disable it's Scripting Data component
| + | |
− | thisGameObject = Space.Host.ExecutingObject
| + | |
− | component = thisGameObject.Data
| + | |
− | | + | |
− | OnClick = function()
| + | |
− | component.Enabled = not component.Enabled
| + | |
− | end
| + | |
− | | + | |
− | | + | |
− | thisGameObject.AddClickable()
| + | |
− | thisGameObject.Clickable.OnClick(OnClick)</pre>
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|string|Variables|{get;}|Return a list of variables.|5=local thisObject=Space.Host.ExecutingObject.<br>
| + | |
− | local thisObjectVariable=thisObject.Data.Variables<br>
| + | |
− | for i=1, #thisObjectVariable do<br>
| + | |
− | Space.Log(thisObjectVariable[i])<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | | + | |
− | =Properties=
| + | |
− | {{ScriptFunction|void|SetVariable|{string name, DynValue property;}|Set properties to variable.|5=local thisObject=Space.Host.ExecutingObject.<br>
| + | |
− | thisObjectData.SetVariable(no1Name,"no1",false)<br>
| + | |
− | Space.Log(no1)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|object|GetVariable|{string name;}|Return the object of the variable.|5=local thisObject=Space.Host.ExecutingObject.<br>
| + | |
− | local thisObjectVariable=thisObject.Data.Variables<br>
| + | |
− | for i=1, #thisObjectVariable do<br>
| + | |
− | Space.Log(thisObjectVariable[i])<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |