clone function for sprites.