数组:修订间差异
无编辑摘要
小无编辑摘要 |
无编辑摘要 标签:移动版编辑 移动版网页编辑 |
||
第83行:
customTarget1.memory.obj.get(customTarget1.memory.unit.memory.index)
</pre>
如:thisActionIndex/index,eventSource,thisActionTarget。
使用消息接受数组,将返回空数组。
第101行 ⟶ 第102行:
setUnitMemory:buffer[index]=thisActionTarget.readUnitMemory("obj",type="unit[]").get(index)</pre>
警告:使用接受消息时复制数组,如果这涉及了跨队伍且队伍不为0,会导致复制的所有项为空,你可以使用alsoTriggerOrQueueActionWithTarget:eventSource和thisActionTarget避免它,但是如果你添加了条件这也会复制空,需要使用shrinkArrays:obj以修复它。
}}
===重定向到自己===▼
使用局部变量重定向到自己。
<pre>
[hiddenAction_0]
alsoTriggerAction:1
alsoTriggerOrQueueActionWithTarget:self
[hiddenAction_1]
debugMessage:customTarget1.readUnitMemory("arr",type="float[]").get(thisActionTarget.readUnitMemory("index",type="float"))
</pre>
===修改值===
使用发信等方式修改目标的值,通过被重定向目标进行访问(这里不提供代码实现)
▲===重定向到自己===
== 专用用法 ==
|