Adding useful function for generating ID for type

Adding useful methods for obtaining components
Code format
Merge branch 'master' of github.com:gelldur/cocos2dx-components