Why would ou want anything to derive from sprite anyway? You should just make the update method a normal method. Also, when something "does not compile" It's handy to post the error message, and prefereably the line number, local to the top of the code snippet