mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
Merge pull request #2123 from clark-stevenson/dev
Typescript definition updates.
This commit is contained in:
commit
53ed1c1219
1 changed files with 51 additions and 47 deletions
98
typescript/phaser.d.ts
vendored
98
typescript/phaser.d.ts
vendored
|
@ -57,7 +57,7 @@ declare module Phaser {
|
||||||
|
|
||||||
class Animation {
|
class Animation {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, parent: Phaser.Sprite, name: string, frameData: Phaser.FrameData, frames: number[]|string[], frameRate?: number, loop?: boolean);
|
constructor(game: Phaser.Game, parent: Phaser.Sprite, name: string, frameData: Phaser.FrameData, frames: number[] | string[], frameRate?: number, loop?: boolean);
|
||||||
|
|
||||||
currentFrame: Phaser.Frame;
|
currentFrame: Phaser.Frame;
|
||||||
delay: number;
|
delay: number;
|
||||||
|
@ -88,7 +88,7 @@ declare module Phaser {
|
||||||
play(frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
play(frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
||||||
previous(quantity?: number): void;
|
previous(quantity?: number): void;
|
||||||
restart(): void;
|
restart(): void;
|
||||||
setFrame(frameId?: string|number, useLocalFrameIndex?: boolean): void;
|
setFrame(frameId?: string | number, useLocalFrameIndex?: boolean): void;
|
||||||
stop(resetFrame?: boolean, dispatchComplete?: boolean): void;
|
stop(resetFrame?: boolean, dispatchComplete?: boolean): void;
|
||||||
update(): boolean;
|
update(): boolean;
|
||||||
updateCurrentFrame(signalUpdate: boolean, fromPlay?: boolean): boolean;
|
updateCurrentFrame(signalUpdate: boolean, fromPlay?: boolean): boolean;
|
||||||
|
@ -113,8 +113,8 @@ declare module Phaser {
|
||||||
sprite: Phaser.Sprite;
|
sprite: Phaser.Sprite;
|
||||||
updateIfVisible: boolean;
|
updateIfVisible: boolean;
|
||||||
|
|
||||||
add(name: string, frames?: number[]|string[], frameRate?: number, loop?: boolean, useNumericIndex?: boolean): Phaser.Animation;
|
add(name: string, frames?: number[] | string[], frameRate?: number, loop?: boolean, useNumericIndex?: boolean): Phaser.Animation;
|
||||||
copyFrameData(frameData: Phaser.FrameData, frame: string|number): boolean;
|
copyFrameData(frameData: Phaser.FrameData, frame: string | number): boolean;
|
||||||
destroy(): void;
|
destroy(): void;
|
||||||
getAnimation(name: string): Phaser.Animation;
|
getAnimation(name: string): Phaser.Animation;
|
||||||
next(quantity?: number): void;
|
next(quantity?: number): void;
|
||||||
|
@ -360,39 +360,39 @@ declare module Phaser {
|
||||||
|
|
||||||
class Button extends Phaser.Image {
|
class Button extends Phaser.Image {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, x?: number, y?: number, key?: string, callback?: Function, callbackContext?: any, overFrame?: string|number, outFrame?: string|number, downFrame?: string|number, upFrame?: string|number);
|
constructor(game: Phaser.Game, x?: number, y?: number, key?: string, callback?: Function, callbackContext?: any, overFrame?: string | number, outFrame?: string | number, downFrame?: string | number, upFrame?: string | number);
|
||||||
|
|
||||||
forceOut: boolean;
|
forceOut: boolean;
|
||||||
freezeFrames: boolean;
|
freezeFrames: boolean;
|
||||||
onDownSound: Phaser.Sound|Phaser.AudioSprite;
|
onDownSound: Phaser.Sound | Phaser.AudioSprite;
|
||||||
onDownSoundMarker: string;
|
onDownSoundMarker: string;
|
||||||
onInputDown: Phaser.Signal;
|
onInputDown: Phaser.Signal;
|
||||||
onInputOut: Phaser.Signal;
|
onInputOut: Phaser.Signal;
|
||||||
onInputOver: Phaser.Signal;
|
onInputOver: Phaser.Signal;
|
||||||
onInputUp: Phaser.Signal;
|
onInputUp: Phaser.Signal;
|
||||||
onOutSound: Phaser.Sound|Phaser.AudioSprite;
|
onOutSound: Phaser.Sound | Phaser.AudioSprite;
|
||||||
onOutSoundMarker: string;
|
onOutSoundMarker: string;
|
||||||
onOverSound: Phaser.Sound|Phaser.AudioSprite;
|
onOverSound: Phaser.Sound | Phaser.AudioSprite;
|
||||||
onOverSoundMarker: string;
|
onOverSoundMarker: string;
|
||||||
onOverMouseOnly: boolean;
|
onOverMouseOnly: boolean;
|
||||||
onUpSound: Phaser.Sound|Phaser.AudioSprite;
|
onUpSound: Phaser.Sound | Phaser.AudioSprite;
|
||||||
onUpSoundMaker: string;
|
onUpSoundMaker: string;
|
||||||
physicsType: number;
|
physicsType: number;
|
||||||
type: number;
|
type: number;
|
||||||
|
|
||||||
clearFrames(): void;
|
clearFrames(): void;
|
||||||
setDownSound(sound: Phaser.Sound|Phaser.AudioSprite, marker?: string): void;
|
setDownSound(sound: Phaser.Sound | Phaser.AudioSprite, marker?: string): void;
|
||||||
setFrames(overFrame?: string|number, outFrame?: string|number, downFrame?: string|number, upFrame?: string|number): void;
|
setFrames(overFrame?: string | number, outFrame?: string | number, downFrame?: string | number, upFrame?: string | number): void;
|
||||||
onInputOverHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void;
|
onInputOverHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void;
|
||||||
onInputOutHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void;
|
onInputOutHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void;
|
||||||
onInputDownHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void;
|
onInputDownHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void;
|
||||||
onInputUpHandler(sprite: Phaser.Button, pointer: Phaser.Pointer, isOver: boolean): void;
|
onInputUpHandler(sprite: Phaser.Button, pointer: Phaser.Pointer, isOver: boolean): void;
|
||||||
removedFromWorld(): void;
|
removedFromWorld(): void;
|
||||||
setOutSound(sound: Phaser.Sound|Phaser.AudioSprite, marker?: string): void;
|
setOutSound(sound: Phaser.Sound | Phaser.AudioSprite, marker?: string): void;
|
||||||
setOverSound(sound: Phaser.Sound|Phaser.AudioSprite, marker?: string): void;
|
setOverSound(sound: Phaser.Sound | Phaser.AudioSprite, marker?: string): void;
|
||||||
setSounds(overSound?: Phaser.Sound|Phaser.AudioSprite, overMarker?: string, downSound?: Phaser.Sound|Phaser.AudioSprite, downMarker?: string, outSound?: Phaser.Sound|Phaser.AudioSprite, outMarker?: string, upSound?: Phaser.Sound|Phaser.AudioSprite, upMarker?: string): void;
|
setSounds(overSound?: Phaser.Sound | Phaser.AudioSprite, overMarker?: string, downSound?: Phaser.Sound | Phaser.AudioSprite, downMarker?: string, outSound?: Phaser.Sound | Phaser.AudioSprite, outMarker?: string, upSound?: Phaser.Sound | Phaser.AudioSprite, upMarker?: string): void;
|
||||||
setState(newState: number): void;
|
setState(newState: number): void;
|
||||||
setUpSound(sound: Phaser.Sound|Phaser.AudioSprite, marker?: string): void;
|
setUpSound(sound: Phaser.Sound | Phaser.AudioSprite, marker?: string): void;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1288,7 +1288,7 @@ declare module Phaser {
|
||||||
|
|
||||||
class Game {
|
class Game {
|
||||||
|
|
||||||
constructor(width?: number|string, height?: number|string, renderer?: number, parent?: any, state?: any, transparent?: boolean, antialias?: boolean, physicsConfig?: any);
|
constructor(width?: number | string, height?: number | string, renderer?: number, parent?: any, state?: any, transparent?: boolean, antialias?: boolean, physicsConfig?: any);
|
||||||
constructor(config: IGameConfig);
|
constructor(config: IGameConfig);
|
||||||
|
|
||||||
add: Phaser.GameObjectFactory;
|
add: Phaser.GameObjectFactory;
|
||||||
|
@ -1579,7 +1579,7 @@ declare module Phaser {
|
||||||
|
|
||||||
destroy(destroyChildren?: boolean): void;
|
destroy(destroyChildren?: boolean): void;
|
||||||
drawTriangle(points: Phaser.Point[], cull?: boolean): void;
|
drawTriangle(points: Phaser.Point[], cull?: boolean): void;
|
||||||
drawTriangles(vertices: Phaser.Point[]| number[], indices?: number[], cull?: boolean): void;
|
drawTriangles(vertices: Phaser.Point[] | number[], indices?: number[], cull?: boolean): void;
|
||||||
kill(): Phaser.Graphics;
|
kill(): Phaser.Graphics;
|
||||||
postUpdate(): void;
|
postUpdate(): void;
|
||||||
preUpdate(): void;
|
preUpdate(): void;
|
||||||
|
@ -1693,7 +1693,7 @@ declare module Phaser {
|
||||||
|
|
||||||
class Image extends PIXI.Sprite {
|
class Image extends PIXI.Sprite {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, x: number, y: number, key: string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture, frame?: string|number);
|
constructor(game: Phaser.Game, x: number, y: number, key: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture, frame?: string | number);
|
||||||
|
|
||||||
alive: boolean;
|
alive: boolean;
|
||||||
angle: number;
|
angle: number;
|
||||||
|
@ -1713,7 +1713,7 @@ declare module Phaser {
|
||||||
events: Phaser.Events;
|
events: Phaser.Events;
|
||||||
exists: boolean;
|
exists: boolean;
|
||||||
fixedToCamera: boolean;
|
fixedToCamera: boolean;
|
||||||
frame: string|number;
|
frame: string | number;
|
||||||
frameName: string;
|
frameName: string;
|
||||||
fresh: boolean;
|
fresh: boolean;
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
|
@ -2183,7 +2183,7 @@ declare module Phaser {
|
||||||
|
|
||||||
baseURL: string;
|
baseURL: string;
|
||||||
cache: Phaser.Cache;
|
cache: Phaser.Cache;
|
||||||
crossOrigin: boolean|string;
|
crossOrigin: boolean | string;
|
||||||
enableParallel: boolean;
|
enableParallel: boolean;
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
hasLoaded: boolean;
|
hasLoaded: boolean;
|
||||||
|
@ -2209,8 +2209,8 @@ declare module Phaser {
|
||||||
atlasJSONArray(key: string, textureURL?: string, atlasURL?: string, atlasData?: any): Phaser.Loader;
|
atlasJSONArray(key: string, textureURL?: string, atlasURL?: string, atlasData?: any): Phaser.Loader;
|
||||||
atlasJSONHash(key: string, textureURL?: string, atlasURL?: string, atlasData?: any): Phaser.Loader;
|
atlasJSONHash(key: string, textureURL?: string, atlasURL?: string, atlasData?: any): Phaser.Loader;
|
||||||
atlasXML(key: string, textureURL?: string, atlasURL?: string, atlasData?: any): Phaser.Loader;
|
atlasXML(key: string, textureURL?: string, atlasURL?: string, atlasData?: any): Phaser.Loader;
|
||||||
audio(key: string, urls: string|string[]|any, autoDecode?: boolean): Phaser.Loader;
|
audio(key: string, urls: string | string[] | any, autoDecode?: boolean): Phaser.Loader;
|
||||||
audiosprite(key: string, urls: string[], jsonURL?: string, jsonData?: string|any, autoDecode?: boolean): Phaser.Loader;
|
audiosprite(key: string, urls: string[], jsonURL?: string, jsonData?: string | any, autoDecode?: boolean): Phaser.Loader;
|
||||||
binary(key: string, url?: string, callback?: Function, callbackContext?: any): Phaser.Loader;
|
binary(key: string, url?: string, callback?: Function, callbackContext?: any): Phaser.Loader;
|
||||||
bitmapFont(key: string, textureURL?: string, atlasURL?: string, atlasData?: any, xSpacing?: number, ySpacing?: number): Phaser.Loader;
|
bitmapFont(key: string, textureURL?: string, atlasURL?: string, atlasData?: any, xSpacing?: number, ySpacing?: number): Phaser.Loader;
|
||||||
checkKeyExists(type: string, key: string): boolean;
|
checkKeyExists(type: string, key: string): boolean;
|
||||||
|
@ -2240,7 +2240,7 @@ declare module Phaser {
|
||||||
resize(): void;
|
resize(): void;
|
||||||
script(key: string, url?: String, callback?: Function, callbackContext?: any): Phaser.Loader;
|
script(key: string, url?: String, callback?: Function, callbackContext?: any): Phaser.Loader;
|
||||||
shader(key: string, url?: String, overwrite?: boolean): Phaser.Loader;
|
shader(key: string, url?: String, overwrite?: boolean): Phaser.Loader;
|
||||||
setPreloadSprite(sprite: Phaser.Sprite|Phaser.Image, direction?: number): void;
|
setPreloadSprite(sprite: Phaser.Sprite | Phaser.Image, direction?: number): void;
|
||||||
spritesheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): Phaser.Loader;
|
spritesheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): Phaser.Loader;
|
||||||
start(): void;
|
start(): void;
|
||||||
text(key: string, url?: string, overwrite?: boolean): Phaser.Loader;
|
text(key: string, url?: string, overwrite?: boolean): Phaser.Loader;
|
||||||
|
@ -2251,7 +2251,7 @@ declare module Phaser {
|
||||||
totalQueuedPacks(): number;
|
totalQueuedPacks(): number;
|
||||||
transformUrl(url: string, file?: any): string;
|
transformUrl(url: string, file?: any): string;
|
||||||
updateProgress(): void;
|
updateProgress(): void;
|
||||||
video(key: string, urls: string | string[]| any, loadEvent?: string, asBlob?: boolean): Phaser.Loader;
|
video(key: string, urls: string | string[] | any, loadEvent?: string, asBlob?: boolean): Phaser.Loader;
|
||||||
withSyncPoint(callback: Function, callbackContext?: any): Phaser.Loader;
|
withSyncPoint(callback: Function, callbackContext?: any): Phaser.Loader;
|
||||||
xml(key: string, url?: string, overwrite?: boolean): Phaser.Loader;
|
xml(key: string, url?: string, overwrite?: boolean): Phaser.Loader;
|
||||||
xhrLoad(file: any, url: string, type: string, onload: Function, onerror?: Function): void;
|
xhrLoad(file: any, url: string, type: string, onload: Function, onerror?: Function): void;
|
||||||
|
@ -2537,7 +2537,7 @@ declare module Phaser {
|
||||||
y: number;
|
y: number;
|
||||||
|
|
||||||
at(object: any): void;
|
at(object: any): void;
|
||||||
emitParticle(x?: number, y?: number, key?: string|Phaser.RenderTexture|Phaser.BitmapData|Phaser.Video|PIXI.Texture, frame?: string | number): boolean;
|
emitParticle(x?: number, y?: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number): boolean;
|
||||||
explode(lifespan?: number, quantity?: number): void;
|
explode(lifespan?: number, quantity?: number): void;
|
||||||
flow(lifespan?: number, frequency?: number, quantity?: number, total?: number, immediate?: boolean): void;
|
flow(lifespan?: number, frequency?: number, quantity?: number, total?: number, immediate?: boolean): void;
|
||||||
kill(): void;
|
kill(): void;
|
||||||
|
@ -2635,7 +2635,7 @@ declare module Phaser {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, key?: string, url?: string);
|
constructor(game: Phaser.Game, key?: string, url?: string);
|
||||||
|
|
||||||
add(object: Phaser.Sprite | Phaser.Sprite[]| Phaser.Image | Phaser.Image[]): Phaser.Video;
|
add(object: Phaser.Sprite | Phaser.Sprite[] | Phaser.Image | Phaser.Image[]): Phaser.Video;
|
||||||
addToWorld(x?: number, y?: number, anchorX?: number, anchorY?: Number, scaleX?: number, scaleY?: number): Phaser.Image;
|
addToWorld(x?: number, y?: number, anchorX?: number, anchorY?: Number, scaleX?: number, scaleY?: number): Phaser.Image;
|
||||||
createVideoFromBlob(blob: Blob): Phaser.Video;
|
createVideoFromBlob(blob: Blob): Phaser.Video;
|
||||||
startMediaStream(captureAudio?: boolean, width?: number, height?: number): Phaser.Video;
|
startMediaStream(captureAudio?: boolean, width?: number, height?: number): Phaser.Video;
|
||||||
|
@ -3575,6 +3575,10 @@ declare module Phaser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface PluginConstructorOf<T> {
|
||||||
|
new (...parameters: any[]): T;
|
||||||
|
}
|
||||||
|
|
||||||
class PluginManager implements IStateCycle {
|
class PluginManager implements IStateCycle {
|
||||||
|
|
||||||
constructor(game: Phaser.Game);
|
constructor(game: Phaser.Game);
|
||||||
|
@ -3582,7 +3586,7 @@ declare module Phaser {
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
plugins: Phaser.Plugin[];
|
plugins: Phaser.Plugin[];
|
||||||
|
|
||||||
add(plugin: Phaser.Plugin | typeof Phaser.Plugin, ...parameter: any[]): Phaser.Plugin;
|
add<T extends Phaser.Plugin>(plugin: PluginConstructorOf<T>, ...parameters: any[]): T;
|
||||||
destroy(): void;
|
destroy(): void;
|
||||||
postRender(): void;
|
postRender(): void;
|
||||||
postUpdate(): void;
|
postUpdate(): void;
|
||||||
|
@ -3732,18 +3736,18 @@ declare module Phaser {
|
||||||
|
|
||||||
class Polygon {
|
class Polygon {
|
||||||
|
|
||||||
constructor(points: Phaser.Point[]|number[]);
|
constructor(points: Phaser.Point[] | number[]);
|
||||||
constructor(...points: Phaser.Point[]);
|
constructor(...points: Phaser.Point[]);
|
||||||
constructor(...points: number[]);
|
constructor(...points: number[]);
|
||||||
|
|
||||||
area: number;
|
area: number;
|
||||||
points: number[]|Phaser.Point[];
|
points: number[] | Phaser.Point[];
|
||||||
type: number;
|
type: number;
|
||||||
|
|
||||||
clone(output: Phaser.Polygon): Phaser.Polygon;
|
clone(output: Phaser.Polygon): Phaser.Polygon;
|
||||||
contains(x: number, y: number): boolean;
|
contains(x: number, y: number): boolean;
|
||||||
flatten(): Phaser.Polygon;
|
flatten(): Phaser.Polygon;
|
||||||
setTo(points: Phaser.Point[]|number[]): void;
|
setTo(points: Phaser.Point[] | number[]): void;
|
||||||
setTo(...points: Phaser.Point[]): void;
|
setTo(...points: Phaser.Point[]): void;
|
||||||
setTo(...points: number[]): void;
|
setTo(...points: number[]): void;
|
||||||
toNumberArray(output?: number[]): number[];
|
toNumberArray(output?: number[]): number[];
|
||||||
|
@ -3952,7 +3956,7 @@ declare module Phaser {
|
||||||
|
|
||||||
class Rope extends PIXI.Rope {
|
class Rope extends PIXI.Rope {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, x: number, y: number, key: string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture | Phaser.Video, frame?: string|number, points?: Phaser.Point[]);
|
constructor(game: Phaser.Game, x: number, y: number, key: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture | Phaser.Video, frame?: string | number, points?: Phaser.Point[]);
|
||||||
|
|
||||||
angle: number;
|
angle: number;
|
||||||
animations: Phaser.AnimationManager;
|
animations: Phaser.AnimationManager;
|
||||||
|
@ -3973,7 +3977,7 @@ declare module Phaser {
|
||||||
exists: boolean;
|
exists: boolean;
|
||||||
events: Phaser.Events;
|
events: Phaser.Events;
|
||||||
fixedToCamera: boolean;
|
fixedToCamera: boolean;
|
||||||
frame: string|number;
|
frame: string | number;
|
||||||
frameName: string;
|
frameName: string;
|
||||||
fresh: boolean;
|
fresh: boolean;
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
|
@ -3983,7 +3987,7 @@ declare module Phaser {
|
||||||
inWorld: boolean;
|
inWorld: boolean;
|
||||||
left: number;
|
left: number;
|
||||||
lifespan: number;
|
lifespan: number;
|
||||||
key: string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture|Phaser.Video;
|
key: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture | Phaser.Video;
|
||||||
name: string;
|
name: string;
|
||||||
offsetX: number;
|
offsetX: number;
|
||||||
offsetY: number;
|
offsetY: number;
|
||||||
|
@ -4217,7 +4221,7 @@ declare module Phaser {
|
||||||
remove(sound: Phaser.Sound): boolean;
|
remove(sound: Phaser.Sound): boolean;
|
||||||
removeByKey(key: string): number;
|
removeByKey(key: string): number;
|
||||||
resumeAll(): void;
|
resumeAll(): void;
|
||||||
setDecodedCallback(files: string[]|Phaser.Sound[], callback: Function, callbackContext: any): void;
|
setDecodedCallback(files: string[] | Phaser.Sound[], callback: Function, callbackContext: any): void;
|
||||||
setTouchLock(): void;
|
setTouchLock(): void;
|
||||||
stopAll(): void;
|
stopAll(): void;
|
||||||
unlock(): boolean;
|
unlock(): boolean;
|
||||||
|
@ -4227,7 +4231,7 @@ declare module Phaser {
|
||||||
|
|
||||||
class Sprite extends PIXI.Sprite {
|
class Sprite extends PIXI.Sprite {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, x: number, y: number, key?: string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture, frame?: string|number);
|
constructor(game: Phaser.Game, x: number, y: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture, frame?: string | number);
|
||||||
|
|
||||||
alive: boolean;
|
alive: boolean;
|
||||||
anchor: Phaser.Point;
|
anchor: Phaser.Point;
|
||||||
|
@ -4249,7 +4253,7 @@ declare module Phaser {
|
||||||
events: Phaser.Events;
|
events: Phaser.Events;
|
||||||
exists: boolean;
|
exists: boolean;
|
||||||
fixedToCamera: boolean;
|
fixedToCamera: boolean;
|
||||||
frame: string|number;
|
frame: string | number;
|
||||||
frameName: string;
|
frameName: string;
|
||||||
fresh: boolean;
|
fresh: boolean;
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
|
@ -4296,7 +4300,7 @@ declare module Phaser {
|
||||||
drawPolygon(): void;
|
drawPolygon(): void;
|
||||||
heal(amount: number): Phaser.Sprite;
|
heal(amount: number): Phaser.Sprite;
|
||||||
kill(): Phaser.Sprite;
|
kill(): Phaser.Sprite;
|
||||||
loadTexture(key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string|number, stopAnimation?: boolean): void;
|
loadTexture(key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number, stopAnimation?: boolean): void;
|
||||||
moveUp(): Phaser.Sprite;
|
moveUp(): Phaser.Sprite;
|
||||||
moveDown(): Phaser.Sprite;
|
moveDown(): Phaser.Sprite;
|
||||||
overlap(displayObject: Phaser.Sprite | Phaser.Image | Phaser.TileSprite | Phaser.Button | PIXI.DisplayObject): boolean;
|
overlap(displayObject: Phaser.Sprite | Phaser.Image | Phaser.TileSprite | Phaser.Button | PIXI.DisplayObject): boolean;
|
||||||
|
@ -4341,7 +4345,7 @@ declare module Phaser {
|
||||||
parseConfig(config: any): void;
|
parseConfig(config: any): void;
|
||||||
postUpdate(): void;
|
postUpdate(): void;
|
||||||
preUpdate(): void;
|
preUpdate(): void;
|
||||||
setBackgroundColor(backgroundColor: number|string): void;
|
setBackgroundColor(backgroundColor: number | string): void;
|
||||||
update(): void;
|
update(): void;
|
||||||
updateTransform(): void;
|
updateTransform(): void;
|
||||||
visibilityChange(event: Event): void;
|
visibilityChange(event: Event): void;
|
||||||
|
@ -4354,7 +4358,7 @@ declare module Phaser {
|
||||||
|
|
||||||
class ScaleManager {
|
class ScaleManager {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, width: number|string, height: number|string);
|
constructor(game: Phaser.Game, width: number | string, height: number | string);
|
||||||
|
|
||||||
static EXACT_FIT: number;
|
static EXACT_FIT: number;
|
||||||
static NO_SCALE: number;
|
static NO_SCALE: number;
|
||||||
|
@ -4563,7 +4567,7 @@ declare module Phaser {
|
||||||
fontSize?: number;
|
fontSize?: number;
|
||||||
fontStyle?: string;
|
fontStyle?: string;
|
||||||
fontVariant?: string;
|
fontVariant?: string;
|
||||||
fontWeight?: string|number;
|
fontWeight?: string | number;
|
||||||
backgroundColor?: string;
|
backgroundColor?: string;
|
||||||
boundsAlignH?: string;
|
boundsAlignH?: string;
|
||||||
boundsAlignV?: string;
|
boundsAlignV?: string;
|
||||||
|
@ -4594,12 +4598,12 @@ declare module Phaser {
|
||||||
fill: any;
|
fill: any;
|
||||||
fixedToCamera: boolean;
|
fixedToCamera: boolean;
|
||||||
font: string;
|
font: string;
|
||||||
fontSize: number|string;
|
fontSize: number | string;
|
||||||
fontStyle: string;
|
fontStyle: string;
|
||||||
fontStyles: string[];
|
fontStyles: string[];
|
||||||
fontVariant: string;
|
fontVariant: string;
|
||||||
fontWeight: string|number;
|
fontWeight: string | number;
|
||||||
fontWeights: (string|number)[];
|
fontWeights: (string | number)[];
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
input: Phaser.InputHandler;
|
input: Phaser.InputHandler;
|
||||||
inputEnabled: boolean;
|
inputEnabled: boolean;
|
||||||
|
@ -4624,7 +4628,7 @@ declare module Phaser {
|
||||||
strokeThickness: number;
|
strokeThickness: number;
|
||||||
scale: Phaser.Point;
|
scale: Phaser.Point;
|
||||||
tab: number;
|
tab: number;
|
||||||
tabs: number|number[];
|
tabs: number | number[];
|
||||||
text: string;
|
text: string;
|
||||||
textBounds: Phaser.Rectangle;
|
textBounds: Phaser.Rectangle;
|
||||||
type: number;
|
type: number;
|
||||||
|
@ -4765,7 +4769,7 @@ declare module Phaser {
|
||||||
getTileLeft(layer: number, x: number, y: number): Phaser.Tile;
|
getTileLeft(layer: number, x: number, y: number): Phaser.Tile;
|
||||||
getTileRight(layer: number, x: number, y: number): Phaser.Tile;
|
getTileRight(layer: number, x: number, y: number): Phaser.Tile;
|
||||||
getTilesetIndex(name: string): number;
|
getTilesetIndex(name: string): number;
|
||||||
getTileWorldXY(x: number, y: number, tileWidth?: number, tileHeight?: number, layer?: number|string|Phaser.TilemapLayer, nonNull?: boolean): Phaser.Tile;
|
getTileWorldXY(x: number, y: number, tileWidth?: number, tileHeight?: number, layer?: number | string | Phaser.TilemapLayer, nonNull?: boolean): Phaser.Tile;
|
||||||
hasTile(x: number, y: number, layer: Phaser.TilemapLayer): boolean;
|
hasTile(x: number, y: number, layer: Phaser.TilemapLayer): boolean;
|
||||||
paste(x: number, y: number, tileblock: Phaser.Tile[], layer?: any): void;
|
paste(x: number, y: number, tileblock: Phaser.Tile[], layer?: any): void;
|
||||||
putTile(tile: any, x: number, y: number, layer?: any): Phaser.Tile;
|
putTile(tile: any, x: number, y: number, layer?: any): Phaser.Tile;
|
||||||
|
@ -4874,7 +4878,7 @@ declare module Phaser {
|
||||||
|
|
||||||
class TileSprite extends PIXI.TilingSprite {
|
class TileSprite extends PIXI.TilingSprite {
|
||||||
|
|
||||||
constructor(game: Phaser.Game, x: number, y: number, width: number, height: number, key?: string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture, frame?: string|number);
|
constructor(game: Phaser.Game, x: number, y: number, width: number, height: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture, frame?: string | number);
|
||||||
|
|
||||||
alive: boolean;
|
alive: boolean;
|
||||||
angle: number;
|
angle: number;
|
||||||
|
@ -4891,7 +4895,7 @@ declare module Phaser {
|
||||||
events: Phaser.Events;
|
events: Phaser.Events;
|
||||||
exists: boolean;
|
exists: boolean;
|
||||||
fixedToCamera: boolean;
|
fixedToCamera: boolean;
|
||||||
frame: string|number;
|
frame: string | number;
|
||||||
frameName: string;
|
frameName: string;
|
||||||
fresh: boolean;
|
fresh: boolean;
|
||||||
game: Phaser.Game;
|
game: Phaser.Game;
|
||||||
|
|
Loading…
Reference in a new issue