cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.07k stars 902 forks source link

API compatibility: replace cc.RANDOM_0_1() with Math.random() #565

Closed ricardoquesada closed 11 years ago

ricardoquesada commented 12 years ago

I noticed that cocos2d-html5 uses some macros from cocos2d-iphone / cocos2d-x.

It is very important, whenever possible, to use JS friendly API.

I propose to replace cc.RANDOM_0_1() with the built-in JS API: Math.random()

linshun commented 12 years ago

I think so. I will check the code, thank you.

linshun commented 11 years ago

It has been fixed.