32 Star 225 Fork 40

GVPI++俱乐部/Dora-SSR

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Event.mdx 750 Bytes
一键复制 编辑 原始数据 按行查看 历史
Li Jin 提交于 2025-01-06 16:24 +08:00 . Fixed doc site prismjs language adding. [skip CI]
# Event
**Description:**
  Creates a definition for an action that emits event.
**Signature:**
```tl
Event: function(
name: string,
param?: string --[[""]]
): ActionDef
```
**Usage:**
```tl
-- Get this event by register event from the action performing node.
node:slot("EventName", function(param: string)
print("EventName triggered with param", param)
end)
node:perform(Sequence(
Delay(3),
Event("EventName", "Hello")
))
```
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| name | string | The name of the event to be triggered. |
| param | string | The parameter to pass to the event. (default: "") |
**Returns:**
| Return Type | Description |
| --- | --- |
| ActionDef | The created `ActionDef`. |
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/ippclub/Dora-SSR.git
git@gitee.com:ippclub/Dora-SSR.git
ippclub
Dora-SSR
Dora-SSR
main

搜索帮助