Forge/Integration/EntityContainer.cs
/// <summary>
/// Clears out the current containers and adds new containers for all of the entities inside
/// of the given snapshot.
/// </summary>
/// <param name="snapshot">The snapshot to create containers for.</param>
/// <param name="globalParent">The parent object for the global entity.</param>
/// <param name="addedParent">The parent object for added entities.</param>
/// <param name="activeParent">The parent object for active entities.</param>
/// <param name="removedParent">The parent object for removed entities.</param>
Clears out the current containers and adds new containers for all of the entities inside
of the given snapshot.
Clears out the current containers and adds new containers for all of the entities inside of the given snapshot .
public static void CreateContainers(IGameSnapshot snapshot, GameObject globalParent,
            GameObject addedParent, GameObject activeParent, GameObject removedParent) {
            EntityContainer.CreateEntityContainer(snapshot.GlobalEntity, globalParent);
            foreach (var entity in snapshot.AddedEntities) {
                EntityContainer.CreateEntityContainer(entity, addedParent);
            }
            foreach (var entity in snapshot.ActiveEntities) {
                EntityContainer.CreateEntityContainer(entity, activeParent);
            }
            foreach (var entity in snapshot.RemovedEntities) {
                EntityContainer.CreateEntityContainer(entity, removedParent);
            }
        }
public static void CreateContainers ( IGameSnapshot snapshot , GameObject globalParent , GameObject addedParent , GameObject activeParent , GameObject removedParent ) { EntityContainer . CreateEntityContainer ( snapshot . GlobalEntity , globalParent ) ; foreach ( var entity in snapshot . AddedEntities ) { EntityContainer . CreateEntityContainer ( entity , addedParent ) ; } foreach ( var entity in snapshot . ActiveEntities ) { EntityContainer . CreateEntityContainer ( entity , activeParent ) ; } foreach ( var entity in snapshot . RemovedEntities ) { EntityContainer . CreateEntityContainer ( entity , removedParent ) ; } }
Clears out the current containers and adds new containers for all of the entities inside
of the given snapshot.
Clears out the current containers and adds new containers for all of the entities inside of the given snapshot .
snapshot
IGameSnapshot
The snapshot to create containers for.
The snapshot to create containers for .
globalParent
GameObject
The parent object for the global entity.
The parent object for the global entity .
addedParent
GameObject
The parent object for added entities.
The parent object for added entities .
activeParent
GameObject
The parent object for active entities.
The parent object for active entities .
removedParent
GameObject
The parent object for removed entities.
The parent object for removed entities .