これを調査し、既製のテンプレートを使用しようとしましたが、役に立ちませんでした。Flash ゲームを作成することを念頭に置いて、FlashDevelop で動作する本当に基本的な HaxePunk プロジェクトを取得したいだけです。実際の基本的なチュートリアルなどに戻ると、これが私のコードです。
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(); }
}
これを Flash Player プロジェクトとしてコンパイルするか、NME プロジェクトとしてコンパイルするかはわかりません (これは初めてです)。Flash Player プロジェクトとしてコンパイルしようとすると、実行時に次のエラーが発生します。
TypeError: Error #2007: Parameter type must be non-null.
at flash.events::EventDispatcher/addEventListener()
at flash.display::Stage/addEventListener()
at com.haxepunk.utils::Input$/enable()
at com.haxepunk::Engine/onStage()
at com.haxepunk::Engine()
at Main()
at Main$/main()
at boot_0b9a/init()
at flash::Boot/start()
at boot_0b9a()
NME プロジェクトとしてコンパイルしようとすると、コンパイル時に次のエラーが発生します。
Error: You must have a "project.xml" file or specify another valid project file
when using the 'build' command
私はこれについて多くの情報を見つけていません。ここで何が間違っている可能性がありますか?ありがとう。