public Entity Create <T>(params object[] args) where T : IGameEntity { Entity entity = _world.CreateEntity(); IGameEntity gameObject = _context.ResolveNamed <IGameEntity>(typeof(T).ToString()); gameObject.BuildEntity(entity, args); return(entity); }
public Entity Create <TEntity, TArgument>(TArgument args) where TEntity : IGameEntity <TArgument> where TArgument : class { Entity entity = _world.CreateEntity(); IGameEntity <TArgument> gameObject = _context.Resolve <IGameEntity <TArgument> >(); gameObject.BuildEntity(entity, args); return(entity); }