hexonaut / haxe-phaser

Haxe externs for Phaser.
MIT License
51 stars 9 forks source link

Wrong signature of audio function in Loader class. #10

Closed plicatibu closed 10 years ago

plicatibu commented 10 years ago

Parameter autoDecode is optional and defaults to true in Phaser but Haxe bindings doesn’t take this in consideration.

Loader.hx:

package phaser.loader;

@:native("Phaser.Loader")
extern class Loader {
@:overload(function (key:String, urls:Array<Dynamic>, autoDecode:Bool):phaser.loader.Loader {})
    function audio (key:String, urls:String, autoDecode:Bool):phaser.loader.Loader;
}

Loader.js:

audio: function (key, urls, autoDecode) {
        if (typeof autoDecode === "undefined") { autoDecode = true; }
        this.addToFileList('audio', key, urls, { buffer: null, autoDecode: autoDecode });

    return this;
},

Regards.