Base function for cocos-utils

Complete base function for cocos-utils