feat: initial DX12 foundation framework
This commit is contained in:
35
Engine/Components/Script.h
Normal file
35
Engine/Components/Script.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @file Script.h
|
||||
* @brief 脚本组件创建、销毁与更新接口。
|
||||
*/
|
||||
#pragma once
|
||||
#include "ComponentsCommon.h"
|
||||
|
||||
namespace XEngine::script {
|
||||
|
||||
/**
|
||||
* @brief 脚本组件初始化信息。
|
||||
*/
|
||||
struct init_info
|
||||
{
|
||||
detail::script_creator script_creator;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief 为实体创建脚本组件。
|
||||
* @param info 脚本初始化信息。
|
||||
* @param entity 目标实体。
|
||||
* @return 创建后的脚本组件句柄。
|
||||
*/
|
||||
component create(init_info info, game_entity::entity entity);
|
||||
/**
|
||||
* @brief 移除脚本组件。
|
||||
* @param c 脚本组件句柄。
|
||||
*/
|
||||
void remove(component c);
|
||||
/**
|
||||
* @brief 更新所有脚本组件。
|
||||
* @param dt 帧时间间隔(秒)。
|
||||
*/
|
||||
void update(float dt);
|
||||
}
|
||||
Reference in New Issue
Block a user