Added observer

The code is for Cocos2d-x 3.0