32 Star 227 Fork 40

GVPI++俱乐部/Dora-SSR

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Observer.mdx 719 Bytes
一键复制 编辑 原始数据 按行查看 历史
Li Jin 提交于 2025-01-06 16:24 +08:00 . Fixed doc site prismjs language adding. [skip CI]
# Observer
**Description:**
  A record representing an observer of entity changes in the game systems.
**Class Object:** [Observer Class](/docs/api/Class%20Object/Observer).
## watch
**Type:** Function.
**Description:**
  Watches the components changes to entities that match the observer's component filter.
**Signature:**
```tl
watch: function(self: Observer, func: function(Entity): boolean): Observer
```
**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| func | function | The function to call when a change occurs. Returns true to stop watching. |
**Returns:**
| Return Type | Description |
| --- | --- |
| Observer | The same observer, for method chaining. |
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/ippclub/Dora-SSR.git
git@gitee.com:ippclub/Dora-SSR.git
ippclub
Dora-SSR
Dora-SSR
main

搜索帮助