mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 为 GFramework.Godot.SourceGenerators 创建 GeWuYou.GFramework.Godot.SourceGenerators.targets 文件 - 为 GFramework.SourceGenerators 创建 GeWuYou.GFramework.SourceGenerators.targets 文件 - 在项目中启用 EnforceExtendedAnalyzerRules 规则 - 修正项目引用路径配置 - 更新包打包配置以包含正确的 targets 文件 - 从 GFramework.csproj 中移除多余的 targets 文件排除配置
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%