小
无编辑摘要
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的4个中间版本) | |||
第48行:
<code>单位引用.readUnitMemory('名称',type='类型',index='下标')</code>
<br>self.customTarget1.readUnitMemory('a',type='number',index=114)▼
=== 修改数组 ===▼
在[action]中,可以通过<code>setUnitMemory</code>来直接修改内存的值,格式为<code>setUnitMemory:名称[下标]=值</code> 。
▲===修改数组===
当修改的下标在数组中不存在时,数组大小将会更改为修改的下标。
{{折叠|setUnitMemory例子|<pre>
第81行 ⟶ 第83行:
customTarget1.memory.obj.get(customTarget1.memory.unit.memory.index)
</pre>
如:thisActionIndex/index,eventSource,thisActionTarget。
使用消息接受数组,将返回空数组。
第99行 ⟶ 第102行:
setUnitMemory:buffer[index]=thisActionTarget.readUnitMemory("obj",type="unit[]").get(index)</pre>
}}
===重定向到自己===▼
使用局部变量重定向到自己。
<pre>
[hiddenAction_0]
alsoTriggerAction:1
alsoTriggerOrQueueActionWithTarget:self
[hiddenAction_1]
debugMessage:customTarget1.readUnitMemory("arr",type="float[]").get(thisActionTarget.readUnitMemory("index",type="float"))
</pre>
===修改值===
使用发信等方式修改目标的值,通过被重定向目标进行访问(这里不提供代码实现)
▲===重定向到自己===
== 专用用法 ==
|