Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion template/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<target name="compile">
<jscomp compilationLevel="simple" warning="quiet"
debug="false" output="lib/cocos2d-html5-beta-min.js">
debug="false" output="myApp-v0.1.js">
<sources dir="${basedir}/../cocos2d">
<file name="platform/CCClass.js"/>
<file name="platform/CCCommon.js"/>
Expand Down Expand Up @@ -52,6 +52,11 @@
<sources dir="${basedir}/../CocosDenshion">
<file name="SimpleAudioEngine.js"/>
</sources>
<sources dir="${basedir}">
<file name="src/resource.js"/>
<file name="src/myApp.js"/>
<file name="main.js"/>
</sources>
</jscomp>
</target>
</project>
1 change: 1 addition & 0 deletions template/cocos2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
tag:'gameCanvas', //the dom element to run cocos2d on
engineDir:'../cocos2d/',
appFiles:[
'src/resource.js',
'src/myApp.js'//add your own files in order here
]
};
Expand Down
6 changes: 1 addition & 5 deletions template/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ var cocos2dApp = cc.Application.extend({
cc.Loader.shareLoader().onload = function () {
cc.AppController.shareAppController().didFinishLaunchingWithOptions();
};
cc.Loader.shareLoader().preload([
{type:"image", src:"res/HelloWorld.png"},
{type:"image", src:"res/CloseNormal.png"},
{type:"image", src:"res/CloseSelected.png"}
]);
cc.Loader.shareLoader().preload(g_ressources);
},
applicationDidFinishLaunching:function () {
// initialize director
Expand Down
Binary file removed template/res/cocos64.png
Binary file not shown.
Binary file removed template/res/grossini_dance_07.png
Binary file not shown.
Binary file removed template/res/logo.png
Binary file not shown.
20 changes: 20 additions & 0 deletions template/src/resource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var s_HelloWorld = "res/HelloWorld.png";
var s_CloseNormal = "res/CloseNormal.png";
var s_CloseSelected = "res/CloseSelected.png";

var g_ressources = [
//image
{type:"image", src:s_HelloWorld},
{type:"image", src:s_CloseNormal},
{type:"image", src:s_CloseSelected}

//plist

//fnt

//tmx

//bgm

//effect
];