public void UnmarkViewedBy(ObservingEntity e)
        {
            long id = e.EntityId;

            if (id == EntityId)
            {
                Log.Warning("Tried to unview itself " + id, "UnmarkViewedBy");
                return;
            }

            if (!EntitiesViewedBy.ContainsKey(id))
            {
                Log.Error("Not stored " + id, "UnmarkViewedBy");
                return;
            }

            Log.Trace("No longer viewed by " + id, "UnmarkViewedBy");
            EntitiesViewedBy.Remove(id);
            UpdateIsObservedNextUpdate = true;
        }
        public void MarkViewedBy(ObservingEntity e)
        {
            long id = e.EntityId;

            if (id == EntityId)
            {
                Log.Warning("Tried to view itself " + id, "MarkViewedBy");
                return;
            }

            if (EntitiesViewedBy.ContainsKey(id))
            {
                Log.Error("Already added " + id, "MarkViewedBy");
                return;
            }

            Log.Trace("Viewed by " + id, "MarkViewedBy");
            EntitiesViewedBy.Add(id, e);
            UpdateIsObservedNextUpdate = true;
        }
 private void UpdateObservingGridPosition(ObservingEntity e)
 {
     ObservingTree.Move(e);
 }
        private void RememberObservingEntity(ObservingEntity e)
        {
            long id = e.EntityId;
            if (ObservingEntities.ContainsKey(id)) {
                Log.Error("Already added " + id, "RememberObservingEntity");
                return;
            }

            Log.Trace("Adding " + id, "RememberObservingEntity");
            ObservingEntities.Add(id, e);
            ObservingTree.Add(e);
            Log.Trace("Finished Adding " + id, "RememberObservingEntity");
        }
        private void ForgetObservingEntity(ObservingEntity e)
        {
            long id = e.EntityId;
            if (!ObservingEntities.ContainsKey(id)) {
                Log.Error("Not stored " + id, "ForgetObservingEntity");
                return;
            }

            Log.Trace("Removing " + id, "ForgetObservingEntity");
            ObservingEntities.Remove(id);
            ObservingTree.Remove(e);
        }
        public void UnmarkViewedBy(ObservingEntity e)
        {
            long id = e.EntityId;

            if (id == EntityId) {
                Log.Warning("Tried to unview itself " + id, "UnmarkViewedBy");
                return;
            }

            if (!EntitiesViewedBy.ContainsKey(id)) {
                Log.Error("Not stored " + id, "UnmarkViewedBy");
                return;
            }

            Log.Trace("No longer viewed by " + id, "UnmarkViewedBy");
            EntitiesViewedBy.Remove(id);
            UpdateIsObservedNextUpdate = true;
        }
        public void MarkViewedBy(ObservingEntity e)
        {
            long id = e.EntityId;

            if (id == EntityId) {
                Log.Warning("Tried to view itself " + id, "MarkViewedBy");
                return;
            }

            if (EntitiesViewedBy.ContainsKey(id)) {
                Log.Error("Already added " + id, "MarkViewedBy");
                return;
            }

            Log.Trace("Viewed by " + id, "MarkViewedBy");
            EntitiesViewedBy.Add(id, e);
            UpdateIsObservedNextUpdate = true;
        }