public bool AddComponent(EntityComponent component) { if(!HasComponentOfType(component.GetType())) { if(component.AllDependenciesLinked()) { component.entity = this; component.OnLink(); components.Add(component); return true; } Console.WriteLine("Error! Not all dependencies were linked in type {0}", component.GetType()); return false; } Console.WriteLine("Error! Already had component of type {0}", component.GetType()); return false; }