this is translation to cocos2dx v-3.0 from cocos2dx v-2.0