mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
refactor(GFramework.Core): 修改GameArchitecture类继承关系
移除了GameArchitecture类中的泛型参数,从Architecture<GameArchitecture> 改为直接继承Architecture基类,并更新了相应的代码格式。
This commit is contained in:
parent
396723bd68
commit
ca133d47f5
@ -116,14 +116,14 @@ public class CombatSystem : AbstractSystem
|
||||
### 2. 注册 System
|
||||
|
||||
```csharp
|
||||
public class GameArchitecture : Architecture<GameArchitecture>
|
||||
public class GameArchitecture : Architecture
|
||||
{
|
||||
protected override void Init()
|
||||
{
|
||||
// 注册 Model
|
||||
this.RegisterModel<PlayerModel>(new PlayerModel());
|
||||
this.RegisterModel<EnemyModel>(new EnemyModel());
|
||||
|
||||
|
||||
// 注册 System(系统注册后会自动调用 Init)
|
||||
this.RegisterSystem<CombatSystem>(new CombatSystem());
|
||||
this.RegisterSystem<InventorySystem>(new InventorySystem());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user