This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
component:signals:zh [2023/11/29 10:46] hfsr [目录] |
component:signals:zh [2023/12/27 04:28] (current) hfsr [信号] |
||
---|---|---|---|
Line 2: | Line 2: | ||
==== | ==== | ||
- | 信号是由某些外部来源发送给电脑的信息,可被用于各种用途。它们需要至少有个名字,然后还可以有任意数量的(简单)参数。注意,电脑也可以向自己的信号队列中添加信号。 | + | 信号是由某些外部来源发送给电脑的信息,可被用于各种用途。它们需要至少有个名字,然后还可以有任意数量的(简单)参数。注意,电脑自己也可以向自己的信号队列中添加信号。 |
- | 信号可以通过调用[[api:computer:zh|computer.pullSignal()]]或其简单封装[[api:event:zh|event.pull()]]来消耗。 | + | 信号可以被[[api:computer:zh|computer.pullSignal()]]或其更方便的封装[[api:event:zh|event.pull()]]消耗掉。 |
下面列出了所有由组件和内置库触发的信号。它们由以下格式列出:`信号名(参数名: 参数类型, ...)`,你可以用`local name, arg, ... = event.pull()`这样的写法拉取它们。 | 下面列出了所有由组件和内置库触发的信号。它们由以下格式列出:`信号名(参数名: 参数类型, ...)`,你可以用`local name, arg, ... = event.pull()`这样的写法拉取它们。 | ||
Line 138: | Line 138: | ||
来自[Redstone in motion / remain in motion(红石运动机构)](https://www.curseforge.com/minecraft/mc-mods/remain-in-motion) | 来自[Redstone in motion / remain in motion(红石运动机构)](https://www.curseforge.com/minecraft/mc-mods/remain-in-motion) | ||
- | **注意:**该组件的驱动程序已被移动到附属模组OpenComponents中。 | + | <del>**注意:**该组件的驱动程序已被移动到附属模组OpenComponents中。</del> |
+ | OpenComponents模组的内容已合并进主模组。 | ||
- `carriage_moved(success: boolean[, reason:string[, x:number, y: number, z: number]])` | - `carriage_moved(success: boolean[, reason:string[, x:number, y: number, z: number]])` | ||
Line 145: | Line 146: | ||
目录 | 目录 | ||
----------- | ----------- | ||
- | {{page>components:contents:zh&noheader&noeditbutton&nouser&nofooter}} | + | {{page>component:contents:zh&noheader&noeditbutton&nouser&nofooter}} |