コード例 #1
0
ファイル: EntityFactory.cs プロジェクト: zunath/MMXEngine
        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);
        }
コード例 #2
0
ファイル: EntityFactory.cs プロジェクト: zunath/Ceriyo
        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);
        }