refactor api documentation structure
This commit is contained in:
45
docs/api/XCEngine/Components/GameObject/SetParent.md
Normal file
45
docs/api/XCEngine/Components/GameObject/SetParent.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# GameObject::SetParent
|
||||
|
||||
设置相关状态或配置。
|
||||
|
||||
该方法在 `XCEngine/Components/GameObject.h` 中提供了 2 个重载,当前页面统一汇总这些公开声明。
|
||||
|
||||
## 重载 1: 声明
|
||||
|
||||
```cpp
|
||||
void SetParent(GameObject* parent);
|
||||
```
|
||||
|
||||
**参数:**
|
||||
- `parent` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
## 重载 2: 声明
|
||||
|
||||
```cpp
|
||||
void SetParent(GameObject* parent, bool worldPositionStays);
|
||||
```
|
||||
|
||||
**参数:**
|
||||
- `parent` - 参数语义详见头文件声明。
|
||||
- `worldPositionStays` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::SetParent(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
Reference in New Issue
Block a user