以前的NMML依然可用,但官方不保证以后继续支持。
新的工程文件实际上就是一个标准的haXe源文件,它会被编译成neko字节码然后运行。
这有个新工程的例程(原文http://pastie.org/5621885):
class Project extends NMEProject {
public function new () {
super ();
meta.title = "Kitten Quest";
meta.packageName = "com.joshuagranick.kittenquest";
meta.version = "1.0.0";
meta.company = "Joshua Granick";
app.main = "com.joshuagranick.kittenquest.KittenQuest";
app.file = "KittenQuest";
app.path = "Export";
if (platformType == PlatformType.MOBILE) {
window.width = 800;
window.height = 480;
}
sources.push ("Source");
haxelibs.push ("nme");
haxelibs.push ("keybinding");
icons.push (new Icon ("Assets/nme.svg"));
includeAssets ("Assets", "assets", null, [ "*.psd", "nme.svg" ]);
if (target == Platform.HTML5) {
haxeflags.push ("--dead-code-elimination");
haxeflags.push ("--js-modern");
}
}
}
本文介绍了一个使用haXe编写的Neko新工程文件示例,该示例展示了如何配置项目基本信息、平台适配参数及资源路径等。
1414

被折叠的 条评论
为什么被折叠?



