1. A label is declared in the attribute, and the type is specified as CC. Label, not CC. Node.
For example:
scoredisplay: { defaultnull, type:cc. Label},
2. Attribute Alto declaration, do not need to specify the type, only need to indicate URL,URL:CC. AudioClip.
For example:
Scoreaudio: { defaultnull, url:cc. AudioClip },
3. Play the Sound:
Cc.audioEngine.playEffect (thisfalse);
4. Staging a reference to an object
// staging a reference to a script Gamemanager object properties: { Gamemanager: { defaultnull, false }}
You can get the position of the player property in Gamemanager by This.gameManager.player.getPosition ().
5. Calculate the distance of two points: Cc.pdistance ()
6. Destroy a node: This.node.destory ();
7. Delayed loading of scene resources: If the option is turned on, all the maps, particles, and sounds that the scene relies on directly or indirectly will be delayed until the scene switches to load, making the scene switch greatly faster. After entering the scene, the player may see some resources appear, and when activating the new interface, the elements of the interface may be displayed, so this loading method is more suitable for web games.
8.Cocos Creator can be used in image format, currently includes JPG and PNG two kinds.
The problems needing attention in Unityscript