Skip to content

Commit 35102bc

Browse files
authored
Merge pull request phaserjs#2950 from murgo/patch-1
Fixed declarations of Phaser.Plugin.AStar in phaser.d.ts.
2 parents 4f58464 + a8b2d6e commit 35102bc

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

v2-community/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ If you code with [TypeScript](http://www.typescriptlang.org/) there are comprehe
332332
* Added tempPoint argument / undefined block to Graphics.containsPoint
333333
* Fixed Text.setCharacterLimit conditional check
334334
* Added resolution argument to LoaderParser.jsonBitmapFont
335+
* Fixed Phaser.Plugin.AStar TypeScript definitions to match plugin source
335336

336337
## Version 2.7.2 - 6th December 2016
337338

v2-community/typescript/phaser.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,8 +3663,8 @@ declare module Phaser {
36633663
class AStar extends Phaser.Plugin {
36643664

36653665
static VERSION: string;
3666-
static COST_ORTHAGONAL: number;
3667-
static COST_DIAGAONAL: number;
3666+
static COST_ORTHOGONAL: number;
3667+
static COST_DIAGONAL: number;
36683668
static DISTANCE_MANHATTEN: string;
36693669
static DISTANCE_EUCLIDIAN: string;
36703670

@@ -3698,9 +3698,9 @@ declare module Phaser {
36983698

36993699
class AStarPath {
37003700

3701-
constructor(nodes: Phaser.Plugin.AStar.AStarNode[], start: Phaser.Plugin.AStar.AStarNode, goal: Phaser.Plugin.AStar.AStarNode);
3701+
constructor(nodes?: {x: number, y: number}[], start?: Phaser.Plugin.AStar.AStarNode, goal?: Phaser.Plugin.AStar.AStarNode);
37023702

3703-
nodes: Phaser.Plugin.AStar.AStarNode[];
3703+
nodes: {x: number, y: number}[];
37043704
start: Phaser.Plugin.AStar.AStarNode;
37053705
goal: Phaser.Plugin.AStar.AStarNode;
37063706
visited: Phaser.Plugin.AStar.AStarNode[];

0 commit comments

Comments
 (0)