|
|
@ -3,6 +3,7 @@ using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
|
using gaemstone.Utility; |
|
|
|
using gaemstone.Utility; |
|
|
|
using static gaemstone.Flecs.Core; |
|
|
|
using static gaemstone.Flecs.Core; |
|
|
|
|
|
|
|
using BindingFlags = System.Reflection.BindingFlags; |
|
|
|
|
|
|
|
|
|
|
|
namespace gaemstone.ECS; |
|
|
|
namespace gaemstone.ECS; |
|
|
|
|
|
|
|
|
|
|
@ -174,7 +175,7 @@ internal class ModuleInfo |
|
|
|
|
|
|
|
|
|
|
|
private void RegisterNestedTypes() |
|
|
|
private void RegisterNestedTypes() |
|
|
|
{ |
|
|
|
{ |
|
|
|
foreach (var type in Type.GetNestedTypes()) { |
|
|
|
foreach (var type in Type.GetNestedTypes(BindingFlags.Public | BindingFlags.NonPublic)) { |
|
|
|
if (!type.GetCustomAttributes(true).OfType<ICreateEntityAttribute>().Any()) continue; |
|
|
|
if (!type.GetCustomAttributes(true).OfType<ICreateEntityAttribute>().Any()) continue; |
|
|
|
|
|
|
|
|
|
|
|
// If proxied type is specified, use it instead of the marked type. |
|
|
|
// If proxied type is specified, use it instead of the marked type. |
|
|
@ -191,7 +192,7 @@ internal class ModuleInfo |
|
|
|
: new EntityPath(false, proxyType.Name); |
|
|
|
: new EntityPath(false, proxyType.Name); |
|
|
|
|
|
|
|
|
|
|
|
var builder = path.IsAbsolute ? Universe.New(path) : Entity.NewChild(path); |
|
|
|
var builder = path.IsAbsolute ? Universe.New(path) : Entity.NewChild(path); |
|
|
|
if (!type.Has<PrivateAttribute>()) builder.Symbol(path.Name); |
|
|
|
if (!type.IsPublic) builder.Symbol(path.Name); |
|
|
|
|
|
|
|
|
|
|
|
var entity = builder.Build(); |
|
|
|
var entity = builder.Build(); |
|
|
|
|
|
|
|
|
|
|
|