protected virtual IGameObjectComponent CreateItem(IGameObject gameObject, string name) { switch (name) { case nameof(PositionComponent): return(gameObject.AddPositionComponent()); case nameof(TextureComponent): return(gameObject.AddTextureComponent()); case nameof(AnimationComponent): return(gameObject.AddAnimationComponent()); case nameof(ScriptComponent): return(gameObject.AddScriptComponent()); default: throw new NotImplementedException(name); } }