/// <summary> /// Make component enabled and visible if possible /// </summary> /// <param name="gc"></param> protected void AddComponent(GameComponent gc) { if (gc == null) { return; } //Should only be called "once", but doesn't hurt to check the collection state before each modification CleanUpComponents(); //Add a component only if not already added if (GameComponents.Contains(gc) == false) { GameComponents.Add(gc); } }