mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 添加 CommonDiagnostics 类提供通用诊断描述符 - 将诊断相关文件从 logging 目录移动到 diagnostics 目录 - 更新命名空间从 GFramework.SourceGenerators.Common.diagnostics 到 GFramework.SourceGenerators.diagnostics - 修改诊断ID从 GFC001 到 GF_Common_Class_001 - 移除 GFramework.SourceGenerators.Common 项目引用 - 更新 AnalyzerReleases.Unshipped.md 文件中的诊断规则 - 重构 README.md 文件提供完整的项目介绍和使用指南
GFramework
A comprehensive C# game development framework designed for Godot and general game development scenarios.
Features
Core Architecture
- Dependency Injection: Built-in IoC container for managing object lifecycles
- Event System: Type-safe event system for loose coupling
- Property Binding: Bindable properties for reactive programming
- Logging Framework: Structured logging with multiple log levels
Game Development Features
- Asset Management: Centralized asset catalog system
- Resource Factory: Factory pattern for resource creation
- Architecture Pattern: Clean architecture with separation of concerns
Godot Integration
- Godot-Specific Extensions: Extensions and utilities for Godot development
- Node Extensions: Helpful extensions for Godot Node classes
- Godot Logger: Specialized logging system for Godot applications
Projects
Core Projects
- GFramework.Core: Core framework functionality
- GFramework.Game: Game-specific abstractions and systems
- GFramework.Godot: Godot-specific implementations
Source Generators
- GFramework.SourceGenerators: Code generators for automatic code generation
- GFramework.Godot.SourceGenerators: Godot-specific code generators
- GFramework.SourceGenerators.Abstractions: Abstractions for source generators
- GFramework.Godot.SourceGenerators.Abstractions: Godot-specific abstractions
Getting Started
Installation
- Install the NuGet packages:
dotnet add package GeWuYou.GFramework.Core
dotnet add package GeWuYou.GFramework.Game
dotnet add package GeWuYou.GFramework.Godot
Basic Usage
// Create an architecture instance
var architecture = new MyArchitecture();
// Initialize the architecture
await architecture.InitializeAsync();
// Access services
var service = architecture.Container.Resolve<IMyService>();
Godot Integration
// Use Godot-specific features
[GodotLog]
public partial class MyGodotNode : Node
{
// Auto-generated logger will be available
private readonly ILogger _log = Log.GetLogger("MyGodotNode");
public override void _Ready()
{
_log.Info("Node is ready!");
}
}
Architecture
The framework follows clean architecture principles with the following layers:
- Core Layer: Fundamental abstractions and interfaces
- Application Layer: Use cases and application services
- Infrastructure Layer: External dependencies and implementations
- Presentation Layer: UI and user interaction components
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
Support
For support and questions, please open an issue in the repository.
Description
Languages
C#
95.8%
Shell
2.9%
PowerShell
0.8%
Python
0.5%