Skip to content

Commit c43f26c

Browse files
Minor Updates
1 parent cff4156 commit c43f26c

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

typescript/phaser.d.ts

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference path="pixi.d.ts" />
22

3-
// Type definitions for Phaser dev2.2.0 RC12 2014-11-26
3+
// Type definitions for Phaser dev2.2.0 RC12 2014-12-02
44
// Project: https://github.com/photonstorm/phaser
55

66
declare class Phaser {
@@ -825,6 +825,8 @@ declare module Phaser {
825825
onAnimationComplete: Phaser.Signal;
826826
onAnimationLoop: Phaser.Signal;
827827

828+
destroy(): void;
829+
828830
}
829831

830832
class Filter extends PIXI.AbstractFilter {
@@ -1035,10 +1037,10 @@ declare module Phaser {
10351037
ratioV: number;
10361038
multiplier: number;
10371039

1038-
createCustomLayer(width: number, height: number, children?: any[], addToWorld?: boolean): Phaser.FlexLayer;
1039-
createFluidLayer(children: any[]): Phaser.FlexLayer;
1040-
createFullLayer(children: any[]): Phaser.FlexLayer;
1041-
createFixedLayer(children: any[]): Phaser.FlexLayer;
1040+
createCustomLayer(width: number, height: number, children?: PIXI.DisplayObject[], addToWorld?: boolean): Phaser.FlexLayer;
1041+
createFluidLayer(children: PIXI.DisplayObject[]): Phaser.FlexLayer;
1042+
createFullLayer(children: PIXI.DisplayObject[]): Phaser.FlexLayer;
1043+
createFixedLayer(children: PIXI.DisplayObject[]): Phaser.FlexLayer;
10421044
debug(): void;
10431045
onResize(width: number, height: number): void;
10441046
refresh(): void;
@@ -1230,7 +1232,7 @@ declare module Phaser {
12301232
rope(x: number, y: number, key: any, frame?: any, points?: Phaser.Point[]): Phaser.Rope;
12311233
sound(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound;
12321234
sprite(x: number, y: number, key?: any, frame?: any): Phaser.Sprite;
1233-
spriteBatch(parent: any, name?: String, addToStage?: boolean): Phaser.Group;
1235+
spriteBatch(parent: any, name?: String, addToStage?: boolean): Phaser.SpriteBatch;
12341236
text(x: number, y: number, text?: string, style?: any): Phaser.Text;
12351237
tileMap(key: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): Phaser.Tilemap;
12361238
tileSprite(x: number, y: number, width: number, height: number, key: any, frame: any): Phaser.TileSprite;
@@ -1473,21 +1475,21 @@ declare module Phaser {
14731475
countLiving(): number;
14741476
create(x: number, y: number, key: string, frame?: any, exists?: boolean): any;
14751477
createMultiple(quantity: number, key: string, frame?: any, exists?: boolean): void;
1476-
customSort(sortHandler: Function, context: any): void;
1478+
customSort(sortHandler: Function, context?: any): void;
14771479
destroy(destroyChildren?: boolean, soft?: boolean): void;
14781480
divideAll(property: string, amount: number, checkAlive?: boolean, checkVisible?: boolean): void;
1479-
forEach(callback: Function, callbackContext: any, checkExists?: boolean): void;
1480-
forEachAlive(callback: Function, callbackContext: any): void;
1481-
forEachDead(callback: Function, callbackContext: any): void;
1481+
forEach(callback: Function, callbackContext: any, checkExists?: boolean, ...args: any[]): void;
1482+
forEachAlive(callback: Function, callbackContext: any, ...args: any[]): void;
1483+
forEachDead(callback: Function, callbackContext: any, ...args:any[]): void;
14821484
forEachExists(callback: Function, callbackContext: any): void;
14831485
filter(predicate: Function, checkExists?: boolean): ArraySet;
14841486
getAt(index: number): any;
14851487
getBottom(): any;
14861488
getFirstAlive(): any;
14871489
getFirstDead(): any;
1488-
getFirstExists(state: boolean): any;
1490+
getFirstExists(exists: boolean): any;
14891491
getIndex(child: any): number;
1490-
getRandom(startIndex: number, length: number): any;
1492+
getRandom(startIndex?: number, length?: number): any;
14911493
getTop(): any;
14921494
hasProperty(child: any, key: string[]): boolean;
14931495
iterate(key: string, value: any, returnType: number, callback?: Function, callbackContext?: any, ...args: any[]): any;
@@ -1502,12 +1504,13 @@ declare module Phaser {
15021504
removeAll(destroy?: boolean, silent?: boolean): void;
15031505
removeBetween(startIndex: number, endIndex?: number, destroy?: boolean, silent?: boolean): void;
15041506
replace(oldChild: any, newChild: any): any;
1507+
resetCursor(index?: number): any;
15051508
reverse(): void;
15061509
sendToBack(child: any): any;
15071510
set(child: any, key: string[], value: any, operation?: number, force?: boolean): boolean;
15081511
setAll(key: string, value: any, checkAlive?: boolean, checkVisible?: boolean, operation?: number, force?: boolean): boolean;
15091512
setProperty(child: any, key: string[], value: any, operation?: number, force?: boolean): boolean;
1510-
sort(index?: string, order?: number): void;
1513+
sort(key?: string, order?: number): void;
15111514
subAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): void;
15121515
swap(child1: any, child2: any): boolean;
15131516
update(): void;
@@ -3996,7 +3999,7 @@ declare module Phaser {
39963999
link(key: string): void;
39974000
loadComplete(): void;
39984001
pause(): void;
3999-
preRender(): void;
4002+
preRender(elapsedTime: number): void;
40004003
preUpdate(): void;
40014004
render(): void;
40024005
remove(key: string): void;

0 commit comments

Comments
 (0)