我一直在尝试按照this教程来开始使用HaxePunk。我正在使用FlashDevelop,并在添加logo.png后尝试运行该程序。但是,当我运行该程序时,我得到以下输出:
Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "D:\Haxe Projects\Prj_Starting\Prj_Starting.hxproj" -ipc f201d2c5-2ffe-46d4-bb54-c67a3e34ab4a -version "3.2.1" -compiler "C:\Program Files\HaxeToolkit\haxe" -library "C:\Program Files (x86)\FlashDevelop\Library" -target "neko"
Building Prj_Starting
Running Pre-Build Command Line...
cmd: "C:\Program Files\HaxeToolkit\haxe/haxelib" run lime build "project.xml" neko -debug -Dfdb
[file_contents,C:\Program Files\HaxeToolkit\haxe\lib\lime//.current]
Build halted with errors.
Done(1)没有给出特定于错误的错误,所以我不确定哪里出了问题。我完全遵循了教程,下面是我的类:
Main.hx
import com.haxepunk.Engine;
import com.haxepunk.HXP;
class Main extends Engine
{
override public function init()
{
#if debug
HXP.console.enable();
#end
HXP.scene = new MainScene();
}
public static function main() { new Main(); }
}MainScene.hx
import com.haxepunk.Scene;
class MainScene extends Scene
{
public override function begin()
{
add(new Logo());
}
}Logo.hx
package src;
import com.haxepunk.Entity;
import com.haxepunk.graphics.Image;
import com.haxepunk.utils.Input;
import com.haxepunk.utils.Key;
/**
* Logo entity.
* @author Abigail Smith
*/
class Logo extends Entity
{
private var speed:Int;
public function new()
{
super(270, 190);
speed = 5;
graphic = new Image("graphics/logo.png");
}
public override function update():Void {
if (Input.check(Key.RIGHT)) {
moveBy(speed, 0);
}
if (Input.check(Key.LEFT)) {
moveBy(-speed, 0);
}
if (Input.check(Key.DOWN)) {
moveBy(0, speed);
}
if (Input.check(Key.UP)) {
moveBy(0, -speed);
}
}
}任何帮助解决这个错误的人都将不胜感激。谢谢您:)
发布于 2016-08-04 16:13:24
看起来你有一个你需要的叫做"lime“的库有问题。
[file_contents,C:\Program Files\HaxeToolkit\haxe\lib\lime//.current]来安装它
希望这能解决你的问题!
https://stackoverflow.com/questions/35060380
复制相似问题