implemente method

implemente getNearestSprite in GameObject class