📦 deps(tsl): sync tsl-playbook from a0131f52

Source-Commit: a0131f52c6
This commit is contained in:
ci[bot]
2026-08-12 12:41:37 +08:00
parent 670ba950a6
commit 85a9d8ee40
5 changed files with 22 additions and 0 deletions
@@ -42,7 +42,9 @@
- 基础覆盖写法是:父类方法声明为 `virtual`,子类对应方法声明为 `override`
- 基础祖先类调用:可以用 `Inherited;``Inherited MethodName(...)``class(BaseClass, ObjectName).MethodName()`
- 创建对象有两种方式:`new ClassName()` 最常用,`createObject(...)` 作为次选。
<!-- quickstart-rule: object-creation -->
- 普通本地类实例化默认生成 `new ClassName()``createObject("ClassName")``createObject(ClassType)` 只在字符串类名、类类型变量或跨 `unit` 路径场景生成。
- 如果类里定义了 `function create(...)``new``createObject("ClassName", ...)``createObject(ClassType, ...)` 都可以透传构造参数,也都支持默认参数和命名参数。
- 析构写法是无参 `function destroy();`;对象的最后一个引用被清空(如设为 `nil`)时会触发它。存在别名引用时,只清空其中一个引用不会触发。