首页 > 代码库 > Cocos2d-js 3.0 alp2 使用指南
Cocos2d-js 3.0 alp2 使用指南
Download Cocos2d-JS: http://www.cocos2d-x.org/download
Unzip and copy to C:/
Download JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Install
Download SDK: http://developer.android.com/sdk/index.html
Install
Download NDK: http://developer.android.com/tools/sdk/ndk/index.html
Unzip and copy to C:/
Download Python 2 Release: https://www.python.org/downloads/windows/
Install
Download ANT .zip: https://ant.apache.org/bindownload.cgi
Unzip and copy to C:/
File Explorer>Right click "This PC">Properties>Advanced system settings>Environment Variables...>System Variables>New...
Example
Variable:Value
ANDROID_SDK_ROOT:C:\Program Files (x86)\Android\android-sdk
ANT_HOME:C:\apache-ant-1.9.3
JAVA_HOME:C:\Program Files\Java\jre8
NDK_ROOT:C:\android-ndk-r9d
"Edit..." the variable "Path"
Add ";C:\Cocos2d-JS-v3.0-alpha\tools\cocos2d-console\bin" to the end of the variable value of the variable "Path"
Double click on the file:
C:\Cocos2d-JS-v3.0-alpha\setup.py
open cmd.exe as administrator
type "cd C:\Cocos2d-JS-v3.0-alpha\tools\cocos2d-console\bin" and press enter
type "cocos.py new MyGame -p com.company.MyGame -l js -d c:/MyGame" and press enter
To test in Browser:
open cmd.exe as administrator
type "cd c:/MyGame/MyGame" and press enter
type "cocos.py run -p web
Thanks for the help, now I can start re-coding my project from version 2!
app.js 開始的文件
resource.js 预载入资源。