GwWuYou c5a11820bc build(generator): 添加源代码生成器的 MSBuild targets 配置文件
- 为 GFramework.Godot.SourceGenerators 创建 GeWuYou.GFramework.Godot.SourceGenerators.targets 文件
- 为 GFramework.SourceGenerators 创建 GeWuYou.GFramework.SourceGenerators.targets 文件
- 在项目中启用 EnforceExtendedAnalyzerRules 规则
- 修正项目引用路径配置
- 更新包打包配置以包含正确的 targets 文件
- 从 GFramework.csproj 中移除多余的 targets 文件排除配置
2025-12-27 23:05:44 +08:00
2025-12-09 17:09:43 +08:00

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

  1. 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:

  1. Core Layer: Fundamental abstractions and interfaces
  2. Application Layer: Use cases and application services
  3. Infrastructure Layer: External dependencies and implementations
  4. 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
No description provided
Readme Apache-2.0 9.2 MiB
Languages
C# 95.8%
Shell 2.9%
PowerShell 0.8%
Python 0.5%