added functions and fixed physics

Functions added:
InitObj: it only initialize objects
destroyObj: destroy objects when game ends