GFramework/GFramework.Core/Model/AbstractModel.cs
GeWuYou fb14d7122c docs(style): 更新文档中的命名空间导入格式
- 将所有小写的命名空间导入更正为首字母大写格式
- 统一 GFramework 框架的命名空间引用规范
- 修复 core、ecs、godot 等模块的命名空间导入错误
- 标准化文档示例代码中的 using 语句格式
- 确保所有文档中的命名空间引用保持一致性
- 更新 global using 语句以匹配正确的命名空间格式
2026-03-10 07:18:49 +08:00

34 lines
943 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using GFramework.Core.Abstractions.Enums;
using GFramework.Core.Abstractions.Lifecycle;
using GFramework.Core.Abstractions.Model;
using GFramework.Core.Rule;
namespace GFramework.Core.Model;
/// <summary>
/// 抽象模型基类实现IModel接口提供模型的基本架构支持
/// </summary>
public abstract class AbstractModel : ContextAwareBase, IModel
{
/// <summary>
/// 初始化模型调用抽象方法OnInit执行具体初始化逻辑
/// </summary>
void IInitializable.Initialize()
{
OnInit();
}
/// <summary>
/// 处理架构阶段事件的虚拟方法
/// </summary>
/// <param name="phase">当前的架构阶段</param>
public virtual void OnArchitecturePhase(ArchitecturePhase phase)
{
}
/// <summary>
/// 抽象初始化方法,由子类实现具体的初始化逻辑
/// </summary>
protected abstract void OnInit();
}