Ejemplo n.º 1
0
        public void Update(DwarfTime gameTime, ChunkManager chunks, Camera camera)
        {
            if (RootComponent != null)
            {
                RootComponent.UpdateTransformsRecursive();
            }

            Factions.Update(gameTime);


            foreach (GameComponent component in Components.Values)
            {
                if (component.IsActive)
                {
                    component.Update(gameTime, chunks, camera);
                }

                if (component.IsDead)
                {
                    Removals.Add(component);
                    component.IsActive  = false;
                    component.IsDead    = true;
                    component.IsVisible = false;
                }
            }


            HandleAddRemoves();
        }
Ejemplo n.º 2
0
 public void RemoveComponent(GameComponent component)
 {
     RemovalMutex.WaitOne();
     Removals.Add(component);
     RemovalMutex.ReleaseMutex();
 }
Ejemplo n.º 3
0
 public void Remove(InstanceData data)
 {
     DataLock.WaitOne();
     Removals.Add(data);
     DataLock.ReleaseMutex();
 }