added in forgotten functionality

addComponent in GameObject.cpp