[pacman1][Cocos2D] Duplicated code