You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
810 B

using System;
using System.Collections.Generic;
namespace gaemstone.ECS;
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
public class ModuleAttribute : SingletonAttribute { }
[AttributeUsage(AttributeTargets.Class)]
public class BuiltInAttribute : Attribute { }
/// <summary>
/// A concrete implementation of this interface is generated by a source
/// generator for each type marked as <see cref="ModuleAttribute"/>.
/// </summary>
public interface IModule
{
static abstract string Path { get; }
static abstract bool IsBuiltIn { get; }
static abstract IReadOnlyList<string> Dependencies { get; }
static abstract void Initialize<TContext>(Entity<TContext> module);
}
public interface IModuleInitializer
{
static abstract void Initialize<TContext>(Entity<TContext> module);
}