/// <summary> /// removes the EntityInspector for this Entity /// </summary> /// <param name="entity"></param> public void StopInspectingEntity(Entity entity) { for (int i = 0; i < _entityInspectors.Count; i++) { EntityInspector inspector = _entityInspectors[i]; if (inspector.Entity == entity) { _entityInspectors.RemoveAt(i); return; } } }
/// <summary> /// creates an EntityInspector window /// </summary> /// <param name="entity"></param> public void StartInspectingEntity(Entity entity) { // if we are already inspecting the Entity focus the window foreach (var inspector in _entityInspectors) { if (inspector.Entity == entity) { inspector.SetWindowFocus(); return; } } var entityInspector = new EntityInspector(entity); entityInspector.SetWindowFocus(); _entityInspectors.Add(entityInspector); }
/// <summary> /// removes the EntityInspector /// </summary> /// <param name="entityInspector"></param> public void StopInspectingEntity(EntityInspector entityInspector) { _entityInspectors.RemoveAt(_entityInspectors.IndexOf(entityInspector)); }