コード例 #1
0
        public void CreateEntity(long entityId, EntityTemplate template)
        {
            var handler = new EntityTemplateDynamicHandler(template, entityId, currentDiff);

            Dynamic.ForEachComponent(handler);
        }
コード例 #2
0
 public RemoveEntityTemplateDynamicHandler(EntityTemplate template, long entityId, ViewDiff viewDiff)
 {
     this.template = template;
     this.entityId = entityId;
     this.viewDiff = viewDiff;
 }
コード例 #3
0
ファイル: Snapshot.cs プロジェクト: ernopp/gdk-for-unity
 /// <summary>
 ///     Adds an entity to the snapshot
 /// </summary>
 /// <remarks>
 ///    The entity ID is automatically assigned.
 /// </remarks>
 /// <param name="entityTemplate">The entity to be added to the snapshot.</param>
 public void AddEntity(EntityTemplate entityTemplate)
 {
     entities[new EntityId(entities.Count + 1)] = entityTemplate.GetEntity();
 }
コード例 #4
0
ファイル: Snapshot.cs プロジェクト: xeronith/gdk-for-unity
 /// <summary>
 ///     Adds an entity to the snapshot
 /// </summary>
 /// <param name="entityId">The entity ID of the entity to be added to the snapshot</param>
 /// <param name="entityTemplate">The entity to be added to the snapshot.</param>
 /// <remarks>
 ///    You should obtain `entityId` using the `GetNextEntityId()` method, otherwise you could be given
 ///    invalid entity IDs.
 /// </remarks>
 public void AddEntity(EntityId entityId, EntityTemplate entityTemplate)
 {
     entities[entityId] = entityTemplate.GetEntity();
 }