数组:修订间差异
添加的内容 删除的内容
小无编辑摘要 |
无编辑摘要 标签:移动版编辑 移动版网页编辑 |
||
第83行: | 第83行: | ||
customTarget1.memory.obj.get(customTarget1.memory.unit.memory.index) |
customTarget1.memory.obj.get(customTarget1.memory.unit.memory.index) |
||
</pre> |
</pre> |
||
局部函数不受此影响。 |
|||
如:thisActionIndex/index,eventSource,thisActionTarget。 |
|||
使用消息接受数组,将返回空数组。 |
使用消息接受数组,将返回空数组。 |
||
第101行: | 第102行: | ||
setUnitMemory:buffer[index]=thisActionTarget.readUnitMemory("obj",type="unit[]").get(index)</pre> |
setUnitMemory:buffer[index]=thisActionTarget.readUnitMemory("obj",type="unit[]").get(index)</pre> |
||
警告:使用接受消息时复制数组,如果这涉及了跨队伍且队伍不为0,会导致复制的所有项为空,你可以使用alsoTriggerOrQueueActionWithTarget:eventSource和thisActionTarget避免它,但是如果你添加了条件这也会复制空,需要使用shrinkArrays:obj修复它 |
警告:使用接受消息时复制数组,如果这涉及了跨队伍且队伍不为0,会导致复制的所有项为空,你可以使用alsoTriggerOrQueueActionWithTarget:eventSource和thisActionTarget避免它,但是如果你添加了条件这也会复制空,需要使用shrinkArrays:obj以修复它。 |
||
详细请见 |
|||
clipboard/data/typeAll.ini |
|||
clipboard/data/floatTypes.ini |
|||
}} |
}} |
||
⚫ | |||
{{折叠|修改内存单位数据| |
|||
使用局部变量重定向到自己。 |
|||
<pre> |
|||
[hiddenAction_0] |
|||
alsoTriggerAction:1 |
|||
alsoTriggerOrQueueActionWithTarget:self |
|||
[hiddenAction_1] |
|||
debugMessage:customTarget1.readUnitMemory("arr",type="float[]").get(thisActionTarget.readUnitMemory("index",type="float")) |
|||
</pre> |
|||
===修改值=== |
|||
详细请见 |
|||
使用发信等方式修改目标的值,通过被重定向目标进行访问(这里不提供代码实现) |
|||
clipboard/gui/all-units.template |
|||
[action_0] |
|||
[action_next] |
|||
clipboard/gui/edit.ini |
|||
[action_last] |
|||
[action_next] |
|||
clipboard/gui/input.ini |
|||
[action_0b] |
|||
clipboard/gui/objput.ini |
|||
[action_0b] |
|||
[action_0n] |
|||
}} |
|||
下载链接: |
|||
[https://cra.lanzouj.com/b0agtlmih 蓝奏云] 密码00 |
|||
⚫ | |||
三重定向到自己的内存,需要内存单位持有自己。(如列3,这里不提供代码实现) |
|||
== 专用用法 == |
== 专用用法 == |