erest0r Posted July 15, 2016 Share Posted July 15, 2016 Hello again i don´t know if it's just me, the API docs for weapon.fire() says that all their parameter are optional, but it is requiring me first parameter when coding in Typescript. Here is a screenshot Link to comment Share on other sites More sharing options...
wizak Posted July 15, 2016 Share Posted July 15, 2016 I am having the same problem. But only when I include it in the class, not when defined as var weapon and then weapon = this.game.add.weapon(50, "bullet"). Link to comment Share on other sites More sharing options...
Tom Atom Posted July 16, 2016 Share Posted July 16, 2016 Hi, from time to time you can find small problem like this in typescript definitions in phaser.d.ts. In this case you can change it from: fire(from: any, x?: number, y?: number): boolean; to fire(from?: any, x?: number, y?: number): boolean; and parameter becames optional. You can report it on GitHub, so it gets corrected in next Phaser versions. erest0r 1 Link to comment Share on other sites More sharing options...
erest0r Posted July 17, 2016 Author Share Posted July 17, 2016 Already fixed in Phaser 'dev' branch and i did what yo suggested in the phaser.d.ts file. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts