예제 #1
0
 /// <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;
         }
     }
 }
예제 #2
0
        /// <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);
        }
예제 #3
0
 /// <summary>
 /// removes the EntityInspector
 /// </summary>
 /// <param name="entityInspector"></param>
 public void StopInspectingEntity(EntityInspector entityInspector)
 {
     _entityInspectors.RemoveAt(_entityInspectors.IndexOf(entityInspector));
 }