internal void SetActualDepth(Entity entity) { const double theta = .000001f; double add = 0; if (actualDepthLookup.TryGetValue(entity.depth, out add)) { actualDepthLookup[entity.depth] += theta; } else { actualDepthLookup.Add(entity.depth, theta); } entity.actualDepth = entity.depth - add; //Mark lists unsorted Entities.MarkUnsorted(); for (int i = 0; i < BitTag.TotalTags; i++) { if (entity.TagCheck(1 << i)) { TagLists.MarkUnsorted(i); } } }
public virtual void BeforeUpdate() { if (!Paused) { TimeActive += Engine.DeltaTime; } RawTimeActive += Engine.RawDeltaTime; Entities.UpdateLists(); TagLists.UpdateLists(); RendererList.UpdateLists(); }
public Scene() { Tracker = new Tracker(); Entities = new EntityList(this); TagLists = new TagLists(); RendererList = new RendererList(this); actualDepthLookup = new Dictionary <int, double>(); HelperEntity = new Entity(); Entities.Add(HelperEntity); }