player.hx で:
public function new(X, Y, _upKey:String, _downKey:String){
super(X, Y);
makeGraphic(20, 20, FlxColor.RED);
immovable = true;
}
PlayState.hx で:
override public function create():Void
{
super.create();
add(new Enemy(300, FlxG.height - 20, 10, 20));
add(new Enemy(500, FlxG.height - 40, 10, 40));
add(player = new Player(60, FlxG.height - 40, "UP", "DOWN"));
}
Player.hx ファイルに "不明な識別子: upKey" と "不明な識別子: downKey" というエラーが返されますが、関数でそれらを設定した後でも同様です。これを修正するにはどうすればよいですか?