refactor api documentation structure
This commit is contained in:
31
docs/api/XCEngine/Components/GameObject/AddComponent.md
Normal file
31
docs/api/XCEngine/Components/GameObject/AddComponent.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# GameObject::AddComponent
|
||||
|
||||
添加元素或建立关联。
|
||||
|
||||
```cpp
|
||||
template<typename T, typename... Args> T* AddComponent(Args&&... args);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `args` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `template<typename T, typename... Args> T*` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::AddComponent(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/Awake.md
Normal file
30
docs/api/XCEngine/Components/GameObject/Awake.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::Awake
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void Awake();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::Awake(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
41
docs/api/XCEngine/Components/GameObject/Constructor.md
Normal file
41
docs/api/XCEngine/Components/GameObject/Constructor.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# GameObject::GameObject()
|
||||
|
||||
构造对象。
|
||||
|
||||
该方法在 `XCEngine/Components/GameObject.h` 中提供了 2 个重载,当前页面统一汇总这些公开声明。
|
||||
|
||||
## 重载 1: 声明
|
||||
|
||||
```cpp
|
||||
GameObject();
|
||||
```
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
## 重载 2: 声明
|
||||
|
||||
```cpp
|
||||
explicit GameObject(const std::string& name);
|
||||
```
|
||||
|
||||
**参数:**
|
||||
- `name` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
31
docs/api/XCEngine/Components/GameObject/Deserialize.md
Normal file
31
docs/api/XCEngine/Components/GameObject/Deserialize.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# GameObject::Deserialize
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void Deserialize(std::istream& is);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `is` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::Deserialize(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/Destroy.md
Normal file
30
docs/api/XCEngine/Components/GameObject/Destroy.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::Destroy
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void Destroy();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::Destroy(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
29
docs/api/XCEngine/Components/GameObject/Destructor.md
Normal file
29
docs/api/XCEngine/Components/GameObject/Destructor.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# GameObject::~GameObject()
|
||||
|
||||
销毁对象并释放相关资源。
|
||||
|
||||
```cpp
|
||||
~GameObject();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 对象离开作用域时会自动触发析构。
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/DetachChildren.md
Normal file
30
docs/api/XCEngine/Components/GameObject/DetachChildren.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::DetachChildren
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void DetachChildren();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::DetachChildren(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/DetachFromParent.md
Normal file
30
docs/api/XCEngine/Components/GameObject/DetachFromParent.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::DetachFromParent
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void DetachFromParent();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::DetachFromParent(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
31
docs/api/XCEngine/Components/GameObject/Find.md
Normal file
31
docs/api/XCEngine/Components/GameObject/Find.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# GameObject::Find
|
||||
|
||||
查找并返回匹配对象。
|
||||
|
||||
```cpp
|
||||
static GameObject* Find(const std::string& name);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `name` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `GameObject*` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::Find(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
@@ -0,0 +1,31 @@
|
||||
# GameObject::FindGameObjectsWithTag
|
||||
|
||||
查找并返回匹配对象。
|
||||
|
||||
```cpp
|
||||
static std::vector<GameObject*> FindGameObjectsWithTag(const std::string& tag);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `tag` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `std::vector<GameObject*>` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::FindGameObjectsWithTag(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/FindObjectsOfType.md
Normal file
30
docs/api/XCEngine/Components/GameObject/FindObjectsOfType.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::FindObjectsOfType
|
||||
|
||||
查找并返回匹配对象。
|
||||
|
||||
```cpp
|
||||
static std::vector<GameObject*> FindObjectsOfType();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `std::vector<GameObject*>` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::FindObjectsOfType(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/FixedUpdate.md
Normal file
30
docs/api/XCEngine/Components/GameObject/FixedUpdate.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::FixedUpdate
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void FixedUpdate();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::FixedUpdate(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
66
docs/api/XCEngine/Components/GameObject/GameObject.md
Normal file
66
docs/api/XCEngine/Components/GameObject/GameObject.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# GameObject
|
||||
|
||||
**命名空间**: `XCEngine::Components`
|
||||
|
||||
**类型**: `class`
|
||||
|
||||
**头文件**: `XCEngine/Components/GameObject.h`
|
||||
|
||||
**描述**: 定义 `XCEngine/Components` 子目录中的 `GameObject` public API。
|
||||
|
||||
## 概述
|
||||
|
||||
`GameObject.h` 是 `XCEngine/Components` 子目录 下的 public header,当前页面作为平行目录中的 canonical 总览,用于汇总该头文件暴露的主要声明。
|
||||
|
||||
## 声明概览
|
||||
|
||||
| 声明 | 类型 | 说明 |
|
||||
|------|------|------|
|
||||
| `GameObject` | `class` | 头文件中的公开声明。 |
|
||||
|
||||
## 公共方法
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| [GameObject()](Constructor.md) | 构造对象。 |
|
||||
| [~GameObject()](Destructor.md) | 销毁对象并释放相关资源。 |
|
||||
| [GetID](GetID.md) | 获取相关状态或对象。 |
|
||||
| [GetUUID](GetUUID.md) | 获取相关状态或对象。 |
|
||||
| [GetName](GetName.md) | 获取相关状态或对象。 |
|
||||
| [SetName](SetName.md) | 设置相关状态或配置。 |
|
||||
| [DetachFromParent](DetachFromParent.md) | 公开方法,详见头文件声明。 |
|
||||
| [GetScene](GetScene.md) | 获取相关状态或对象。 |
|
||||
| [GetTransform](GetTransform.md) | 获取相关状态或对象。 |
|
||||
| [AddComponent](AddComponent.md) | 添加元素或建立关联。 |
|
||||
| [GetComponent](GetComponent.md) | 获取相关状态或对象。 |
|
||||
| [GetComponents](GetComponents.md) | 获取相关状态或对象。 |
|
||||
| [RemoveComponent](RemoveComponent.md) | 移除元素或解除关联。 |
|
||||
| [GetComponentInChildren](GetComponentInChildren.md) | 获取相关状态或对象。 |
|
||||
| [GetComponentInParent](GetComponentInParent.md) | 获取相关状态或对象。 |
|
||||
| [GetComponentsInChildren](GetComponentsInChildren.md) | 获取相关状态或对象。 |
|
||||
| [GetParent](GetParent.md) | 获取相关状态或对象。 |
|
||||
| [SetParent](SetParent.md) | 设置相关状态或配置。 |
|
||||
| [GetChildCount](GetChildCount.md) | 获取相关状态或对象。 |
|
||||
| [GetChild](GetChild.md) | 获取相关状态或对象。 |
|
||||
| [GetChildren](GetChildren.md) | 获取相关状态或对象。 |
|
||||
| [DetachChildren](DetachChildren.md) | 公开方法,详见头文件声明。 |
|
||||
| [IsActive](IsActive.md) | 查询当前状态。 |
|
||||
| [SetActive](SetActive.md) | 设置相关状态或配置。 |
|
||||
| [IsActiveInHierarchy](IsActiveInHierarchy.md) | 查询当前状态。 |
|
||||
| [Find](Find.md) | 查找并返回匹配对象。 |
|
||||
| [FindObjectsOfType](FindObjectsOfType.md) | 查找并返回匹配对象。 |
|
||||
| [FindGameObjectsWithTag](FindGameObjectsWithTag.md) | 查找并返回匹配对象。 |
|
||||
| [Awake](Awake.md) | 公开方法,详见头文件声明。 |
|
||||
| [Start](Start.md) | 公开方法,详见头文件声明。 |
|
||||
| [Update](Update.md) | 更新运行时状态。 |
|
||||
| [FixedUpdate](FixedUpdate.md) | 公开方法,详见头文件声明。 |
|
||||
| [LateUpdate](LateUpdate.md) | 公开方法,详见头文件声明。 |
|
||||
| [OnDestroy](OnDestroy.md) | 公开方法,详见头文件声明。 |
|
||||
| [Destroy](Destroy.md) | 公开方法,详见头文件声明。 |
|
||||
| [Serialize](Serialize.md) | 公开方法,详见头文件声明。 |
|
||||
| [Deserialize](Deserialize.md) | 公开方法,详见头文件声明。 |
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [当前目录](../Components.md) - 返回 `Components` 平行目录
|
||||
- [API 总索引](../../../main.md) - 返回顶层索引
|
||||
31
docs/api/XCEngine/Components/GameObject/GetChild.md
Normal file
31
docs/api/XCEngine/Components/GameObject/GetChild.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# GameObject::GetChild
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
GameObject* GetChild(size_t index) const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `index` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `GameObject*` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetChild(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/GetChildCount.md
Normal file
30
docs/api/XCEngine/Components/GameObject/GetChildCount.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetChildCount
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
size_t GetChildCount() const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `size_t` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetChildCount(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/GetChildren.md
Normal file
30
docs/api/XCEngine/Components/GameObject/GetChildren.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetChildren
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
std::vector<GameObject*> GetChildren() const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `std::vector<GameObject*>` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetChildren(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
42
docs/api/XCEngine/Components/GameObject/GetComponent.md
Normal file
42
docs/api/XCEngine/Components/GameObject/GetComponent.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# GameObject::GetComponent
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
该方法在 `XCEngine/Components/GameObject.h` 中提供了 2 个重载,当前页面统一汇总这些公开声明。
|
||||
|
||||
## 重载 1: 声明
|
||||
|
||||
```cpp
|
||||
template<typename T> T* GetComponent();
|
||||
```
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `template<typename T> T*` - 返回值语义详见头文件声明。
|
||||
|
||||
## 重载 2: 声明
|
||||
|
||||
```cpp
|
||||
template<typename T> const T* GetComponent() const;
|
||||
```
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `template<typename T> const T*` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetComponent(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetComponentInChildren
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
template<typename T> T* GetComponentInChildren();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `template<typename T> T*` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetComponentInChildren(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetComponentInParent
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
template<typename T> T* GetComponentInParent();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `template<typename T> T*` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetComponentInParent(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
42
docs/api/XCEngine/Components/GameObject/GetComponents.md
Normal file
42
docs/api/XCEngine/Components/GameObject/GetComponents.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# GameObject::GetComponents
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
该方法在 `XCEngine/Components/GameObject.h` 中提供了 2 个重载,当前页面统一汇总这些公开声明。
|
||||
|
||||
## 重载 1: 声明
|
||||
|
||||
```cpp
|
||||
template<typename T> std::vector<T*> GetComponents();
|
||||
```
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `template<typename T> std::vector<T*>` - 返回值语义详见头文件声明。
|
||||
|
||||
## 重载 2: 声明
|
||||
|
||||
```cpp
|
||||
template<typename T> std::vector<const T*> GetComponents() const;
|
||||
```
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `template<typename T> std::vector<const T*>` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetComponents(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetComponentsInChildren
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
template<typename T> std::vector<T*> GetComponentsInChildren();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `template<typename T> std::vector<T*>` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetComponentsInChildren(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/GetID.md
Normal file
30
docs/api/XCEngine/Components/GameObject/GetID.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetID
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
ID GetID() const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `ID` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetID(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/GetName.md
Normal file
30
docs/api/XCEngine/Components/GameObject/GetName.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetName
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
const std::string& GetName() const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `const std::string&` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetName(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/GetParent.md
Normal file
30
docs/api/XCEngine/Components/GameObject/GetParent.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetParent
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
GameObject* GetParent() const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `GameObject*` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetParent(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/GetScene.md
Normal file
30
docs/api/XCEngine/Components/GameObject/GetScene.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetScene
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
Scene* GetScene() const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `Scene*` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetScene(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
42
docs/api/XCEngine/Components/GameObject/GetTransform.md
Normal file
42
docs/api/XCEngine/Components/GameObject/GetTransform.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# GameObject::GetTransform
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
该方法在 `XCEngine/Components/GameObject.h` 中提供了 2 个重载,当前页面统一汇总这些公开声明。
|
||||
|
||||
## 重载 1: 声明
|
||||
|
||||
```cpp
|
||||
TransformComponent* GetTransform();
|
||||
```
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `TransformComponent*` - 返回值语义详见头文件声明。
|
||||
|
||||
## 重载 2: 声明
|
||||
|
||||
```cpp
|
||||
const TransformComponent* GetTransform() const;
|
||||
```
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `const TransformComponent*` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetTransform(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/GetUUID.md
Normal file
30
docs/api/XCEngine/Components/GameObject/GetUUID.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::GetUUID
|
||||
|
||||
获取相关状态或对象。
|
||||
|
||||
```cpp
|
||||
uint64_t GetUUID() const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `uint64_t` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::GetUUID(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/IsActive.md
Normal file
30
docs/api/XCEngine/Components/GameObject/IsActive.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::IsActive
|
||||
|
||||
查询当前状态。
|
||||
|
||||
```cpp
|
||||
bool IsActive() const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `bool` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::IsActive(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
@@ -0,0 +1,30 @@
|
||||
# GameObject::IsActiveInHierarchy
|
||||
|
||||
查询当前状态。
|
||||
|
||||
```cpp
|
||||
bool IsActiveInHierarchy() const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `bool` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::IsActiveInHierarchy(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
31
docs/api/XCEngine/Components/GameObject/LateUpdate.md
Normal file
31
docs/api/XCEngine/Components/GameObject/LateUpdate.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# GameObject::LateUpdate
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void LateUpdate(float deltaTime);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `deltaTime` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::LateUpdate(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
30
docs/api/XCEngine/Components/GameObject/OnDestroy.md
Normal file
30
docs/api/XCEngine/Components/GameObject/OnDestroy.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::OnDestroy
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void OnDestroy();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::OnDestroy(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
43
docs/api/XCEngine/Components/GameObject/RemoveComponent.md
Normal file
43
docs/api/XCEngine/Components/GameObject/RemoveComponent.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# GameObject::RemoveComponent
|
||||
|
||||
移除元素或解除关联。
|
||||
|
||||
该方法在 `XCEngine/Components/GameObject.h` 中提供了 2 个重载,当前页面统一汇总这些公开声明。
|
||||
|
||||
## 重载 1: 声明
|
||||
|
||||
```cpp
|
||||
template<typename T> void RemoveComponent();
|
||||
```
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `template<typename T> void` - 返回值语义详见头文件声明。
|
||||
|
||||
## 重载 2: 声明
|
||||
|
||||
```cpp
|
||||
bool RemoveComponent(Component* component);
|
||||
```
|
||||
|
||||
**参数:**
|
||||
- `component` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `bool` - 返回值语义详见头文件声明。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::RemoveComponent(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
31
docs/api/XCEngine/Components/GameObject/Serialize.md
Normal file
31
docs/api/XCEngine/Components/GameObject/Serialize.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# GameObject::Serialize
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void Serialize(std::ostream& os) const;
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `os` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::Serialize(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
31
docs/api/XCEngine/Components/GameObject/SetActive.md
Normal file
31
docs/api/XCEngine/Components/GameObject/SetActive.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# GameObject::SetActive
|
||||
|
||||
设置相关状态或配置。
|
||||
|
||||
```cpp
|
||||
void SetActive(bool active);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `active` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::SetActive(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
31
docs/api/XCEngine/Components/GameObject/SetName.md
Normal file
31
docs/api/XCEngine/Components/GameObject/SetName.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# GameObject::SetName
|
||||
|
||||
设置相关状态或配置。
|
||||
|
||||
```cpp
|
||||
void SetName(const std::string& name);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `name` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::SetName(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
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)
|
||||
30
docs/api/XCEngine/Components/GameObject/Start.md
Normal file
30
docs/api/XCEngine/Components/GameObject/Start.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# GameObject::Start
|
||||
|
||||
公开方法,详见头文件声明。
|
||||
|
||||
```cpp
|
||||
void Start();
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:** 无。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::Start(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
31
docs/api/XCEngine/Components/GameObject/Update.md
Normal file
31
docs/api/XCEngine/Components/GameObject/Update.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# GameObject::Update
|
||||
|
||||
更新运行时状态。
|
||||
|
||||
```cpp
|
||||
void Update(float deltaTime);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Components/GameObject.h`,当前页面用于固定 `GameObject` 类目录下的方法级 canonical 路径。
|
||||
|
||||
**参数:**
|
||||
- `deltaTime` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Components::GameObject object;
|
||||
// 根据上下文补齐参数后调用 GameObject::Update(...)。
|
||||
(void)object;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](GameObject.md)
|
||||
- [返回模块目录](../Components.md)
|
||||
Reference in New Issue
Block a user