Пример #1
0
        /// <summary>
        ///     Creates an <see cref="Entity" /> instance from this template.
        /// </summary>
        /// <remarks>
        ///     This function allocates native memory. The <see cref="Entity" /> returned from this function should
        ///     be handed to a GDK API, which will take ownership, or otherwise must be disposed of manually.
        /// </remarks>
        /// <returns>The Entity object.</returns>
        public Entity GetEntity()
        {
            ValidateEntity();
            var handler = new EntityTemplateDynamicHandler(entityData);

            Dynamic.ForEachComponent(handler);
            var entity = handler.Entity;

            entity.Add(acl.Build());
            return(entity);
        }
        public void CreateEntity(long entityId, EntityTemplate template)
        {
            var handler = new EntityTemplateDynamicHandler(template, entityId, currentDiff);

            Dynamic.ForEachComponent(handler);
        }