2014-11-05 18:19:45 +00:00
|
|
|
/// <reference path="pixi.d.ts" />
|
2015-03-18 18:44:11 +00:00
|
|
|
/// <reference path="p2.d.ts" />
|
2014-03-03 23:46:24 +00:00
|
|
|
|
2016-04-06 01:09:22 +00:00
|
|
|
// Type definitions for Phaser 2.4.7 - 6th April 2016
|
2014-10-20 09:52:49 +00:00
|
|
|
// Project: https://github.com/photonstorm/phaser
|
2016-02-01 16:32:51 +00:00
|
|
|
|
2015-12-15 14:15:32 +00:00
|
|
|
declare module "phaser" {
|
|
|
|
export = Phaser;
|
|
|
|
}
|
2014-11-05 18:19:45 +00:00
|
|
|
|
2013-10-25 03:24:35 +00:00
|
|
|
declare class Phaser {
|
2014-02-26 01:32:38 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
static VERSION: string;
|
|
|
|
static DEV_VERSION: string;
|
2014-02-26 01:32:38 +00:00
|
|
|
static GAMES: Phaser.Game[];
|
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
static AUTO: number;
|
|
|
|
static CANVAS: number;
|
|
|
|
static WEBGL: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
static HEADLESS: number;
|
|
|
|
|
2014-03-20 11:07:37 +00:00
|
|
|
static BITMAPDATA: number;
|
|
|
|
static BITMAPTEXT: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
static BUTTON: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
static CANVAS_FILTER: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
static CIRCLE: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
static ELLIPSE: number;
|
|
|
|
static EMITTER: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
static GRAPHICS: number;
|
|
|
|
static GROUP: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
static IMAGE: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
static LINE: number;
|
|
|
|
static MATRIX: number;
|
|
|
|
static POINT: number;
|
2014-05-14 14:54:40 +00:00
|
|
|
static POINTER: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
static POLYGON: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
static RECTANGLE: number;
|
|
|
|
static ROUNDEDRECTANGLE: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
static RENDERTEXTURE: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
static RETROFONT: number;
|
|
|
|
static SPRITE: number;
|
|
|
|
static SPRITEBATCH: number;
|
|
|
|
static TEXT: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
static TILEMAP: number;
|
|
|
|
static TILEMAPLAYER: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
static TILESPRITE: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
static WEBGL_FILTER: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
static ROPE: number;
|
2015-05-09 01:55:12 +00:00
|
|
|
static CREATURE: number;
|
|
|
|
static VIDEO: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
|
|
|
|
static NONE: number;
|
|
|
|
static LEFT: number;
|
|
|
|
static RIGHT: number;
|
|
|
|
static UP: number;
|
|
|
|
static DOWN: number;
|
|
|
|
|
2013-10-25 03:24:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
declare module Phaser {
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Animation {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
constructor(game: Phaser.Game, parent: Phaser.Sprite, name: string, frameData: Phaser.FrameData, frames: number[] | string[], frameRate?: number, loop?: boolean);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
currentFrame: Phaser.Frame;
|
|
|
|
delay: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
enableUpdate: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
frame: number;
|
|
|
|
frameTotal: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
isFinished: boolean;
|
|
|
|
isPaused: boolean;
|
|
|
|
isPlaying: boolean;
|
|
|
|
killOnComplete: boolean;
|
2014-03-10 16:58:12 +00:00
|
|
|
loop: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
loopCount: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
name: string;
|
2014-03-20 11:07:37 +00:00
|
|
|
onComplete: Phaser.Signal;
|
|
|
|
onLoop: Phaser.Signal;
|
|
|
|
onStart: Phaser.Signal;
|
2014-09-10 23:02:23 +00:00
|
|
|
onUpdate: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
paused: boolean;
|
2014-03-10 16:58:12 +00:00
|
|
|
speed: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
complete(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
destroy(): void;
|
2014-04-10 03:31:27 +00:00
|
|
|
static generateFrameNames(prefix: string, start: number, stop: number, suffix?: string, zeroPad?: number): string[];
|
2014-07-03 15:23:36 +00:00
|
|
|
next(quantity?: number): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
onPause(): void;
|
|
|
|
onResume(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
play(frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
2014-07-03 15:23:36 +00:00
|
|
|
previous(quantity?: number): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
restart(): void;
|
2015-10-06 14:30:54 +00:00
|
|
|
setFrame(frameId?: string | number, useLocalFrameIndex?: boolean): void;
|
2014-04-26 00:34:19 +00:00
|
|
|
stop(resetFrame?: boolean, dispatchComplete?: boolean): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(): boolean;
|
2015-05-25 16:08:07 +00:00
|
|
|
updateCurrentFrame(signalUpdate: boolean, fromPlay?: boolean): boolean;
|
2014-07-18 12:31:20 +00:00
|
|
|
updateFrameData(frameData: FrameData): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
2013-10-25 03:24:35 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class AnimationManager {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(sprite: Phaser.Sprite);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-07-08 12:01:43 +00:00
|
|
|
currentAnim: Phaser.Animation;
|
2014-02-26 01:32:38 +00:00
|
|
|
currentFrame: Phaser.Frame;
|
|
|
|
frame: number;
|
|
|
|
frameData: Phaser.FrameData;
|
|
|
|
frameName: string;
|
|
|
|
frameTotal: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
isLoaded: boolean;
|
2014-10-09 13:06:13 +00:00
|
|
|
name: string;
|
2014-02-26 01:32:38 +00:00
|
|
|
paused: boolean;
|
|
|
|
sprite: Phaser.Sprite;
|
|
|
|
updateIfVisible: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
add(name: string, frames?: number[] | string[], frameRate?: number, loop?: boolean, useNumericIndex?: boolean): Phaser.Animation;
|
|
|
|
copyFrameData(frameData: Phaser.FrameData, frame: string | number): boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
destroy(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
getAnimation(name: string): Phaser.Animation;
|
2014-07-03 15:23:36 +00:00
|
|
|
next(quantity?: number): void;
|
2014-04-26 00:34:19 +00:00
|
|
|
play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
2014-07-03 15:23:36 +00:00
|
|
|
previous(quantity?: number): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
refreshFrame(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
stop(name?: string, resetFrame?: boolean): void;
|
|
|
|
update(): boolean;
|
|
|
|
validateFrames(frames: Phaser.Frame[], useNumericIndex?: boolean): boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class AnimationParser {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-04-24 16:16:31 +00:00
|
|
|
static JSONData(game: Phaser.Game, json: any): Phaser.FrameData;
|
|
|
|
static JSONDataHash(game: Phaser.Game, json: any): Phaser.FrameData;
|
2016-02-02 23:30:03 +00:00
|
|
|
static JSONDataPyxel(game: Phaser.Game, json: any): Phaser.FrameData;
|
2014-02-26 01:32:38 +00:00
|
|
|
static spriteSheet(game: Phaser.Game, key: string, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): Phaser.FrameData;
|
2015-04-24 16:16:31 +00:00
|
|
|
static XMLData(game: Phaser.Game, xml: any): Phaser.FrameData;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-09-25 08:38:38 +00:00
|
|
|
class AudioSprite {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, key: string);
|
|
|
|
|
|
|
|
game: Phaser.Game;
|
|
|
|
key: string;
|
|
|
|
config: any;
|
|
|
|
autoplayKey: string;
|
|
|
|
autoplay: boolean;
|
|
|
|
sounds: any;
|
|
|
|
|
|
|
|
get(marker: string): Phaser.Sound;
|
|
|
|
play(marker: string, volume?: number): Phaser.Sound;
|
|
|
|
stop(marker: string): Phaser.Sound;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-11-16 22:10:48 +00:00
|
|
|
class ArraySet {
|
|
|
|
|
|
|
|
constructor(list: any[]);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
|
|
|
position: number;
|
2014-11-16 22:10:48 +00:00
|
|
|
list: any[];
|
2014-04-26 00:34:19 +00:00
|
|
|
total: number;
|
2014-11-16 22:10:48 +00:00
|
|
|
first: any;
|
|
|
|
next: any;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-11-16 22:10:48 +00:00
|
|
|
add(item: any): any;
|
2015-02-24 01:22:13 +00:00
|
|
|
getByKey(property: string, value: any): any;
|
2014-11-16 22:10:48 +00:00
|
|
|
getIndex(item: any): number;
|
|
|
|
exists(item: any): boolean;
|
2014-04-26 00:34:19 +00:00
|
|
|
reset(): void;
|
2014-11-16 22:10:48 +00:00
|
|
|
remove(item: any): any;
|
2015-03-24 21:28:24 +00:00
|
|
|
removeAll(destoy?: boolean): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
setAll(key: any, value: any): void;
|
2014-11-18 12:54:07 +00:00
|
|
|
callAll(key: string, ...parameter: any[]): void;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-11-14 20:16:46 +00:00
|
|
|
class ArrayUtils {
|
|
|
|
|
|
|
|
static getRandomItem<T>(objects: T[], startIndex?: number, length?: number): T;
|
|
|
|
static removeRandomItem<T>(objects: T[], startIndex?: number, length?: number): T;
|
|
|
|
static shuffle<T>(array: T[]): T[];
|
|
|
|
static transposeMatrix<T>(array: T[]): T;
|
|
|
|
static rotateMatrix(matrix: any, direction: number): any;
|
|
|
|
static findClosest(value: number, arr: number[]): number;
|
|
|
|
static rotate(array: any[]): any;
|
|
|
|
static numberArray(start: number, end: number): number[];
|
|
|
|
static numberArrayStep(start: number, end: number, step?: number): number[];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2016-02-02 23:30:03 +00:00
|
|
|
interface BitmapFont {
|
|
|
|
|
|
|
|
base: PIXI.BaseTexture;
|
|
|
|
data: HTMLImageElement;
|
|
|
|
font: Phaser.BMFont;
|
|
|
|
url: string;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
interface BMFont {
|
|
|
|
|
|
|
|
chars: Phaser.BMFontChar[];
|
|
|
|
font: string;
|
|
|
|
lineHeight: number;
|
|
|
|
size: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
interface BMFontChar {
|
|
|
|
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
xOffset: number;
|
|
|
|
yOffset: number;
|
|
|
|
xAdvance: number;
|
|
|
|
kerning: number[];
|
|
|
|
texture: PIXI.BaseTexture;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class BitmapData {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
constructor(game: Phaser.Game, key: string, width?: number, height?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
baseTexture: PIXI.BaseTexture;
|
2014-04-26 00:34:19 +00:00
|
|
|
buffer: ArrayBuffer;
|
2014-02-26 01:32:38 +00:00
|
|
|
canvas: HTMLCanvasElement;
|
|
|
|
context: CanvasRenderingContext2D;
|
2014-03-03 23:46:24 +00:00
|
|
|
ctx: CanvasRenderingContext2D;
|
2014-04-26 00:34:19 +00:00
|
|
|
data: Uint8Array;
|
2014-03-21 23:59:44 +00:00
|
|
|
dirty: boolean;
|
2014-04-26 00:34:19 +00:00
|
|
|
disableTextureUpload: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
height: number;
|
2014-04-26 00:34:19 +00:00
|
|
|
imageData: ImageData;
|
2014-03-03 23:46:24 +00:00
|
|
|
key: string;
|
2015-08-07 01:48:00 +00:00
|
|
|
op: string;
|
2014-04-26 00:34:19 +00:00
|
|
|
pixels: Uint32Array;
|
2014-09-04 15:52:10 +00:00
|
|
|
smoothed: boolean;
|
2014-03-10 16:58:12 +00:00
|
|
|
texture: PIXI.Texture;
|
2014-02-26 01:32:38 +00:00
|
|
|
textureFrame: Phaser.Frame;
|
|
|
|
type: number;
|
|
|
|
width: number;
|
2014-08-28 13:56:27 +00:00
|
|
|
|
2014-09-04 15:52:10 +00:00
|
|
|
static getTransform(translateX: number, translateY: number, scaleX: number, scaleY: number, skewX: number, skewY: number): any;
|
|
|
|
|
|
|
|
add(object: any): Phaser.BitmapData;
|
|
|
|
addToWorld(x?: number, y?: number, anchorX?: number, anchorY?: number, scaleX?: number, scaleY?: number): Phaser.Image;
|
2015-01-05 10:25:06 +00:00
|
|
|
alphaMask(source: any, mask?: any, sourceRect?: Phaser.Rectangle, maskRect?: Phaser.Rectangle): Phaser.BitmapData;
|
2014-09-04 15:52:10 +00:00
|
|
|
blendAdd(): Phaser.BitmapData;
|
|
|
|
blendColor(): Phaser.BitmapData;
|
|
|
|
blendColorBurn(): Phaser.BitmapData;
|
|
|
|
blendColorDodge(): Phaser.BitmapData;
|
|
|
|
blendDarken(): Phaser.BitmapData;
|
|
|
|
blendDestinationAtop(): Phaser.BitmapData;
|
|
|
|
blendDestinationIn(): Phaser.BitmapData;
|
|
|
|
blendDestinationOut(): Phaser.BitmapData;
|
|
|
|
blendDestinationOver(): Phaser.BitmapData;
|
|
|
|
blendDifference(): Phaser.BitmapData;
|
|
|
|
blendExclusion(): Phaser.BitmapData;
|
|
|
|
blendHardLight(): Phaser.BitmapData;
|
|
|
|
blendHue(): Phaser.BitmapData;
|
|
|
|
blendLighten(): Phaser.BitmapData;
|
|
|
|
blendLuminosity(): Phaser.BitmapData;
|
|
|
|
blendMultiply(): Phaser.BitmapData;
|
|
|
|
blendOverlay(): Phaser.BitmapData;
|
|
|
|
blendReset(): Phaser.BitmapData;
|
|
|
|
blendSaturation(): Phaser.BitmapData;
|
|
|
|
blendScreen(): Phaser.BitmapData;
|
|
|
|
blendSoftLight(): Phaser.BitmapData;
|
|
|
|
blendSourceAtop(): Phaser.BitmapData;
|
|
|
|
blendSourceIn(): Phaser.BitmapData;
|
|
|
|
blendSourceOut(): Phaser.BitmapData;
|
|
|
|
blendSourceOver(): Phaser.BitmapData;
|
|
|
|
blendXor(): Phaser.BitmapData;
|
|
|
|
circle(x: number, y: number, radius: number, fillStyle?: string): Phaser.BitmapData;
|
2015-07-09 10:44:21 +00:00
|
|
|
clear(x?: number, y?: number, width?: number, height?: number): Phaser.BitmapData;
|
2014-09-04 15:52:10 +00:00
|
|
|
cls(): Phaser.BitmapData;
|
2015-12-11 04:40:50 +00:00
|
|
|
copy(source?: any, x?: number, y?: number, width?: number, height?: number, tx?: number, ty?: number, newWidth?: number, newHeight?: number, rotate?: number, anchorX?: number, anchorY?: number, scaleX?: number, scaleY?: number, alpha?: number, blendMode?: string, roundPx?: boolean): Phaser.BitmapData;
|
2014-09-10 23:02:23 +00:00
|
|
|
copyPixels(source: any, area: Phaser.Rectangle, x: number, y: number, alpha?: number): void;
|
2015-12-11 04:40:50 +00:00
|
|
|
copyRect(source: any, area: Phaser.Rectangle, x?: number, y?: number, alpha?: number, blendMode?: string, roundPx?: boolean): Phaser.BitmapData;
|
2015-08-26 18:07:56 +00:00
|
|
|
destroy(): void;
|
2015-12-11 04:40:50 +00:00
|
|
|
draw(source: any, x?: number, y?: number, width?: number, height?: number, blendMode?: string, roundPx?: boolean): Phaser.BitmapData;
|
|
|
|
drawFull(parent: any, blendMode?: string, roundPx?: boolean): Phaser.BitmapData;
|
|
|
|
drawGroup(group: Phaser.Group, blendMode?: string, roundPx?: boolean): Phaser.BitmapData;
|
2014-05-25 11:15:43 +00:00
|
|
|
extract(destination: Phaser.BitmapData, r: number, g: number, b: number, a?: number, resize?: boolean, r2?: number, g2?: number, b2?: number): Phaser.BitmapData;
|
2014-09-04 15:52:10 +00:00
|
|
|
fill(r: number, g: number, b: number, a?: number): Phaser.BitmapData;
|
2015-07-08 23:19:07 +00:00
|
|
|
generateTexture(key: string): PIXI.Texture;
|
2014-10-30 08:56:24 +00:00
|
|
|
getBounds(rect?: Phaser.Rectangle): Phaser.Rectangle;
|
|
|
|
getFirstPixel(direction: number): { r: number; g: number; b: number; x: number; y: number; };
|
2014-09-01 15:55:02 +00:00
|
|
|
getPixel(x: number, y: number, out?: any): number;
|
|
|
|
getPixelRGB(x: number, y: number, out?: any, hsl?: boolean, hsv?: boolean): any;
|
2014-02-26 01:32:38 +00:00
|
|
|
getPixel32(x: number, y: number): number;
|
2014-04-26 00:34:19 +00:00
|
|
|
getPixels(rect: Phaser.Rectangle): ImageData;
|
2014-09-10 23:02:23 +00:00
|
|
|
getTransform(translateX: number, translateY: number, scaleX: number, scaleY: number, skewX: number, skewY: number): any;
|
2015-08-07 01:48:00 +00:00
|
|
|
line(x1: number, y1: number, x2: number, y2: number, color?: string, width?: number): Phaser.BitmapData;
|
2014-09-04 15:52:10 +00:00
|
|
|
load(source: any): Phaser.BitmapData;
|
2015-09-13 20:43:38 +00:00
|
|
|
move(x: number, y: number, wrap?: boolean): Phaser.BitmapData;
|
|
|
|
moveH(distance: number, wrap?: boolean): Phaser.BitmapData;
|
|
|
|
moveV(distance: number, wrap?: boolean): Phaser.BitmapData;
|
2014-09-04 15:52:10 +00:00
|
|
|
processPixel(callback: Function, callbackContext: any, x?: number, y?: Number, width?: number, height?: number): Phaser.BitmapData;
|
|
|
|
processPixelRGB(callback: Function, callbackContext: any, x?: number, y?: Number, width?: number, height?: number): Phaser.BitmapData;
|
|
|
|
rect(x: number, y: number, width: number, height: number, fillStyle?: string): Phaser.BitmapData;
|
|
|
|
render(): Phaser.BitmapData;
|
2015-08-26 00:37:58 +00:00
|
|
|
replaceRGB(r1: number, g1: number, b1: number, a1: number, r2: number, g2: number, b2: number, a2: number, region?: Phaser.Rectangle): Phaser.BitmapData;
|
2014-09-04 15:52:10 +00:00
|
|
|
resize(width: number, height: number): Phaser.BitmapData;
|
2015-05-09 01:55:12 +00:00
|
|
|
resizeFrame(parent: any, width: number, height: number): void;
|
2014-09-04 15:52:10 +00:00
|
|
|
setHSL(h?: number, s?: number, l?: number, region?: Phaser.Rectangle): Phaser.BitmapData;
|
|
|
|
setPixel(x: number, y: number, red: number, green: number, blue: number, immediate?: boolean): Phaser.BitmapData;
|
|
|
|
setPixel32(x: number, y: number, red: number, green: number, blue: number, alpha: number, immediate?: boolean): Phaser.BitmapData;
|
2014-10-03 20:28:20 +00:00
|
|
|
shadow(color: string, blur?: number, x?: number, y?: number): Phaser.BitmapData;
|
|
|
|
shiftHSL(h?: number, s?: number, l?: number, region?: Phaser.Rectangle): Phaser.BitmapData;
|
2015-01-27 12:14:06 +00:00
|
|
|
text(text: string, x?: number, y?: number, font?: string, color?: string, shadow?: boolean): Phaser.BitmapData;
|
2014-10-03 20:28:20 +00:00
|
|
|
textureLine(line: Phaser.Line, key: string, repeat?: string): Phaser.BitmapData;
|
2015-01-28 17:34:27 +00:00
|
|
|
update(x?: number, y?: number, width?: number, height?: number): Phaser.BitmapData;
|
2014-08-28 13:56:27 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2015-06-13 16:41:28 +00:00
|
|
|
class BitmapText extends PIXI.DisplayObjectContainer {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-06-13 16:41:28 +00:00
|
|
|
constructor(game: Phaser.Game, x: number, y: number, font: string, text?: string, size?: number, align?: string);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
align: string;
|
2015-07-20 20:36:36 +00:00
|
|
|
alive: boolean;
|
2015-06-13 16:41:28 +00:00
|
|
|
anchor: Phaser.Point;
|
2015-07-20 20:36:36 +00:00
|
|
|
animations: Phaser.AnimationManager;
|
2014-02-26 01:32:38 +00:00
|
|
|
angle: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
autoCull: boolean;
|
|
|
|
body: Phaser.Physics.Arcade.Body | Phaser.Physics.P2.Body | Phaser.Physics.Ninja.Body | any;
|
|
|
|
bottom: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
cameraOffset: Phaser.Point;
|
2015-07-20 20:36:36 +00:00
|
|
|
checkWorldBounds: boolean;
|
2014-04-23 07:26:26 +00:00
|
|
|
destroyPhase: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
debug: boolean;
|
2015-06-13 16:41:28 +00:00
|
|
|
dirty: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
events: Phaser.Events;
|
2014-02-26 01:32:38 +00:00
|
|
|
exists: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
fixedToCamera: boolean;
|
|
|
|
font: string;
|
2014-03-10 16:58:12 +00:00
|
|
|
fontSize: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
fresh: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2014-03-03 23:46:24 +00:00
|
|
|
input: Phaser.InputHandler;
|
|
|
|
inputEnabled: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
inCamera: boolean;
|
|
|
|
inWorld: boolean;
|
|
|
|
key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture;
|
|
|
|
left: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
name: string;
|
2015-07-20 20:36:36 +00:00
|
|
|
components: any;
|
|
|
|
lifespan: number;
|
2015-06-13 16:41:28 +00:00
|
|
|
maxWidth: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
offsetX: number;
|
|
|
|
offsetY: number;
|
|
|
|
outOfBoundsKill: boolean;
|
2015-07-08 18:09:42 +00:00
|
|
|
pendingDestroy: boolean;
|
2015-03-24 21:28:24 +00:00
|
|
|
physicsType: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
previousPosition: Phaser.Point;
|
2015-07-20 20:36:36 +00:00
|
|
|
previousRotation: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
position: Phaser.Point;
|
2015-02-24 01:22:13 +00:00
|
|
|
renderOrderID: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
right: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
text: string;
|
2015-07-31 14:56:44 +00:00
|
|
|
smoothed: boolean;
|
2015-06-13 16:41:28 +00:00
|
|
|
textWidth: number;
|
|
|
|
textHeight: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
tint: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
top: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
type: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
world: Phaser.Point;
|
2015-07-20 20:36:36 +00:00
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
z: number;
|
|
|
|
|
|
|
|
destroy(destroyChildren?: boolean): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
kill(): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
postUpdate(): void;
|
|
|
|
preUpdate(): void;
|
2015-06-13 16:41:28 +00:00
|
|
|
purgeGlyphs(): number;
|
2015-07-20 20:36:36 +00:00
|
|
|
reset(x: number, y: number, health?: number): Phaser.BitmapText;
|
|
|
|
revive(health?: number): Phaser.BitmapText;
|
|
|
|
scanLine(data: any, scale: number, text: string): { width: number; text: string; end: boolean; chars: string[] };
|
2015-06-13 16:41:28 +00:00
|
|
|
setText(text: string): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(): void;
|
2014-05-14 14:54:40 +00:00
|
|
|
updateText(): void;
|
|
|
|
updateTransform(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
class Button extends Phaser.Image {
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
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);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
forceOut: boolean;
|
|
|
|
freezeFrames: boolean;
|
2015-10-06 14:30:54 +00:00
|
|
|
onDownSound: Phaser.Sound | Phaser.AudioSprite;
|
2014-02-26 01:32:38 +00:00
|
|
|
onDownSoundMarker: string;
|
|
|
|
onInputDown: Phaser.Signal;
|
|
|
|
onInputOut: Phaser.Signal;
|
|
|
|
onInputOver: Phaser.Signal;
|
|
|
|
onInputUp: Phaser.Signal;
|
2015-10-06 14:30:54 +00:00
|
|
|
onOutSound: Phaser.Sound | Phaser.AudioSprite;
|
2014-02-26 01:32:38 +00:00
|
|
|
onOutSoundMarker: string;
|
2015-10-06 14:30:54 +00:00
|
|
|
onOverSound: Phaser.Sound | Phaser.AudioSprite;
|
2014-02-26 01:32:38 +00:00
|
|
|
onOverSoundMarker: string;
|
2014-05-14 14:54:40 +00:00
|
|
|
onOverMouseOnly: boolean;
|
2015-10-06 14:30:54 +00:00
|
|
|
onUpSound: Phaser.Sound | Phaser.AudioSprite;
|
2014-02-26 01:32:38 +00:00
|
|
|
onUpSoundMaker: string;
|
2015-03-24 21:28:24 +00:00
|
|
|
physicsType: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
type: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
clearFrames(): void;
|
2015-10-06 14:30:54 +00:00
|
|
|
setDownSound(sound: Phaser.Sound | Phaser.AudioSprite, marker?: string): void;
|
|
|
|
setFrames(overFrame?: string | number, outFrame?: string | number, downFrame?: string | number, upFrame?: string | number): void;
|
2015-08-11 14:56:56 +00:00
|
|
|
onInputOverHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void;
|
|
|
|
onInputOutHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
onInputDownHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void;
|
|
|
|
onInputUpHandler(sprite: Phaser.Button, pointer: Phaser.Pointer, isOver: boolean): void;
|
2014-10-30 08:56:24 +00:00
|
|
|
removedFromWorld(): void;
|
2015-10-06 14:30:54 +00:00
|
|
|
setOutSound(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;
|
2014-03-20 11:07:37 +00:00
|
|
|
setState(newState: number): void;
|
2015-10-06 14:30:54 +00:00
|
|
|
setUpSound(sound: Phaser.Sound | Phaser.AudioSprite, marker?: string): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2016-02-02 23:30:03 +00:00
|
|
|
class PointerMode {
|
|
|
|
|
|
|
|
static CURSOR: number;
|
|
|
|
static CONTACT: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Cache {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
static BINARY: number;
|
|
|
|
static BITMAPDATA: number;
|
|
|
|
static BITMAPFONT: number;
|
|
|
|
static CANVAS: number;
|
|
|
|
static IMAGE: number;
|
2014-03-10 16:58:12 +00:00
|
|
|
static JSON: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
static PHYSICS: number;
|
2015-07-15 22:22:51 +00:00
|
|
|
static RENDER_TEXTURE: number;
|
|
|
|
static SHADER: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
static SOUND: number;
|
2015-07-17 00:08:45 +00:00
|
|
|
static SPRITE_SHEET: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
static TEXT: number;
|
|
|
|
static TEXTURE: number;
|
2015-07-17 00:08:45 +00:00
|
|
|
static TEXTURE_ATLAS: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
static TILEMAP: number;
|
2014-09-25 08:38:38 +00:00
|
|
|
static XML: number;
|
2015-07-15 22:22:51 +00:00
|
|
|
static VIDEO: number;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-10-30 08:56:24 +00:00
|
|
|
autoResolveURL: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
onSoundUnlock: Phaser.Signal;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
addBinary(key: string, binaryData: any): void;
|
2014-10-03 20:28:20 +00:00
|
|
|
addBitmapData(key: string, bitmapData: Phaser.BitmapData, frameData?: Phaser.FrameData): Phaser.BitmapData;
|
2014-03-10 16:58:12 +00:00
|
|
|
addBitmapFont(key: string, texture: Phaser.RetroFont): void;
|
2015-06-23 20:50:27 +00:00
|
|
|
addBitmapFont(key: string, url: string, data: any, atlasData: any, atlasType: string, xSpacing?: number, ySpacing?: number): void;
|
2015-07-17 00:08:45 +00:00
|
|
|
addCanvas(key: string, canvas: HTMLCanvasElement, context?: CanvasRenderingContext2D): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
addDefaultImage(): void;
|
2016-02-02 23:30:03 +00:00
|
|
|
addImage(key: string, url: string, data: any): HTMLImageElement;
|
2014-09-01 15:55:02 +00:00
|
|
|
addJSON(key: string, urL: string, data: any): void;
|
2015-01-27 12:14:06 +00:00
|
|
|
addMissingImage(): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
addPhysicsData(key: string, url: string, JSONData: any, format: number): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
addRenderTexture(key: string, texture: RenderTexture): void;
|
2015-07-15 22:22:51 +00:00
|
|
|
addShader(key: string, url: string, data: any): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
addSound(key: string, url: string, data: any, webAudio: boolean, audioTag: boolean): void;
|
|
|
|
addSpriteSheet(key: string, url: string, data: any, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): void;
|
|
|
|
addText(key: string, url: string, data: any): void;
|
|
|
|
addTextureAtlas(key: string, url: string, data: any, atlasData: any, format: number): void;
|
|
|
|
addTilemap(key: string, url: string, mapData: any, format: number): void;
|
2015-07-17 00:08:45 +00:00
|
|
|
addVideo(key: string, url: string, data: any, isBlob?: boolean): void;
|
2014-10-09 13:16:19 +00:00
|
|
|
addXML(key: string, url: string, data: any): void;
|
|
|
|
checkBinaryKey(key: string): boolean;
|
|
|
|
checkBitmapDataKey(key: string): boolean;
|
|
|
|
checkBitmapFontKey(key: string): boolean;
|
2014-05-19 10:34:14 +00:00
|
|
|
checkCanvasKey(key: string): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
checkImageKey(key: string): boolean;
|
2014-10-09 13:16:19 +00:00
|
|
|
checkJSONKey(key: string): boolean;
|
2015-07-15 22:22:51 +00:00
|
|
|
checkKey(cache: number, key: string): boolean;
|
2014-10-09 13:16:19 +00:00
|
|
|
checkPhysicsKey(key: string): boolean;
|
2015-07-15 22:22:51 +00:00
|
|
|
checkRenderTextureKey(key: string): boolean;
|
|
|
|
checkShaderKey(key: string): boolean;
|
2014-05-19 10:34:14 +00:00
|
|
|
checkSoundKey(key: string): boolean;
|
|
|
|
checkTextKey(key: string): boolean;
|
2014-10-09 13:16:19 +00:00
|
|
|
checkTextureKey(key: string): boolean;
|
2014-05-19 10:34:14 +00:00
|
|
|
checkTilemapKey(key: string): boolean;
|
2014-10-30 08:56:24 +00:00
|
|
|
checkURL(url: string): any;
|
2014-10-09 13:16:19 +00:00
|
|
|
checkUrl(url: string): any;
|
2014-09-25 08:38:38 +00:00
|
|
|
checkXMLKey(key: string): boolean;
|
2015-07-15 22:22:51 +00:00
|
|
|
checkVideoKey(key: string): boolean;
|
2015-07-22 12:23:40 +00:00
|
|
|
clearGLTextures(): void;
|
2014-08-31 01:21:33 +00:00
|
|
|
decodedSound(key: string, data: any): void;
|
2014-01-07 09:58:00 +00:00
|
|
|
destroy(): void;
|
2015-07-15 22:22:51 +00:00
|
|
|
getBaseTexture(key: string, cache?: number): PIXI.BaseTexture;
|
2014-08-31 01:21:33 +00:00
|
|
|
getBinary(key: string): any;
|
2014-02-26 01:32:38 +00:00
|
|
|
getBitmapData(key: string): Phaser.BitmapData;
|
2016-02-02 23:30:03 +00:00
|
|
|
getBitmapFont(key: string): Phaser.BitmapFont;
|
2015-07-17 00:08:45 +00:00
|
|
|
getCanvas(key: string): HTMLCanvasElement;
|
2015-07-26 12:14:25 +00:00
|
|
|
getFrame(key: string, cache?: number): Phaser.Frame;
|
|
|
|
getFrameByIndex(key: string, index: number, cache?: number): Phaser.Frame;
|
|
|
|
getFrameByName(key: string, name: string, cache?: number): Phaser.Frame;
|
|
|
|
getFrameCount(key: string, cache?: number): number;
|
|
|
|
getFrameData(key: string, cache?: number): Phaser.FrameData;
|
2016-02-02 23:30:03 +00:00
|
|
|
getImage(key: string, full?: boolean): HTMLImageElement;
|
2015-07-15 22:22:51 +00:00
|
|
|
getItem(key: string, cache: number, method?: string, property?: string): any;
|
2015-06-12 11:16:58 +00:00
|
|
|
getJSON(key: string, clone?: boolean): any;
|
2015-07-15 22:22:51 +00:00
|
|
|
getKeys(cache: number): string[];
|
2015-04-24 16:16:31 +00:00
|
|
|
getPixiTexture(key: string): PIXI.Texture;
|
|
|
|
getPixiBaseTexture(key: string): PIXI.BaseTexture;
|
2014-09-01 15:55:02 +00:00
|
|
|
getPhysicsData(key: string, object?: string, fixtureKey?: string): any[];
|
2015-08-11 17:29:10 +00:00
|
|
|
getRenderTexture(key: string): Phaser.CachedRenderTexture;
|
2015-07-15 22:22:51 +00:00
|
|
|
getShader(key: string): string;
|
2014-02-26 01:32:38 +00:00
|
|
|
getSound(key: string): Phaser.Sound;
|
2014-08-31 01:21:33 +00:00
|
|
|
getSoundData(key: string): any;
|
2015-07-17 00:08:45 +00:00
|
|
|
getSpriteSheetKey(key: string): boolean;
|
2014-05-19 17:01:37 +00:00
|
|
|
getText(key: string): string;
|
2014-02-26 01:32:38 +00:00
|
|
|
getTextKeys(): string[];
|
|
|
|
getTexture(key: string): Phaser.RenderTexture;
|
2015-07-17 00:08:45 +00:00
|
|
|
getTextureAtlasKey(key: string): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
getTextureFrame(key: string): Phaser.Frame;
|
2014-08-31 01:21:33 +00:00
|
|
|
getTilemap(key: string): any;
|
2014-10-09 13:16:19 +00:00
|
|
|
getTilemapData(key: string): any;
|
2014-10-30 08:56:24 +00:00
|
|
|
getURL(url: string): any;
|
2014-09-25 08:38:38 +00:00
|
|
|
getXML(key: string): any;
|
2015-05-09 01:55:12 +00:00
|
|
|
getVideo(key: string): Phaser.Video;
|
2015-07-26 12:14:25 +00:00
|
|
|
hasFrameData(key: string, cache?: number): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
isSoundDecoded(key: string): boolean;
|
|
|
|
isSoundReady(key: string): boolean;
|
|
|
|
isSpriteSheet(key: string): boolean;
|
|
|
|
reloadSound(key: string): void;
|
|
|
|
reloadSoundComplete(key: string): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
removeBinary(key: string): void;
|
|
|
|
removeBitmapData(key: string): void;
|
|
|
|
removeBitmapFont(key: string): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
removeCanvas(key: string): void;
|
2014-09-25 08:38:38 +00:00
|
|
|
removeImage(key: string, removeFromPixi?: boolean): void;
|
2014-03-10 16:58:12 +00:00
|
|
|
removeJSON(key: string): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
removePhysics(key: string): void;
|
2015-07-15 22:22:51 +00:00
|
|
|
removeRenderTexture(key: string): void;
|
|
|
|
removeShader(key: string): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
removeSound(key: string): void;
|
2015-07-15 22:22:51 +00:00
|
|
|
removeSpriteSheet(key: string): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
removeText(key: string): void;
|
2015-07-15 22:22:51 +00:00
|
|
|
removeTextureAtlas(key: string): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
removeTilemap(key: string): void;
|
2014-09-25 08:38:38 +00:00
|
|
|
removeXML(key: string): void;
|
2015-05-09 01:55:12 +00:00
|
|
|
removeVideo(key: string): void;
|
2015-07-15 22:22:51 +00:00
|
|
|
updateFrameData(key: string, frameData: any, cache?: number): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
updateSound(key: string, property: string, value: Phaser.Sound): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
2015-08-11 17:29:10 +00:00
|
|
|
|
|
|
|
interface CachedRenderTexture {
|
|
|
|
|
|
|
|
frame: Phaser.Frame;
|
|
|
|
texture: Phaser.RenderTexture;
|
2015-08-06 11:08:53 +00:00
|
|
|
|
|
|
|
}
|
2014-01-07 09:58:00 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Camera {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game, id: number, x: number, y: number, width: number, height: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
static FOLLOW_LOCKON: number;
|
|
|
|
static FOLLOW_PLATFORMER: number;
|
|
|
|
static FOLLOW_TOPDOWN: number;
|
|
|
|
static FOLLOW_TOPDOWN_TIGHT: number;
|
2016-04-09 00:35:58 +00:00
|
|
|
static SHAKE_BOTH: number;
|
|
|
|
static SHAKE_HORIZONTAL: number;
|
|
|
|
static SHAKE_VERTICAL: number;
|
2016-04-09 03:05:07 +00:00
|
|
|
static ENABLE_FX: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
atLimit: { x: boolean; y: boolean; };
|
|
|
|
bounds: Phaser.Rectangle;
|
|
|
|
deadzone: Phaser.Rectangle;
|
2014-03-10 16:58:12 +00:00
|
|
|
displayObject: PIXI.DisplayObject;
|
2014-03-20 11:07:37 +00:00
|
|
|
id: number;
|
2016-04-09 03:05:07 +00:00
|
|
|
fx: Phaser.Graphics;
|
2014-01-07 09:58:00 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
height: number;
|
2016-04-09 00:35:58 +00:00
|
|
|
lerp: Phaser.Point;
|
2014-09-10 23:02:23 +00:00
|
|
|
position: Phaser.Point;
|
2014-09-09 11:47:27 +00:00
|
|
|
roundPx: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
scale: Phaser.Point;
|
2016-04-09 03:05:07 +00:00
|
|
|
onFadeComplete: Phaser.Signal;
|
|
|
|
onFlashComplete: Phaser.Signal;
|
|
|
|
onShakeComplete: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
target: Phaser.Sprite;
|
2014-11-18 12:29:55 +00:00
|
|
|
totalInView: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
view: Phaser.Rectangle;
|
2014-01-07 09:58:00 +00:00
|
|
|
visible: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
width: number;
|
|
|
|
world: Phaser.World;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
checkBounds(): void;
|
2016-04-09 03:05:07 +00:00
|
|
|
fade(color?: number, duration?: number, force?: boolean): boolean;
|
|
|
|
flash(color?: number, duration?: number, force?: boolean): boolean;
|
2015-02-11 22:24:47 +00:00
|
|
|
focusOn(displayObject: PIXI.DisplayObject): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
focusOnXY(x: number, y: number): void;
|
2016-04-09 00:35:58 +00:00
|
|
|
follow(target: Phaser.Sprite, style?: number, lerpX?: number, lerpY?: number): void;
|
2014-03-10 16:58:12 +00:00
|
|
|
reset(): void;
|
2016-04-09 03:05:07 +00:00
|
|
|
resetFX(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
setBoundsToWorld(): void;
|
|
|
|
setPosition(x: number, y: number): void;
|
|
|
|
setSize(width: number, height: number): void;
|
2016-04-09 01:57:16 +00:00
|
|
|
shake(intensity?: number, duration?: number, force?: boolean, direction?: number, shakeBounds?: boolean): boolean;
|
2015-01-27 12:14:06 +00:00
|
|
|
unfollow(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Canvas {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
static addToDOM(canvas: HTMLCanvasElement, parent: HTMLElement, overflowHidden?: boolean): HTMLCanvasElement;
|
2015-08-26 18:07:56 +00:00
|
|
|
static create(parent: HTMLDivElement, width?: number, height?: number, id?: string, skipPool?: boolean): HTMLCanvasElement;
|
2016-02-02 23:30:03 +00:00
|
|
|
static getSmoothingEnabled(context: CanvasRenderingContext2D): boolean;
|
|
|
|
static getSmoothingPrefix(context: CanvasRenderingContext2D): string;
|
2014-09-01 02:40:26 +00:00
|
|
|
static removeFromDOM(canvas: HTMLCanvasElement): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
static setBackgroundColor(canvas: HTMLCanvasElement, color: string): HTMLCanvasElement;
|
|
|
|
static setImageRenderingBicubic(canvas: HTMLCanvasElement): HTMLCanvasElement;
|
|
|
|
static setImageRenderingCrisp(canvas: HTMLCanvasElement): HTMLCanvasElement;
|
|
|
|
static setSmoothingEnabled(context: CanvasRenderingContext2D, value: boolean): CanvasRenderingContext2D;
|
|
|
|
static setTouchAction(canvas: HTMLCanvasElement, value: string): HTMLCanvasElement;
|
|
|
|
static setTransform(context: CanvasRenderingContext2D, translateX: number, translateY: number, scaleX: number, scaleY: number, skewX: number, skewY: number): CanvasRenderingContext2D;
|
|
|
|
static setUserSelect(canvas: HTMLCanvasElement, value?: string): HTMLCanvasElement;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Circle {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(x?: number, y?: number, diameter?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
area: number;
|
|
|
|
bottom: number;
|
|
|
|
diameter: number;
|
|
|
|
empty: boolean;
|
|
|
|
left: number;
|
|
|
|
radius: number;
|
|
|
|
right: number;
|
|
|
|
top: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
static circumferencePoint(a: Phaser.Circle, angle: number, asDegrees: boolean, out?: Phaser.Point): Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
static contains(a: Phaser.Circle, x: number, y: number): boolean;
|
|
|
|
static equals(a: Phaser.Circle, b: Phaser.Circle): boolean;
|
|
|
|
static intersects(a: Phaser.Circle, b: Phaser.Circle): boolean;
|
|
|
|
static intersectsRectangle(c: Phaser.Circle, r: Phaser.Rectangle): boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
circumference(): number;
|
2014-05-14 14:54:40 +00:00
|
|
|
circumferencePoint(angle: number, asDegrees?: boolean, out?: Phaser.Point): Phaser.Point;
|
2014-09-10 23:02:23 +00:00
|
|
|
clone(output: Phaser.Circle): Phaser.Circle;
|
2014-02-26 01:32:38 +00:00
|
|
|
contains(x: number, y: number): boolean;
|
|
|
|
copyFrom(source: any): Circle;
|
2014-09-01 15:55:02 +00:00
|
|
|
copyTo(dest: any): any;
|
|
|
|
distance(dest: any, round?: boolean): number;
|
2014-10-20 09:52:49 +00:00
|
|
|
getBounds(): Phaser.Rectangle;
|
2014-02-26 01:32:38 +00:00
|
|
|
offset(dx: number, dy: number): Phaser.Circle;
|
|
|
|
offsetPoint(point: Phaser.Point): Phaser.Circle;
|
2015-06-13 16:41:28 +00:00
|
|
|
random(out?: Phaser.Point): Phaser.Point;
|
2014-10-30 08:56:24 +00:00
|
|
|
scale(x: number, y?: number): Phaser.Rectangle;
|
2014-02-26 01:32:38 +00:00
|
|
|
setTo(x: number, y: number, diameter: number): Circle;
|
|
|
|
toString(): string;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Color {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-04-26 00:34:19 +00:00
|
|
|
static componentToHex(color: number): string;
|
2014-09-01 15:55:02 +00:00
|
|
|
static createColor(r?: number, g?: number, b?: number, a?: number, h?: number, s?: number, l?: number, v?: number): any;
|
|
|
|
static fromRGBA(rgba: number, out?: any): any;
|
2014-02-26 01:32:38 +00:00
|
|
|
static getAlpha(color: number): number;
|
|
|
|
static getAlphaFloat(color: number): number;
|
|
|
|
static getBlue(color: number): number;
|
|
|
|
static getColor(red: number, green: number, blue: number): number;
|
|
|
|
static getColor32(alpha: number, red: number, green: number, blue: number): number;
|
|
|
|
static getGreen(color: number): number;
|
|
|
|
static getRandomColor(min?: number, max?: number, alpha?: number): number;
|
|
|
|
static getRed(color: number): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
static getRGB(color: number): any;
|
2014-07-09 10:15:24 +00:00
|
|
|
static getWebRGB(color: any): string;
|
2014-02-26 01:32:38 +00:00
|
|
|
static hexToRGB(h: string): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
static hexToColor(hex: string, out?: any): any;
|
|
|
|
static HSLtoRGB(h: number, s: number, l: number, out?: any): any;
|
2014-05-04 15:36:58 +00:00
|
|
|
static HSLColorWheel(s?: number, l?: number): any[];
|
2014-09-01 15:55:02 +00:00
|
|
|
static HSVtoRGB(h: number, s: number, v: number, out?: any): any;
|
2014-05-04 15:36:58 +00:00
|
|
|
static HSVColorWheel(s?: number, v?: number): any[];
|
2014-04-26 00:34:19 +00:00
|
|
|
static hueToColor(p: number, q: number, t: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
static interpolateColor(color1: number, color2: number, steps: number, currentStep: number, alpha: number): number;
|
|
|
|
static interpolateColorWithRGB(color: number, r: number, g: number, b: number, steps: number, currentStep: number): number;
|
|
|
|
static interpolateRGB(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, steps: number, currentStep: number): number;
|
2014-04-26 00:34:19 +00:00
|
|
|
static packPixel(r: number, g: number, b: number, a: number): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
static RGBtoHSL(r: number, g: number, b: number, out?: any): any;
|
|
|
|
static RGBtoHSV(r: number, g: number, b: number, out?: any): any;
|
2014-04-26 00:34:19 +00:00
|
|
|
static RGBtoString(r: number, g: number, b: number, a?: number, prefix?: string): string;
|
|
|
|
static toRGBA(r: number, g: number, b: number, a: number): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
static unpackPixel(rgba: number, out?: any, hsl?: boolean, hsv?: boolean): any;
|
2014-05-04 15:36:58 +00:00
|
|
|
static updateColor(out: any): number;
|
2014-11-23 11:32:13 +00:00
|
|
|
static valueToColor(value: string, out?: any): { r: number; g: number; b: number; a: number; };
|
2014-10-30 08:56:24 +00:00
|
|
|
static webToColor(web: string, out?: any): { r: number; g: number; b: number; a: number; };
|
2015-05-09 01:55:12 +00:00
|
|
|
static blendNormal(a: number): number;
|
|
|
|
static blendLighten(a: number, b: number): number;
|
|
|
|
static blendDarken(a: number, b: number): number;
|
|
|
|
static blendMultiply(a: number, b: number): number;
|
|
|
|
static blendAverage(a: number, b: number): number;
|
|
|
|
static blendAdd(a: number, b: number): number;
|
|
|
|
static blendSubtract(a: number, b: number): number;
|
|
|
|
static blendDifference(a: number, b: number): number;
|
|
|
|
static blendNegation(a: number, b: number): number;
|
|
|
|
static blendScreen(a: number, b: number): number;
|
|
|
|
static blendExclusion(a: number, b: number): number;
|
|
|
|
static blendOverlay(a: number, b: number): number;
|
|
|
|
static blendSoftLight(a: number, b: number): number;
|
|
|
|
static blendHardLight(a: number, b: number): number;
|
|
|
|
static blendColorDodge(a: number, b: number): number;
|
|
|
|
static blendColorBurn(a: number, b: number): number;
|
|
|
|
static blendLinearDodge(a: number, b: number): number;
|
|
|
|
static blendLinearBurn(a: number, b: number): number;
|
|
|
|
static blendLinearLight(a: number, b: number): number;
|
|
|
|
static blendVividLight(a: number, b: number): number;
|
|
|
|
static blendPinLight(a: number, b: number): number;
|
|
|
|
static blendHardMix(a: number, b: number): number;
|
|
|
|
static blendReflect(a: number, b: number): number;
|
|
|
|
static blendGlow(a: number, b: number): number;
|
|
|
|
static blendPhoenix(a: number, b: number): number;
|
2014-09-10 23:02:23 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2015-07-22 14:31:30 +00:00
|
|
|
class Create {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game);
|
|
|
|
|
|
|
|
static PALETTE_ARNE: number;
|
|
|
|
static PALETTE_JMP: number;
|
|
|
|
static PALETTE_CGA: number;
|
|
|
|
static PALETTE_C64: number;
|
|
|
|
static PALETTE_JAPANESE_MACHINE: number;
|
|
|
|
|
|
|
|
bmd: Phaser.BitmapData;
|
|
|
|
canvas: HTMLCanvasElement;
|
|
|
|
ctx: CanvasRenderingContext2D;
|
|
|
|
game: Phaser.Game;
|
|
|
|
palettes: any;
|
|
|
|
|
|
|
|
grid(key: string, width: number, height: number, cellWidth: number, cellHeight: number, color: string): PIXI.Texture;
|
|
|
|
texture(key: string, data: any, pixelWidth?: number, pixelHeight?: number, palette?: number): PIXI.Texture;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
interface CursorKeys {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
up: Phaser.Key;
|
|
|
|
down: Phaser.Key;
|
|
|
|
left: Phaser.Key;
|
|
|
|
right: Phaser.Key;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-04-26 00:34:19 +00:00
|
|
|
}
|
2014-02-26 01:32:38 +00:00
|
|
|
|
|
|
|
class Device {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-04-26 00:34:19 +00:00
|
|
|
static LITTLE_ENDIAN: boolean;
|
2014-12-09 10:30:09 +00:00
|
|
|
static onInitialized: Phaser.Signal;
|
|
|
|
|
|
|
|
static checkFullScreenSupport(): void;
|
|
|
|
static canPlayAudio(type: string): boolean;
|
2015-05-09 01:55:12 +00:00
|
|
|
static canPlayVideo(type: string): boolean;
|
2014-12-09 10:30:09 +00:00
|
|
|
static isConsoleOpen(): boolean;
|
|
|
|
static isAndroidStockBrowser(): string;
|
|
|
|
static whenReady: (callback: Function, context?: any) => void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-12-09 11:02:46 +00:00
|
|
|
android: boolean;
|
|
|
|
arora: boolean;
|
|
|
|
audioData: boolean;
|
|
|
|
cancelFullScreen: string;
|
|
|
|
canvas: boolean;
|
|
|
|
chrome: boolean;
|
|
|
|
chromeOS: boolean;
|
2015-06-16 13:28:46 +00:00
|
|
|
chromeVersion: number;
|
2014-12-09 11:02:46 +00:00
|
|
|
cocoonJS: boolean;
|
|
|
|
cocoonJSApp: boolean;
|
|
|
|
cordova: boolean;
|
|
|
|
crosswalk: boolean;
|
|
|
|
css3D: boolean;
|
|
|
|
desktop: boolean;
|
|
|
|
deviceReadyAt: number;
|
2015-06-23 20:50:27 +00:00
|
|
|
electron: boolean;
|
2014-12-09 11:02:46 +00:00
|
|
|
ejecta: boolean;
|
|
|
|
epiphany: boolean;
|
|
|
|
file: boolean;
|
|
|
|
fileSystem: boolean;
|
|
|
|
firefox: boolean;
|
2015-05-25 16:08:07 +00:00
|
|
|
firefoxVersion: number;
|
2014-12-09 11:02:46 +00:00
|
|
|
fullScreen: boolean;
|
|
|
|
fullScreenKeyboard: boolean;
|
|
|
|
getUserMedia: boolean;
|
|
|
|
game: Phaser.Game;
|
2015-05-09 01:55:12 +00:00
|
|
|
h264Video: boolean;
|
|
|
|
hlsVideo: boolean;
|
2014-12-09 11:02:46 +00:00
|
|
|
ie: boolean;
|
|
|
|
ieVersion: number;
|
|
|
|
iOS: boolean;
|
2016-02-02 23:30:03 +00:00
|
|
|
iOSVersion: number;
|
2014-12-09 11:02:46 +00:00
|
|
|
initialized: boolean;
|
|
|
|
iPad: boolean;
|
|
|
|
iPhone: boolean;
|
|
|
|
iPhone4: boolean;
|
|
|
|
kindle: boolean;
|
|
|
|
linux: boolean;
|
|
|
|
littleEndian: boolean;
|
|
|
|
localStorage: boolean;
|
|
|
|
m4a: boolean;
|
|
|
|
macOS: boolean;
|
|
|
|
midori: boolean;
|
|
|
|
mobileSafari: boolean;
|
|
|
|
mp3: boolean;
|
2015-05-09 01:55:12 +00:00
|
|
|
mp4Video: boolean;
|
2014-12-09 11:02:46 +00:00
|
|
|
mspointer: boolean;
|
|
|
|
node: boolean;
|
|
|
|
nodeWebkit: boolean;
|
|
|
|
ogg: boolean;
|
2015-05-09 01:55:12 +00:00
|
|
|
oggVideo: number;
|
2014-12-09 11:02:46 +00:00
|
|
|
opera: boolean;
|
|
|
|
opus: boolean;
|
|
|
|
pixelRatio: number;
|
|
|
|
pointerLock: boolean;
|
|
|
|
quirksMode: boolean;
|
|
|
|
requestFullScreen: string;
|
|
|
|
safari: boolean;
|
|
|
|
silk: boolean;
|
|
|
|
support32bit: boolean;
|
|
|
|
touch: boolean;
|
|
|
|
trident: boolean;
|
|
|
|
tridentVersion: number;
|
|
|
|
typedArray: boolean;
|
|
|
|
vibration: boolean;
|
|
|
|
vita: boolean;
|
|
|
|
wav: boolean;
|
|
|
|
webApp: boolean;
|
|
|
|
webAudio: boolean;
|
|
|
|
webGL: boolean;
|
|
|
|
webm: boolean;
|
2015-05-09 01:55:12 +00:00
|
|
|
webmVideo: boolean;
|
2014-12-09 11:02:46 +00:00
|
|
|
windows: boolean;
|
|
|
|
windowsPhone: boolean;
|
|
|
|
wheelEvent: string;
|
|
|
|
worker: boolean;
|
2015-05-09 01:55:12 +00:00
|
|
|
wp9Video: boolean;
|
2014-12-09 11:02:46 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2015-09-13 20:43:38 +00:00
|
|
|
class DeviceButton {
|
|
|
|
|
|
|
|
constructor(parent: Phaser.Pointer | Phaser.SinglePad, butonCode: number);
|
|
|
|
|
|
|
|
buttonCode: number;
|
|
|
|
game: Phaser.Game;
|
|
|
|
isDown: boolean;
|
|
|
|
isUp: boolean;
|
|
|
|
onDown: Phaser.Signal;
|
|
|
|
onFloat: Phaser.Signal;
|
|
|
|
onUp: Phaser.Signal;
|
|
|
|
pad: Phaser.Gamepad;
|
|
|
|
repeats: number;
|
|
|
|
timeDown: number;
|
|
|
|
timeUp: number;
|
|
|
|
value: number;
|
|
|
|
|
|
|
|
destroy(): void;
|
|
|
|
justPressed(duration?: number): boolean;
|
|
|
|
justReleased(duration?: number): boolean;
|
|
|
|
processButtonDown(value: number): void;
|
|
|
|
processButtonFloat(value: number): void;
|
|
|
|
processButtonUp(value: number): void;
|
|
|
|
reset(): void;
|
|
|
|
|
|
|
|
}
|
2014-02-26 01:32:38 +00:00
|
|
|
|
|
|
|
module Easing {
|
|
|
|
|
2014-11-24 15:53:47 +00:00
|
|
|
var Default: Function;
|
|
|
|
var Power0: Function;
|
|
|
|
var Power1: Function;
|
|
|
|
var power2: Function;
|
|
|
|
var power3: Function;
|
|
|
|
var power4: Function;
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Back {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Bounce {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Circular {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Cubic {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Elastic {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Exponential {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Linear {
|
|
|
|
static None(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Quadratic {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Quartic {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Quintic {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Sinusoidal {
|
|
|
|
static In(k: number): number;
|
|
|
|
static Out(k: number): number;
|
|
|
|
static InOut(k: number): number;
|
|
|
|
}
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
class Ellipse {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
constructor(x?: number, y?: number, width?: number, height?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
bottom: number;
|
|
|
|
empty: boolean;
|
|
|
|
height: number;
|
|
|
|
left: number;
|
|
|
|
right: number;
|
|
|
|
top: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
type: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
width: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
static constains(a: Phaser.Ellipse, x: number, y: number): boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
clone(output: Phaser.Ellipse): Phaser.Ellipse;
|
2014-03-03 23:46:24 +00:00
|
|
|
contains(x: number, y: number): boolean;
|
|
|
|
copyFrom(source: any): Phaser.Ellipse;
|
2014-09-01 15:55:02 +00:00
|
|
|
copyTo(dest: any): any;
|
2014-10-20 09:52:49 +00:00
|
|
|
getBounds(): Phaser.Rectangle;
|
2015-06-13 02:46:20 +00:00
|
|
|
random(out?: Phaser.Point): Phaser.Point;
|
2014-03-03 23:46:24 +00:00
|
|
|
setTo(x: number, y: number, width: number, height: number): Phaser.Ellipse;
|
|
|
|
toString(): string;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Events {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(sprite: Phaser.Sprite);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
parent: Phaser.Sprite;
|
|
|
|
onAddedToGroup: Phaser.Signal;
|
|
|
|
onRemovedFromGroup: Phaser.Signal;
|
2014-10-30 08:56:24 +00:00
|
|
|
onRemovedFromWorld: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
onKilled: Phaser.Signal;
|
|
|
|
onRevived: Phaser.Signal;
|
|
|
|
onOutOfBounds: Phaser.Signal;
|
2015-01-02 18:21:30 +00:00
|
|
|
onEnterBounds: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
onInputOver: Phaser.Signal;
|
|
|
|
onInputOut: Phaser.Signal;
|
|
|
|
onInputDown: Phaser.Signal;
|
|
|
|
onInputUp: Phaser.Signal;
|
2014-09-10 23:02:23 +00:00
|
|
|
onDestroy: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
onDragStart: Phaser.Signal;
|
|
|
|
onDragStop: Phaser.Signal;
|
2015-06-13 16:41:28 +00:00
|
|
|
onDragUpdate: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
onAnimationStart: Phaser.Signal;
|
|
|
|
onAnimationComplete: Phaser.Signal;
|
|
|
|
onAnimationLoop: Phaser.Signal;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-12-02 14:11:43 +00:00
|
|
|
destroy(): void;
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-11-23 11:32:13 +00:00
|
|
|
class Filter extends PIXI.AbstractFilter {
|
2014-10-30 08:56:24 +00:00
|
|
|
|
2015-07-17 00:08:45 +00:00
|
|
|
constructor(game: Phaser.Game, uniforms: any, fragmentSrc: string | string[]);
|
2014-10-30 08:56:24 +00:00
|
|
|
|
|
|
|
dirty: boolean;
|
|
|
|
game: Phaser.Game;
|
|
|
|
height: number;
|
2015-07-17 00:08:45 +00:00
|
|
|
fragmentSrc: string | string[];
|
2014-10-30 08:56:24 +00:00
|
|
|
padding: number;
|
|
|
|
prevPoint: Phaser.Point;
|
|
|
|
type: number;
|
|
|
|
uniforms: any;
|
|
|
|
width: number;
|
|
|
|
|
2015-09-02 23:46:27 +00:00
|
|
|
addToWorld(x?: number, y?: number, width?: number, height?: number, anchorX?: number, anchorY?: number): Phaser.Image;
|
2014-10-30 08:56:24 +00:00
|
|
|
apply(frameBuffer: WebGLFramebuffer): void;
|
|
|
|
destroy(): void;
|
|
|
|
init(...args: any[]): void;
|
|
|
|
setResolution(width: number, height: number): void;
|
|
|
|
syncUniforms(): void;
|
|
|
|
update(pointer?: Phaser.Pointer): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
module Filter {
|
|
|
|
|
|
|
|
class BinarySerpents extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number, march?: number, maxDistance?: number);
|
|
|
|
|
|
|
|
fog: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class BlurX extends Phaser.Filter {
|
|
|
|
|
|
|
|
blur: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class BlurY extends Phaser.Filter {
|
|
|
|
|
|
|
|
blur: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class CausticLight extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number, divisor?: number);
|
|
|
|
|
|
|
|
init(width: number, height: number, divisor?: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class CheckerWave extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number);
|
|
|
|
|
|
|
|
alpha: number;
|
|
|
|
cameraX: number;
|
|
|
|
cameraY: number;
|
|
|
|
cameraZ: number;
|
|
|
|
|
|
|
|
init(width: number, height: number): void;
|
|
|
|
setColor1(red: number, green: number, blue: number): void;
|
|
|
|
setColor2(red: number, green: number, blue: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class ColorBars extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number);
|
|
|
|
|
|
|
|
alpha: number;
|
|
|
|
|
|
|
|
init(width: number, height: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class Fire extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(width: number, height: number, alpha?: number, shift?: number);
|
|
|
|
|
|
|
|
alpha: number;
|
|
|
|
shift: number;
|
|
|
|
speed: number;
|
|
|
|
|
|
|
|
init(width: number, height: number, alpha?: number, shift?: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class Gray extends Phaser.Filter {
|
|
|
|
|
|
|
|
gray: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class HueRotate extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number, texture: any);
|
|
|
|
|
|
|
|
alpha: number;
|
|
|
|
|
|
|
|
init(width: number, height: number, texture: any): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-10-20 09:52:49 +00:00
|
|
|
class LazerBeam extends Phaser.Filter {
|
|
|
|
|
|
|
|
init(width: number, height: number, divisor?: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
class LightBeam extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number);
|
|
|
|
|
|
|
|
alpha: number;
|
|
|
|
blue: number;
|
|
|
|
green: number;
|
|
|
|
red: number;
|
|
|
|
thickness: number;
|
|
|
|
speed: number;
|
|
|
|
|
|
|
|
init(width: number, height: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class Marble extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number, speed?: number, intensity?: number);
|
|
|
|
|
|
|
|
alpha: number;
|
|
|
|
intensity: number;
|
|
|
|
speed: number;
|
|
|
|
|
|
|
|
init(width: number, height: number, speed?: number, intensity?: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-07-01 21:42:36 +00:00
|
|
|
class Pixelate extends Phaser.Filter {
|
|
|
|
|
|
|
|
size: number;
|
2015-05-25 16:08:07 +00:00
|
|
|
sizeX: number;
|
|
|
|
sizeY: number;
|
2014-07-01 21:42:36 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
class Plasma extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number, alpha?: number, size?: number);
|
|
|
|
|
|
|
|
alpha: number;
|
|
|
|
blueShift: number;
|
|
|
|
greenShift: number;
|
|
|
|
redShift: number;
|
|
|
|
size: number;
|
|
|
|
|
|
|
|
init(width: number, height: number, alpha?: number, size?: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class SampleFilter extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number, divisor?: number);
|
|
|
|
|
|
|
|
init(width: number, height: number, divisor?: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class Tunnel extends Phaser.Filter {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, width: number, height: number, texture: any);
|
|
|
|
|
|
|
|
alpha: number;
|
|
|
|
origin: number;
|
|
|
|
|
|
|
|
init(width: number, height: number, texture: any): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
class FlexGrid {
|
|
|
|
|
|
|
|
constructor(manager: Phaser.ScaleManager, width: number, height: number);
|
|
|
|
|
|
|
|
game: Phaser.Game;
|
|
|
|
manager: Phaser.ScaleManager;
|
|
|
|
width: number;
|
|
|
|
height: number;
|
2014-09-25 08:38:38 +00:00
|
|
|
boundsCustom: Phaser.Rectangle;
|
2014-09-10 23:02:23 +00:00
|
|
|
boundsFluid: Phaser.Rectangle;
|
|
|
|
boundsFull: Phaser.Rectangle;
|
|
|
|
boundsNone: Phaser.Rectangle;
|
2014-09-25 08:38:38 +00:00
|
|
|
customWidth: number;
|
|
|
|
customHeight: number;
|
|
|
|
customOffsetX: number;
|
|
|
|
customOffsetY: number;
|
|
|
|
positionCustom: Phaser.Point;
|
2014-09-10 23:02:23 +00:00
|
|
|
positionFluid: Phaser.Point;
|
|
|
|
positionFull: Phaser.Point;
|
|
|
|
positionNone: Phaser.Point;
|
2014-09-25 08:38:38 +00:00
|
|
|
scaleCustom: Phaser.Point;
|
2014-09-10 23:02:23 +00:00
|
|
|
scaleFluid: Phaser.Point;
|
|
|
|
scaleFluidInversed: Phaser.Point;
|
|
|
|
scaleFull: Phaser.Point;
|
|
|
|
scaleNone: Phaser.Point;
|
|
|
|
ratioH: number;
|
|
|
|
ratioV: number;
|
|
|
|
multiplier: number;
|
|
|
|
|
2014-12-02 14:11:43 +00:00
|
|
|
createCustomLayer(width: number, height: number, children?: PIXI.DisplayObject[], addToWorld?: boolean): Phaser.FlexLayer;
|
|
|
|
createFluidLayer(children: PIXI.DisplayObject[]): Phaser.FlexLayer;
|
|
|
|
createFullLayer(children: PIXI.DisplayObject[]): Phaser.FlexLayer;
|
|
|
|
createFixedLayer(children: PIXI.DisplayObject[]): Phaser.FlexLayer;
|
2014-09-10 23:02:23 +00:00
|
|
|
debug(): void;
|
2015-01-27 12:14:06 +00:00
|
|
|
fitSprite(sprite: Phaser.Sprite): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
onResize(width: number, height: number): void;
|
|
|
|
refresh(): void;
|
|
|
|
reset(): void;
|
|
|
|
setSize(width: number, height: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class FlexLayer extends Phaser.Group {
|
|
|
|
|
|
|
|
constructor(manager: Phaser.ScaleManager, position: Phaser.Point, bounds: Phaser.Rectangle, scale: Phaser.Point);
|
|
|
|
|
|
|
|
grid: Phaser.FlexGrid;
|
|
|
|
manager: Phaser.ScaleManager;
|
|
|
|
|
|
|
|
bottomLeft: Phaser.Point;
|
|
|
|
bottomMiddle: Phaser.Point;
|
|
|
|
bottomRight: Phaser.Point;
|
|
|
|
bounds: Phaser.Rectangle;
|
2015-01-27 12:14:06 +00:00
|
|
|
persist: boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
position: Phaser.Point;
|
|
|
|
scale: Phaser.Point;
|
|
|
|
topLeft: Phaser.Point;
|
|
|
|
topMiddle: Phaser.Point;
|
|
|
|
topRight: Phaser.Point;
|
|
|
|
|
|
|
|
debug(): void;
|
|
|
|
resize(): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Frame {
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2015-04-24 16:16:31 +00:00
|
|
|
constructor(index: number, x: number, y: number, width: number, height: number, name: string);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-07-13 22:05:18 +00:00
|
|
|
bottom: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
centerX: number;
|
|
|
|
centerY: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
distance: number;
|
|
|
|
height: number;
|
|
|
|
index: number;
|
|
|
|
name: string;
|
2014-07-13 22:05:18 +00:00
|
|
|
right: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
rotated: boolean;
|
|
|
|
rotationDirection: string;
|
|
|
|
sourceSizeH: number;
|
|
|
|
sourceSizeW: number;
|
2014-04-10 03:31:27 +00:00
|
|
|
spriteSourceSizeH: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
spriteSourceSizeW: number;
|
|
|
|
spriteSourceSizeX: number;
|
|
|
|
spriteSourceSizeY: number;
|
|
|
|
trimmed: boolean;
|
|
|
|
uuid: string;
|
|
|
|
width: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
clone(): Phaser.Frame;
|
2014-03-03 23:46:24 +00:00
|
|
|
getRect(out?: Phaser.Rectangle): Phaser.Rectangle;
|
2014-02-26 01:32:38 +00:00
|
|
|
setTrim(trimmed: boolean, actualWidth: number, actualHeight: number, destX: number, destY: number, destWidth: number, destHeight: number): void;
|
2015-05-09 01:55:12 +00:00
|
|
|
resize(width: number, height: number): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class FrameData {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
total: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
addFrame(frame: Frame): Phaser.Frame;
|
|
|
|
checkFrameName(name: string): boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
clone(): Phaser.FrameData;
|
2014-02-26 01:32:38 +00:00
|
|
|
getFrame(index: number): Phaser.Frame;
|
|
|
|
getFrameByName(name: string): Phaser.Frame;
|
2015-05-25 16:08:07 +00:00
|
|
|
getFrameIndexes(frames?: number[], useNumericIndex?: boolean, output?: number[]): number[];
|
2014-02-26 01:32:38 +00:00
|
|
|
getFrameRange(start: number, end: number, output: Phaser.Frame[]): Phaser.Frame[];
|
2015-05-25 16:08:07 +00:00
|
|
|
getFrames(frames?: number[], useNumericIndex?: boolean, output?: Phaser.Frame[]): Phaser.Frame[];
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-07-13 22:05:18 +00:00
|
|
|
interface IGameConfig {
|
|
|
|
|
|
|
|
enableDebug?: boolean;
|
2014-10-30 08:56:24 +00:00
|
|
|
width?: number;
|
|
|
|
height?: number;
|
|
|
|
renderer?: number;
|
|
|
|
parent?: any;
|
|
|
|
transparent?: boolean;
|
|
|
|
antialias?: boolean;
|
2016-04-11 21:03:26 +00:00
|
|
|
resolution?: number;
|
2014-10-30 08:56:24 +00:00
|
|
|
preserveDrawingBuffer?: boolean;
|
|
|
|
physicsConfig?: any;
|
|
|
|
seed?: string;
|
|
|
|
state?: Phaser.State;
|
2014-07-13 22:05:18 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
class Game {
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
constructor(width?: number | string, height?: number | string, renderer?: number, parent?: any, state?: any, transparent?: boolean, antialias?: boolean, physicsConfig?: any);
|
2014-10-30 08:56:24 +00:00
|
|
|
constructor(config: IGameConfig);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
add: Phaser.GameObjectFactory;
|
2014-02-26 01:32:38 +00:00
|
|
|
antialias: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
cache: Phaser.Cache;
|
2014-02-26 01:32:38 +00:00
|
|
|
camera: Phaser.Camera;
|
|
|
|
canvas: HTMLCanvasElement;
|
2016-02-02 23:30:03 +00:00
|
|
|
clearBeforeRender: boolean;
|
2014-07-13 22:05:18 +00:00
|
|
|
config: IGameConfig;
|
2015-02-11 22:24:47 +00:00
|
|
|
context: CanvasRenderingContext2D;
|
2014-11-27 16:00:18 +00:00
|
|
|
count: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
debug: Phaser.Utils.Debug;
|
|
|
|
device: Phaser.Device;
|
2014-11-14 20:16:46 +00:00
|
|
|
forceSingleUpdate: boolean;
|
2014-11-10 21:15:52 +00:00
|
|
|
fpsProblemNotifier: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
height: number;
|
|
|
|
id: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
input: Phaser.Input;
|
2014-02-26 01:32:38 +00:00
|
|
|
isBooted: boolean;
|
|
|
|
isRunning: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
load: Phaser.Loader;
|
2014-12-02 09:03:06 +00:00
|
|
|
lockRender: boolean;
|
2014-03-10 16:58:12 +00:00
|
|
|
make: Phaser.GameObjectCreator;
|
2014-01-07 09:58:00 +00:00
|
|
|
math: Phaser.Math;
|
2014-02-26 01:32:38 +00:00
|
|
|
net: Phaser.Net;
|
2014-03-20 11:07:37 +00:00
|
|
|
onBlur: Phaser.Signal;
|
|
|
|
onFocus: Phaser.Signal;
|
|
|
|
onPause: Phaser.Signal;
|
|
|
|
onResume: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
parent: HTMLElement;
|
|
|
|
particles: Phaser.Particles;
|
|
|
|
paused: boolean;
|
|
|
|
pendingStep: boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
physics: Phaser.Physics;
|
2014-09-01 15:55:02 +00:00
|
|
|
physicsConfig: any;
|
2015-01-24 14:29:56 +00:00
|
|
|
plugins: PluginManager;
|
2014-07-13 22:05:18 +00:00
|
|
|
preserveDrawingBuffer: Boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
raf: Phaser.RequestAnimationFrame;
|
2015-07-07 07:48:20 +00:00
|
|
|
renderer: PIXI.CanvasRenderer | PIXI.WebGLRenderer;
|
2014-02-26 01:32:38 +00:00
|
|
|
renderType: number;
|
2015-03-03 21:14:25 +00:00
|
|
|
resolution: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
rnd: Phaser.RandomDataGenerator;
|
2014-03-10 16:58:12 +00:00
|
|
|
scale: Phaser.ScaleManager;
|
2014-04-23 21:14:47 +00:00
|
|
|
scratch: Phaser.BitmapData;
|
2014-02-26 01:32:38 +00:00
|
|
|
sound: Phaser.SoundManager;
|
2014-01-07 09:58:00 +00:00
|
|
|
stage: Phaser.Stage;
|
2014-02-26 01:32:38 +00:00
|
|
|
state: Phaser.StateManager;
|
|
|
|
stepCount: number;
|
|
|
|
stepping: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
time: Phaser.Time;
|
2014-02-26 01:32:38 +00:00
|
|
|
transparent: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
tweens: Phaser.TweenManager;
|
2014-12-01 14:18:46 +00:00
|
|
|
currentUpdateID: number;
|
2014-11-27 16:00:18 +00:00
|
|
|
updatesThisFrame: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
width: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
world: Phaser.World;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
boot(): void;
|
|
|
|
destroy(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
disableStep(): void;
|
|
|
|
enableStep(): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
focusGain(event: any): void;
|
|
|
|
focusLoss(event: any): void;
|
|
|
|
gamePaused(event: any): void;
|
|
|
|
gameResumed(event: any): void;
|
|
|
|
parseConfig(config: any): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
removeFromDOM(canvas: HTMLCanvasElement): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
setUpRenderer(): void;
|
|
|
|
showDebugHeader(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
step(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(time: number): void;
|
2014-11-10 21:15:52 +00:00
|
|
|
updateLogic(timeStep: number): void;
|
|
|
|
updateRender(timeStep: number): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
class GameObjectCreator {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
world: Phaser.World;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
audio(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound;
|
2014-09-25 08:38:38 +00:00
|
|
|
audioSprite(key: string): Phaser.AudioSprite;
|
2014-03-10 16:58:12 +00:00
|
|
|
bitmapData(width?: number, height?: number, key?: string, addToCache?: boolean): Phaser.BitmapData;
|
2015-06-13 16:41:28 +00:00
|
|
|
bitmapText(x: number, y: number, font: string, text?: string, size?: number, align?: string): Phaser.BitmapText;
|
2014-09-01 15:55:02 +00:00
|
|
|
button(x?: number, y?: number, key?: string, callback?: Function, callbackContext?: any, overFrame?: any, outFrame?: any, downFrame?: any, upFrame?: any): Phaser.Button;
|
2014-03-10 16:58:12 +00:00
|
|
|
emitter(x?: number, y?: number, maxParticles?: number): Phaser.Particles.Arcade.Emitter;
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
filter(filter: any, ...args: any[]): Phaser.Filter;
|
2015-05-25 16:08:07 +00:00
|
|
|
graphics(x?: number, y?: number): Phaser.Graphics;
|
2014-03-20 11:07:37 +00:00
|
|
|
group(parent?: any, name?: string, addToStage?: boolean, enableBody?: boolean, physicsBodyType?: number): Phaser.Group;
|
2014-12-19 16:01:46 +00:00
|
|
|
image(x: number, y: number, key?: any, frame?: any): Phaser.Image;
|
2014-03-10 16:58:12 +00:00
|
|
|
renderTexture(width?: number, height?: number, key?: any, addToCache?: boolean): Phaser.RenderTexture;
|
2014-03-20 11:07:37 +00:00
|
|
|
retroFont(font: string, characterWidth: number, characterHeight: number, chars: string, charsPerRow: number, xSpacing?: number, ySpacing?: number, xOffset?: number, yOffset?: number): Phaser.RetroFont;
|
2014-09-10 23:02:23 +00:00
|
|
|
rope(x: number, y: number, key: any, frame?: any, points?: Phaser.Point[]): Phaser.Rope;
|
2014-03-10 16:58:12 +00:00
|
|
|
sound(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound;
|
|
|
|
sprite(x: number, y: number, key?: any, frame?: any): Phaser.Sprite;
|
2014-12-02 14:11:43 +00:00
|
|
|
spriteBatch(parent: any, name?: String, addToStage?: boolean): Phaser.SpriteBatch;
|
2014-09-01 15:55:02 +00:00
|
|
|
text(x: number, y: number, text?: string, style?: any): Phaser.Text;
|
2015-01-27 12:14:06 +00:00
|
|
|
tilemap(key: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): Phaser.Tilemap;
|
2014-03-10 16:58:12 +00:00
|
|
|
tileSprite(x: number, y: number, width: number, height: number, key: any, frame: any): Phaser.TileSprite;
|
2014-09-01 15:55:02 +00:00
|
|
|
tween(obj: any): Phaser.Tween;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class GameObjectFactory {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
world: Phaser.World;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
audio(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound;
|
2014-09-25 08:38:38 +00:00
|
|
|
audioSprite(key: string): Phaser.AudioSprite;
|
2014-03-03 23:46:24 +00:00
|
|
|
bitmapData(width?: number, height?: number, key?: string, addToCache?: boolean): Phaser.BitmapData;
|
2015-08-27 10:56:49 +00:00
|
|
|
bitmapText(x: number, y: number, font: string, text?: string, size?: number, group?: Phaser.Group): Phaser.BitmapText;
|
2014-09-01 15:55:02 +00:00
|
|
|
button(x?: number, y?: number, key?: string, callback?: Function, callbackContext?: any, overFrame?: any, outFrame?: any, downFrame?: any, upFrame?: any, group?: Phaser.Group): Phaser.Button;
|
2014-02-26 01:32:38 +00:00
|
|
|
emitter(x?: number, y?: number, maxParticles?: number): Phaser.Particles.Arcade.Emitter;
|
|
|
|
existing(object: any): any;
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
filter(filter: string, ...args: any[]): Phaser.Filter;
|
2014-02-26 01:32:38 +00:00
|
|
|
graphics(x: number, y: number, group?: Phaser.Group): Phaser.Graphics;
|
2014-03-20 11:07:37 +00:00
|
|
|
group(parent?: any, name?: string, addToStage?: boolean, enableBody?: boolean, physicsBodyType?: number): Phaser.Group;
|
2014-12-19 16:01:46 +00:00
|
|
|
image(x: number, y: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.Image;
|
2014-03-20 11:07:37 +00:00
|
|
|
physicsGroup(physicsBodyType: number, parent?: any, name?: string, addToStage?: boolean): Phaser.Group;
|
2014-07-11 13:24:20 +00:00
|
|
|
plugin(plugin: Phaser.Plugin, ...parameter: any[]): Phaser.Plugin;
|
2014-03-03 23:46:24 +00:00
|
|
|
renderTexture(width?: number, height?: number, key?: string, addToCache?: boolean): Phaser.RenderTexture;
|
2014-03-20 11:07:37 +00:00
|
|
|
retroFont(font: string, characterWidth: number, characterHeight: number, chars: string, charsPerRow: number, xSpacing?: number, ySpacing?: number, xOffset?: number, yOffset?: number): Phaser.RetroFont;
|
2014-09-10 23:02:23 +00:00
|
|
|
rope(x: number, y: number, key: any, frame?: any, points?: Phaser.Point[]): Phaser.Rope;
|
2015-08-29 21:08:07 +00:00
|
|
|
sound(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound;
|
2014-02-26 01:32:38 +00:00
|
|
|
sprite(x: number, y: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.Sprite;
|
2014-03-03 23:46:24 +00:00
|
|
|
spriteBatch(parent: any, name?: string, addToStage?: boolean): Phaser.Group;
|
2014-02-26 01:32:38 +00:00
|
|
|
text(x: number, y: number, text: string, style: any, group?: Phaser.Group): Phaser.Text;
|
2014-04-19 08:05:43 +00:00
|
|
|
tilemap(key?: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): Phaser.Tilemap;
|
2014-03-03 23:46:24 +00:00
|
|
|
tileSprite(x: number, y: number, width: number, height: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.TileSprite;
|
2014-09-01 15:55:02 +00:00
|
|
|
tween(obj: any): Phaser.Tween;
|
2015-06-12 18:20:50 +00:00
|
|
|
video(key?: string, url?: string): Phaser.Video;
|
2015-06-13 16:41:28 +00:00
|
|
|
videoSprite(): void; //todo not sure?
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-07-14 10:28:20 +00:00
|
|
|
class Gamepad {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
static BUTTON_0: number;
|
|
|
|
static BUTTON_1: number;
|
|
|
|
static BUTTON_2: number;
|
|
|
|
static BUTTON_3: number;
|
|
|
|
static BUTTON_4: number;
|
|
|
|
static BUTTON_5: number;
|
|
|
|
static BUTTON_6: number;
|
|
|
|
static BUTTON_7: number;
|
|
|
|
static BUTTON_8: number;
|
|
|
|
static BUTTON_9: number;
|
|
|
|
static BUTTON_10: number;
|
|
|
|
static BUTTON_11: number;
|
|
|
|
static BUTTON_12: number;
|
|
|
|
static BUTTON_13: number;
|
|
|
|
static BUTTON_14: number;
|
|
|
|
static BUTTON_15: number;
|
|
|
|
|
|
|
|
static AXIS_0: number;
|
|
|
|
static AXIS_1: number;
|
|
|
|
static AXIS_2: number;
|
|
|
|
static AXIS_3: number;
|
|
|
|
static AXIS_4: number;
|
|
|
|
static AXIS_5: number;
|
|
|
|
static AXIS_6: number;
|
|
|
|
static AXIS_7: number;
|
|
|
|
static AXIS_8: number;
|
|
|
|
static AXIS_9: number;
|
|
|
|
|
|
|
|
static XBOX360_A: number;
|
|
|
|
static XBOX360_B: number;
|
|
|
|
static XBOX360_X: number;
|
|
|
|
static XBOX360_Y: number;
|
|
|
|
static XBOX360_LEFT_BUMPER: number;
|
|
|
|
static XBOX360_RIGHT_BUMPER: number;
|
|
|
|
static XBOX360_LEFT_TRIGGER: number;
|
|
|
|
static XBOX360_RIGHT_TRIGGER: number;
|
|
|
|
static XBOX360_BACK: number;
|
|
|
|
static XBOX360_START: number;
|
|
|
|
static XBOX360_STICK_LEFT_BUTTON: number;
|
|
|
|
static XBOX360_STICK_RIGHT_BUTTON: number;
|
|
|
|
static XBOX360_DPAD_LEFT: number;
|
|
|
|
static XBOX360_DPAD_RIGHT: number;
|
|
|
|
static XBOX360_DPAD_UP: number;
|
|
|
|
static XBOX360_DPAD_DOWN: number;
|
|
|
|
static XBOX360_STICK_LEFT_X: number;
|
|
|
|
static XBOX360_STICK_LEFT_Y: number;
|
|
|
|
static XBOX360_STICK_RIGHT_X: number;
|
|
|
|
static XBOX360_STICK_RIGHT_Y: number;
|
|
|
|
|
2014-06-11 14:23:54 +00:00
|
|
|
static PS3XC_X: number;
|
|
|
|
static PS3XC_CIRCLE: number;
|
|
|
|
static PS3XC_SQUARE: number;
|
|
|
|
static PS3XC_TRIANGLE: number;
|
|
|
|
static PS3XC_L1: number;
|
|
|
|
static PS3XC_R1: number;
|
|
|
|
static PS3XC_L2: number;
|
|
|
|
static PS3XC_R2: number;
|
|
|
|
static PS3XC_SELECT: number;
|
|
|
|
static PS3XC_START: number;
|
|
|
|
static PS3XC_STICK_LEFT_BUTTON: number;
|
|
|
|
static PS3XC_STICK_RIGHT_BUTTON: number;
|
|
|
|
static PS3XC_DPAD_UP: number;
|
|
|
|
static PS3XC_DPAD_DOWN: number;
|
|
|
|
static PS3XC_DPAD_LEFT: number;
|
|
|
|
static PS3XC_DPAD_RIGHT: number;
|
|
|
|
static PS3XC_STICK_LEFT_X: number;
|
|
|
|
static PS3XC_STICK_LEFT_Y: number;
|
|
|
|
static PS3XC_STICK_RIGHT_X: number;
|
|
|
|
static PS3XC_STICK_RIGHT_Y: number;
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
active: boolean;
|
2014-09-01 15:55:02 +00:00
|
|
|
callbackContext: any;
|
2014-11-05 15:20:08 +00:00
|
|
|
enabled: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
onAxisCallBack: Function;
|
|
|
|
onConnectCallback: Function;
|
|
|
|
onDisconnectCallback: Function;
|
|
|
|
onDownCallback: Function;
|
|
|
|
onFloatCallback: Function;
|
|
|
|
onUpCallback: Function;
|
2014-07-13 22:05:18 +00:00
|
|
|
pad1: Phaser.SinglePad;
|
|
|
|
pad2: Phaser.SinglePad;
|
|
|
|
pad3: Phaser.SinglePad;
|
|
|
|
pad4: Phaser.SinglePad;
|
|
|
|
padsConnected: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
supported: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
addCallbacks(context: any, callbacks: any): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
isDown(buttonCode: number): boolean;
|
|
|
|
justPressed(buttonCode: number, duration?: number): boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
justReleased(buttonCode: number, duration?: number): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
reset(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
setDeadZones(value: any): void;
|
|
|
|
start(): void;
|
|
|
|
stop(): void;
|
2014-06-11 14:23:54 +00:00
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
class Graphics extends PIXI.Graphics {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-05-25 16:08:07 +00:00
|
|
|
constructor(game: Phaser.Game, x?: number, y?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
angle: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
alive: boolean;
|
|
|
|
animations: Phaser.AnimationManager;
|
|
|
|
autoCull: boolean;
|
|
|
|
body: Phaser.Physics.Arcade.Body | Phaser.Physics.P2.Body | Phaser.Physics.Ninja.Body | any;
|
|
|
|
bottom: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
cameraOffset: Phaser.Point;
|
2015-07-20 20:36:36 +00:00
|
|
|
checkWorldBounds: boolean;
|
|
|
|
components: any;
|
|
|
|
debug: boolean;
|
2014-04-23 07:26:26 +00:00
|
|
|
destroyPhase: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
exists: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
events: Phaser.Events;
|
2014-03-03 23:46:24 +00:00
|
|
|
fixedToCamera: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture;
|
|
|
|
fresh: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
height: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
input: Phaser.InputHandler;
|
|
|
|
inputEnabled: boolean;
|
|
|
|
inCamera: boolean;
|
|
|
|
inWorld: boolean;
|
|
|
|
left: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
name: string;
|
2015-07-20 20:36:36 +00:00
|
|
|
lifespan: number;
|
|
|
|
offsetX: number;
|
|
|
|
offsetY: number;
|
|
|
|
outOfBoundsKill: boolean;
|
2015-07-08 18:09:42 +00:00
|
|
|
pendingDestroy: boolean;
|
2015-03-24 21:28:24 +00:00
|
|
|
physicsType: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
position: Phaser.Point;
|
2015-07-20 20:36:36 +00:00
|
|
|
previousPosition: Phaser.Point;
|
2015-02-24 01:22:13 +00:00
|
|
|
previousRotation: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
renderOrderID: number;
|
|
|
|
right: number;
|
|
|
|
top: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
type: number;
|
2014-03-10 16:58:12 +00:00
|
|
|
world: Phaser.Point;
|
2015-07-20 20:36:36 +00:00
|
|
|
width: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
z: number;
|
|
|
|
|
2015-07-20 20:36:36 +00:00
|
|
|
destroy(destroyChildren?: boolean): void;
|
2014-05-14 14:54:40 +00:00
|
|
|
drawTriangle(points: Phaser.Point[], cull?: boolean): void;
|
2015-10-06 14:30:54 +00:00
|
|
|
drawTriangles(vertices: Phaser.Point[] | number[], indices?: number[], cull?: boolean): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
kill(): Phaser.Graphics;
|
2014-03-10 16:58:12 +00:00
|
|
|
postUpdate(): void;
|
|
|
|
preUpdate(): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
reset(x: number, y: number, health?: number): Phaser.Graphics;
|
|
|
|
revive(health?: number): Phaser.Graphics;
|
2014-03-10 16:58:12 +00:00
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
class Group extends PIXI.DisplayObjectContainer {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
constructor(game: Phaser.Game, parent?: PIXI.DisplayObjectContainer, name?: string, addToStage?: boolean, enableBody?: boolean, physicsBodyType?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
static RETURN_CHILD: number;
|
|
|
|
static RETURN_NONE: number;
|
|
|
|
static RETURN_TOTAL: number;
|
|
|
|
static SORT_ASCENDING: number;
|
|
|
|
static SORT_DESCENDING: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-01-27 12:14:06 +00:00
|
|
|
alpha: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
angle: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
alive: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
cameraOffset: Phaser.Point;
|
2014-04-23 21:14:47 +00:00
|
|
|
classType: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
cursor: any;
|
2015-02-24 01:22:13 +00:00
|
|
|
cursorIndex: number;
|
2014-03-17 12:35:14 +00:00
|
|
|
enableBody: boolean;
|
|
|
|
enableBodyDebug: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
exists: boolean;
|
2014-03-10 16:58:12 +00:00
|
|
|
fixedToCamera: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2015-04-24 16:16:31 +00:00
|
|
|
hash: PIXI.DisplayObject[];
|
2014-09-25 08:38:38 +00:00
|
|
|
ignoreDestroy: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
length: number;
|
|
|
|
name: string;
|
2014-09-10 23:02:23 +00:00
|
|
|
onDestroy: Phaser.Signal;
|
2015-07-17 00:08:45 +00:00
|
|
|
pendingDestroy: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
physicsBodyType: number;
|
2015-03-24 21:28:24 +00:00
|
|
|
physicsType: number;
|
2015-04-24 16:16:31 +00:00
|
|
|
physicsSortDirection: number;
|
2014-03-10 16:58:12 +00:00
|
|
|
position: Phaser.Point;
|
2015-01-27 12:14:06 +00:00
|
|
|
rotation: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
scale: Phaser.Point;
|
|
|
|
total: number;
|
|
|
|
type: number;
|
2015-01-27 12:14:06 +00:00
|
|
|
visible: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
z: number;
|
|
|
|
|
2014-07-02 13:04:14 +00:00
|
|
|
add(child: any, silent?: boolean): any;
|
2014-03-20 11:07:37 +00:00
|
|
|
addAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): void;
|
2014-07-02 13:04:14 +00:00
|
|
|
addAt(child: any, index: number, silent?: boolean): any;
|
2014-09-10 23:02:23 +00:00
|
|
|
addMultiple(children: any[], silent?: boolean): any[];
|
2015-04-24 16:16:31 +00:00
|
|
|
addToHash(child: PIXI.DisplayObject): boolean;
|
2015-04-01 22:35:08 +00:00
|
|
|
bringToTop(child: any): any;
|
2014-04-26 00:34:19 +00:00
|
|
|
callAll(method: string, context: any, ...parameters: any[]): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
callAllExists(callback: Function, existsValue: boolean, ...parameters: any[]): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
callbackFromArray(child: any, callback: Function, length: number): void;
|
2014-07-18 10:52:39 +00:00
|
|
|
checkAll(key: string[], value: any, checkAlive?: boolean, checkVisible?: boolean, force?: boolean): boolean;
|
2014-09-01 15:55:02 +00:00
|
|
|
checkProperty(child: any, key: string[], value: any, force?: boolean): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
countDead(): number;
|
|
|
|
countLiving(): number;
|
2015-08-28 10:48:25 +00:00
|
|
|
create(x: number, y: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number, exists?: boolean): any;
|
2014-04-23 21:14:47 +00:00
|
|
|
createMultiple(quantity: number, key: string, frame?: any, exists?: boolean): void;
|
2014-12-02 14:11:43 +00:00
|
|
|
customSort(sortHandler: Function, context?: any): void;
|
2014-04-19 08:05:43 +00:00
|
|
|
destroy(destroyChildren?: boolean, soft?: boolean): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
divideAll(property: string, amount: number, checkAlive?: boolean, checkVisible?: boolean): void;
|
2014-12-02 14:11:43 +00:00
|
|
|
forEach(callback: Function, callbackContext: any, checkExists?: boolean, ...args: any[]): void;
|
|
|
|
forEachAlive(callback: Function, callbackContext: any, ...args: any[]): void;
|
2015-01-02 18:21:30 +00:00
|
|
|
forEachDead(callback: Function, callbackContext: any, ...args: any[]): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
forEachExists(callback: Function, callbackContext: any): void;
|
2014-11-16 22:10:48 +00:00
|
|
|
filter(predicate: Function, checkExists?: boolean): ArraySet;
|
2015-07-07 07:48:20 +00:00
|
|
|
getAt(index: number): PIXI.DisplayObject | number;
|
2014-03-10 23:16:49 +00:00
|
|
|
getBottom(): any;
|
2016-04-06 01:09:22 +00:00
|
|
|
getByName(name: string): any;
|
2015-08-28 10:48:25 +00:00
|
|
|
getFirstAlive(createIfNull?: boolean, x?: number, y?: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number): any;
|
|
|
|
getFirstDead(createIfNull?: boolean, x?: number, y?: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number): any;
|
|
|
|
getFirstExists(exists: boolean, createIfNull?: boolean, x?: number, y?: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number): any;
|
2014-02-26 01:32:38 +00:00
|
|
|
getIndex(child: any): number;
|
2014-12-02 14:11:43 +00:00
|
|
|
getRandom(startIndex?: number, length?: number): any;
|
2014-03-10 23:16:49 +00:00
|
|
|
getTop(): any;
|
2014-05-04 15:36:58 +00:00
|
|
|
hasProperty(child: any, key: string[]): boolean;
|
2014-09-01 15:55:02 +00:00
|
|
|
iterate(key: string, value: any, returnType: number, callback?: Function, callbackContext?: any, ...args: any[]): any;
|
2015-07-10 16:05:54 +00:00
|
|
|
moveAll(group: Phaser.Group, silent?: boolean): Phaser.Group;
|
2015-04-01 22:35:08 +00:00
|
|
|
moveDown(child: any): any;
|
2014-03-20 11:07:37 +00:00
|
|
|
moveUp(child: any): any;
|
2014-02-26 01:32:38 +00:00
|
|
|
multiplyAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): void;
|
|
|
|
next(): void;
|
2014-03-10 16:58:12 +00:00
|
|
|
postUpdate(): void;
|
|
|
|
preUpdate(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
previous(): void;
|
2014-07-02 13:04:14 +00:00
|
|
|
remove(child: any, destroy?: boolean, silent?: boolean): boolean;
|
|
|
|
removeAll(destroy?: boolean, silent?: boolean): void;
|
|
|
|
removeBetween(startIndex: number, endIndex?: number, destroy?: boolean, silent?: boolean): void;
|
2015-04-24 16:16:31 +00:00
|
|
|
removeFromHash(child: PIXI.DisplayObject): boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
replace(oldChild: any, newChild: any): any;
|
2015-08-28 10:48:25 +00:00
|
|
|
resetChild(child: any, x?: number, y?: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number): any;
|
2014-12-02 14:11:43 +00:00
|
|
|
resetCursor(index?: number): any;
|
2014-03-10 16:58:12 +00:00
|
|
|
reverse(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
sendToBack(child: any): any;
|
2014-05-04 15:36:58 +00:00
|
|
|
set(child: any, key: string[], value: any, operation?: number, force?: boolean): boolean;
|
2015-01-27 12:14:06 +00:00
|
|
|
setAll(key: string, value: any, checkAlive?: boolean, checkVisible?: boolean, operation?: number, force?: boolean): void;
|
|
|
|
setAllChildren(key: string, value: any, checkAlive?: boolean, checkVisible?: boolean, operation?: number, force?: boolean): void;
|
2014-05-04 15:36:58 +00:00
|
|
|
setProperty(child: any, key: string[], value: any, operation?: number, force?: boolean): boolean;
|
2014-12-02 14:11:43 +00:00
|
|
|
sort(key?: string, order?: number): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
subAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): void;
|
|
|
|
swap(child1: any, child2: any): boolean;
|
2014-03-10 16:58:12 +00:00
|
|
|
update(): void;
|
2014-03-10 23:16:49 +00:00
|
|
|
updateZ(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
xy(index: number, x: number, y: number): void;
|
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
}
|
|
|
|
|
2014-03-06 11:44:26 +00:00
|
|
|
class Image extends PIXI.Sprite {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
constructor(game: Phaser.Game, x: number, y: number, key: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture, frame?: string | number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
alive: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
angle: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
anchor: Phaser.Point;
|
2015-02-11 22:24:47 +00:00
|
|
|
animations: Phaser.AnimationManager;
|
2014-03-03 23:46:24 +00:00
|
|
|
autoCull: boolean;
|
2015-02-16 15:47:55 +00:00
|
|
|
bottom: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
cameraOffset: Phaser.Point;
|
2015-07-20 20:36:36 +00:00
|
|
|
components: any;
|
2014-06-10 22:37:33 +00:00
|
|
|
cropRect: Phaser.Rectangle;
|
2015-07-20 20:36:36 +00:00
|
|
|
customRender: boolean;
|
2015-01-27 12:14:06 +00:00
|
|
|
debug: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
deltaX: number;
|
|
|
|
deltaY: number;
|
|
|
|
deltaZ: number;
|
2014-04-23 07:26:26 +00:00
|
|
|
destroyPhase: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
events: Phaser.Events;
|
|
|
|
exists: boolean;
|
|
|
|
fixedToCamera: boolean;
|
2015-10-06 14:30:54 +00:00
|
|
|
frame: string | number;
|
2014-03-03 23:46:24 +00:00
|
|
|
frameName: string;
|
2015-02-17 06:01:42 +00:00
|
|
|
fresh: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
inCamera: boolean;
|
|
|
|
input: Phaser.InputHandler;
|
|
|
|
inputEnabled: boolean;
|
|
|
|
inWorld: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture;
|
|
|
|
lifespan: number;
|
2015-02-16 15:47:55 +00:00
|
|
|
left: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
name: string;
|
2015-02-16 15:47:55 +00:00
|
|
|
offsetX: number;
|
|
|
|
offsetY: number;
|
2015-07-08 18:09:42 +00:00
|
|
|
pendingDestroy: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
position: Phaser.Point;
|
2015-02-17 06:01:42 +00:00
|
|
|
previousPosition: Phaser.Point;
|
|
|
|
previousRotation: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
renderOrderID: number;
|
2015-02-16 15:47:55 +00:00
|
|
|
right: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
scale: Phaser.Point;
|
2014-03-20 11:07:37 +00:00
|
|
|
smoothed: boolean;
|
2015-02-16 15:47:55 +00:00
|
|
|
top: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
type: number;
|
2015-02-11 22:24:47 +00:00
|
|
|
world: Phaser.Point;
|
2014-03-20 11:07:37 +00:00
|
|
|
z: number;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
bringToTop(): Phaser.Image;
|
2014-09-10 23:02:23 +00:00
|
|
|
crop(rect: Phaser.Rectangle, copy?: boolean): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
destroy(destroyChildren?: boolean): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
kill(): Phaser.Image;
|
2015-07-20 20:36:36 +00:00
|
|
|
loadTexture(key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number, stopAnimation?: boolean): void;
|
2015-05-09 01:55:12 +00:00
|
|
|
resizeFrame(parent: any, width: number, height: number): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
moveDown(): Phaser.Image;
|
|
|
|
moveUp(): Phaser.Image;
|
|
|
|
overlap(displayObject: Phaser.Sprite | Phaser.Image | Phaser.TileSprite | Phaser.Button | PIXI.DisplayObject): boolean;
|
|
|
|
play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
2014-03-03 23:46:24 +00:00
|
|
|
postUpdate(): void;
|
|
|
|
preUpdate(): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
reset(x: number, y: number, health?: number): Phaser.Image;
|
2014-06-10 22:37:33 +00:00
|
|
|
resetFrame(): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
revive(health?: number): Phaser.Image;
|
|
|
|
sendToBack(): Phaser.Image;
|
2014-06-10 22:37:33 +00:00
|
|
|
setFrame(frame: Phaser.Frame): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
update(): void;
|
2014-06-10 22:37:33 +00:00
|
|
|
updateCrop(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2015-07-02 12:53:02 +00:00
|
|
|
class ImageCollection {
|
|
|
|
|
|
|
|
constructor(name: string, firstgid: number, width?: number, height?: number, margin?: number, spacing?: number, properties?: any);
|
|
|
|
|
|
|
|
name: string;
|
|
|
|
firstgid: number;
|
|
|
|
imageWidth: number;
|
|
|
|
imageHeight: number;
|
|
|
|
imageMargin: number;
|
|
|
|
imageSpacing: number;
|
|
|
|
properties: any;
|
2015-07-07 07:48:20 +00:00
|
|
|
images: any[];
|
2015-07-02 12:53:02 +00:00
|
|
|
total: number;
|
|
|
|
|
|
|
|
addImage(gid: number, image: string): void;
|
|
|
|
containsImageIndex(imageIndex: number): boolean;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
class Input {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-11-05 15:20:08 +00:00
|
|
|
static MAX_POINTERS: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
static MOUSE_OVERRIDES_TOUCH: number;
|
|
|
|
static MOUSE_TOUCH_COMBINE: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
static TOUCH_OVERRIDES_MOUSE: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
activePointer: Phaser.Pointer;
|
2014-01-07 09:58:00 +00:00
|
|
|
circle: Phaser.Circle;
|
2014-11-05 15:20:08 +00:00
|
|
|
enabled: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
doubleTapRate: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2014-07-14 10:28:20 +00:00
|
|
|
gamepad: Phaser.Gamepad;
|
2014-02-26 01:32:38 +00:00
|
|
|
hitCanvas: HTMLCanvasElement;
|
|
|
|
hitContext: CanvasRenderingContext2D;
|
2014-01-07 09:58:00 +00:00
|
|
|
holdRate: number;
|
2014-11-16 22:10:48 +00:00
|
|
|
interactiveItems: Phaser.ArraySet;
|
2014-01-07 09:58:00 +00:00
|
|
|
justPressedRate: number;
|
|
|
|
justReleasedRate: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
keyboard: Phaser.Keyboard;
|
|
|
|
maxPointers: number;
|
2014-05-14 14:54:40 +00:00
|
|
|
minPriorityID: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
mouse: Phaser.Mouse;
|
|
|
|
mousePointer: Phaser.Pointer;
|
2014-09-25 08:38:38 +00:00
|
|
|
moveCallbacks: (pointer: Phaser.Pointer, x: number, y: number) => void[];
|
2014-02-26 01:32:38 +00:00
|
|
|
mspointer: Phaser.MSPointer;
|
2014-03-20 11:07:37 +00:00
|
|
|
multiInputOverride: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
onDown: Phaser.Signal;
|
|
|
|
onHold: Phaser.Signal;
|
|
|
|
onTap: Phaser.Signal;
|
|
|
|
onUp: Phaser.Signal;
|
2014-01-07 09:58:00 +00:00
|
|
|
pointer1: Phaser.Pointer;
|
|
|
|
pointer2: Phaser.Pointer;
|
|
|
|
pointer3: Phaser.Pointer;
|
|
|
|
pointer4: Phaser.Pointer;
|
|
|
|
pointer5: Phaser.Pointer;
|
|
|
|
pointer6: Phaser.Pointer;
|
|
|
|
pointer7: Phaser.Pointer;
|
|
|
|
pointer8: Phaser.Pointer;
|
|
|
|
pointer9: Phaser.Pointer;
|
|
|
|
pointer10: Phaser.Pointer;
|
2014-02-26 01:32:38 +00:00
|
|
|
pollLocked: boolean;
|
|
|
|
pollRate: number;
|
|
|
|
position: Phaser.Point;
|
2014-11-05 15:20:08 +00:00
|
|
|
pointer: Phaser.Pointer[];
|
2014-02-26 01:32:38 +00:00
|
|
|
recordLimit: number;
|
|
|
|
recordPointerHistory: boolean;
|
|
|
|
recordRate: number;
|
2014-04-19 08:05:43 +00:00
|
|
|
resetLocked: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
scale: Phaser.Point;
|
|
|
|
speed: Phaser.Point;
|
|
|
|
tapRate: number;
|
|
|
|
totalActivePointers: number;
|
|
|
|
totalInactivePointers: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
touch: Phaser.Touch;
|
2014-02-26 01:32:38 +00:00
|
|
|
worldX: number;
|
|
|
|
worldY: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
addPointer(): Phaser.Pointer;
|
2014-09-10 23:02:23 +00:00
|
|
|
addMoveCallback(callback: Function, context: any): number;
|
2014-01-07 09:58:00 +00:00
|
|
|
boot(): void;
|
2014-11-05 15:20:08 +00:00
|
|
|
countActivePointers(limit?: number): number;
|
2015-05-09 01:55:12 +00:00
|
|
|
deleteMoveCallback(callback: Function, context?: any): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
destroy(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
getLocalPosition(displayObject: any, pointer: Phaser.Pointer): Phaser.Point;
|
2014-11-05 15:20:08 +00:00
|
|
|
getPointer(isActive?: boolean): Phaser.Pointer;
|
2014-05-04 15:36:58 +00:00
|
|
|
getPointerFromId(pointerID: number): Phaser.Pointer;
|
2014-01-07 09:58:00 +00:00
|
|
|
getPointerFromIdentifier(identifier: number): Phaser.Pointer;
|
2015-02-11 22:24:47 +00:00
|
|
|
hitTest(displayObject: PIXI.DisplayObject, pointer: Phaser.Pointer, localPoint: Phaser.Point): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
reset(hard?: boolean): void;
|
|
|
|
resetSpeed(x: number, y: number): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
startPointer(event: any): Phaser.Pointer;
|
|
|
|
stopPointer(event: any): Phaser.Pointer;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
updatePointer(event: any): Phaser.Pointer;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-11-16 22:10:48 +00:00
|
|
|
class InputHandler {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(sprite: Phaser.Sprite);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
allowHorizontalDrag: boolean;
|
|
|
|
allowVerticalDrag: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
boundsRect: Phaser.Rectangle;
|
2014-02-26 01:32:38 +00:00
|
|
|
boundsSprite: Phaser.Sprite;
|
|
|
|
bringToTop: boolean;
|
2015-02-11 22:24:47 +00:00
|
|
|
dragOffset: Phaser.Point;
|
|
|
|
dragFromCenter: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
draggable: boolean;
|
2015-03-24 21:28:24 +00:00
|
|
|
dragStartPoint: Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
enabled: boolean;
|
|
|
|
game: Phaser.Game;
|
2014-10-03 20:28:20 +00:00
|
|
|
globalToLocalX(x: number): number;
|
|
|
|
globalToLocalY(y: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
isDragged: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
pixelPerfectAlpha: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
pixelPerfectClick: boolean;
|
|
|
|
pixelPerfectOver: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
priorityID: number;
|
2014-10-03 20:28:20 +00:00
|
|
|
scaleLayer: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
snapOffset: Phaser.Point;
|
|
|
|
snapOffsetX: number;
|
|
|
|
snapOffsetY: number;
|
|
|
|
snapOnDrag: boolean;
|
|
|
|
snapOnRelease: boolean;
|
2015-06-02 22:28:28 +00:00
|
|
|
snapPoint: Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
snapX: number;
|
|
|
|
snapY: number;
|
|
|
|
sprite: Phaser.Sprite;
|
|
|
|
useHandCursor: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
checkBoundsRect(): void;
|
|
|
|
checkBoundsSprite(): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
checkPixel(x: number, y: number, pointer?: Phaser.Pointer): boolean;
|
2014-07-15 10:20:43 +00:00
|
|
|
checkPointerDown(pointer: Phaser.Pointer, fastTest?: boolean): boolean;
|
|
|
|
checkPointerOver(pointer: Phaser.Pointer, fastTest?: boolean): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
destroy(): void;
|
|
|
|
disableDrag(): void;
|
|
|
|
disableSnap(): void;
|
2016-02-02 23:30:03 +00:00
|
|
|
downDuration(pointerId?: number): number;
|
2015-01-07 14:08:00 +00:00
|
|
|
enableDrag(lockCenter?: boolean, bringToTop?: boolean, pixelPerfect?: boolean, alphaThreshold?: number, boundsRect?: Phaser.Rectangle, boundsSprite?: Phaser.Sprite): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
enableSnap(snapX: number, snapY: number, onDrag?: boolean, onRelease?: boolean, snapOffsetX?: number, snapOffsetY?: number): void;
|
2014-07-15 10:20:43 +00:00
|
|
|
isPixelPerfect(): boolean;
|
2016-02-02 23:30:03 +00:00
|
|
|
justOut(pointerId?: number, delay?: number): boolean;
|
|
|
|
justOver(pointerId?: number, delay?: number): boolean;
|
|
|
|
justPressed(pointerId?: number, delay?: number): boolean;
|
|
|
|
justReleased(pointerId?: number, delay?: number): boolean;
|
|
|
|
overDuration(pointerId?: number): number;
|
|
|
|
pointerDown(pointerId?: number): boolean;
|
|
|
|
pointerDragged(pointerId?: number): boolean;
|
|
|
|
pointerOut(pointerId?: number): boolean;
|
|
|
|
pointerOver(pointerId?: number): boolean;
|
|
|
|
pointerTimeDown(pointerId?: number): number;
|
|
|
|
pointerTimeOut(pointerId?: number): number;
|
|
|
|
pointerTimeOver(pointerId?: number): number;
|
|
|
|
pointerTimeUp(pointerId?: number): number;
|
|
|
|
pointerUp(pointerId?: number): boolean;
|
|
|
|
pointerX(pointerId?: number): number;
|
|
|
|
pointerY(pointerId?: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
reset(): void;
|
|
|
|
setDragLock(allowHorizontal?: boolean, allowVertical?: boolean): void;
|
|
|
|
start(priority: number, useHandCursor: boolean): Phaser.Sprite;
|
|
|
|
startDrag(pointer: Phaser.Pointer): void;
|
|
|
|
stop(): void;
|
|
|
|
stopDrag(pointer: Phaser.Pointer): void;
|
|
|
|
update(pointer: Phaser.Pointer): void;
|
|
|
|
updateDrag(pointer: Phaser.Pointer): boolean;
|
2014-07-18 12:31:20 +00:00
|
|
|
validForInput(highestID: number, highestRenderID: number, includePixelPerfect?: boolean): boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Key {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-04-19 08:11:26 +00:00
|
|
|
constructor(game: Phaser.Game, keycode: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
altKey: boolean;
|
|
|
|
ctrlKey: boolean;
|
|
|
|
duration: number;
|
2014-10-30 08:56:24 +00:00
|
|
|
enabled: boolean;
|
2014-09-01 15:55:02 +00:00
|
|
|
event: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
isDown: boolean;
|
|
|
|
isUp: boolean;
|
2014-11-14 20:16:46 +00:00
|
|
|
_justDown: boolean;
|
2014-11-13 13:01:58 +00:00
|
|
|
justDown: boolean;
|
2014-11-14 20:16:46 +00:00
|
|
|
_justUp: boolean;
|
2014-11-13 13:01:58 +00:00
|
|
|
justUp: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
keyCode: number;
|
|
|
|
onDown: Phaser.Signal;
|
2014-03-20 11:07:37 +00:00
|
|
|
onHoldCallback: Function;
|
2014-09-01 15:55:02 +00:00
|
|
|
onHoldContext: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
onUp: Phaser.Signal;
|
|
|
|
repeats: number;
|
|
|
|
shiftKey: boolean;
|
|
|
|
timeDown: number;
|
|
|
|
timeUp: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-11-13 13:01:58 +00:00
|
|
|
downDuration(duration?: number): boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
processKeyDown(event: KeyboardEvent): void;
|
|
|
|
processKeyUp(event: KeyboardEvent): void;
|
2014-04-19 08:05:43 +00:00
|
|
|
reset(hard?: boolean): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
update(): void;
|
2014-11-13 13:01:58 +00:00
|
|
|
upDuration(duration?: number): boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Keyboard {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
static A: number;
|
|
|
|
static B: number;
|
|
|
|
static C: number;
|
|
|
|
static D: number;
|
|
|
|
static E: number;
|
|
|
|
static F: number;
|
|
|
|
static G: number;
|
|
|
|
static H: number;
|
|
|
|
static I: number;
|
|
|
|
static J: number;
|
|
|
|
static K: number;
|
|
|
|
static L: number;
|
|
|
|
static M: number;
|
|
|
|
static N: number;
|
|
|
|
static O: number;
|
|
|
|
static P: number;
|
|
|
|
static Q: number;
|
|
|
|
static R: number;
|
|
|
|
static S: number;
|
|
|
|
static T: number;
|
|
|
|
static U: number;
|
|
|
|
static V: number;
|
|
|
|
static W: number;
|
|
|
|
static X: number;
|
|
|
|
static Y: number;
|
|
|
|
static Z: number;
|
|
|
|
static ZERO: number;
|
|
|
|
static ONE: number;
|
|
|
|
static TWO: number;
|
|
|
|
static THREE: number;
|
|
|
|
static FOUR: number;
|
|
|
|
static FIVE: number;
|
|
|
|
static SIX: number;
|
|
|
|
static SEVEN: number;
|
|
|
|
static EIGHT: number;
|
|
|
|
static NINE: number;
|
|
|
|
static NUMPAD_0: number;
|
|
|
|
static NUMPAD_1: number;
|
|
|
|
static NUMPAD_2: number;
|
|
|
|
static NUMPAD_3: number;
|
|
|
|
static NUMPAD_4: number;
|
|
|
|
static NUMPAD_5: number;
|
|
|
|
static NUMPAD_6: number;
|
|
|
|
static NUMPAD_7: number;
|
|
|
|
static NUMPAD_8: number;
|
|
|
|
static NUMPAD_9: number;
|
|
|
|
static NUMPAD_MULTIPLY: number;
|
|
|
|
static NUMPAD_ADD: number;
|
|
|
|
static NUMPAD_ENTER: number;
|
|
|
|
static NUMPAD_SUBTRACT: number;
|
|
|
|
static NUMPAD_DECIMAL: number;
|
|
|
|
static NUMPAD_DIVIDE: number;
|
|
|
|
static F1: number;
|
|
|
|
static F2: number;
|
|
|
|
static F3: number;
|
|
|
|
static F4: number;
|
|
|
|
static F5: number;
|
|
|
|
static F6: number;
|
|
|
|
static F7: number;
|
|
|
|
static F8: number;
|
|
|
|
static F9: number;
|
|
|
|
static F10: number;
|
|
|
|
static F11: number;
|
|
|
|
static F12: number;
|
|
|
|
static F13: number;
|
|
|
|
static F14: number;
|
|
|
|
static F15: number;
|
|
|
|
static COLON: number;
|
|
|
|
static EQUALS: number;
|
2015-07-09 13:31:18 +00:00
|
|
|
static COMMA: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
static UNDERSCORE: number;
|
2015-07-09 13:31:18 +00:00
|
|
|
static PERIOD: number;
|
2014-01-07 09:58:00 +00:00
|
|
|
static QUESTION_MARK: number;
|
|
|
|
static TILDE: number;
|
|
|
|
static OPEN_BRACKET: number;
|
|
|
|
static BACKWARD_SLASH: number;
|
|
|
|
static CLOSED_BRACKET: number;
|
|
|
|
static QUOTES: number;
|
|
|
|
static BACKSPACE: number;
|
|
|
|
static TAB: number;
|
|
|
|
static CLEAR: number;
|
|
|
|
static ENTER: number;
|
|
|
|
static SHIFT: number;
|
|
|
|
static CONTROL: number;
|
|
|
|
static ALT: number;
|
|
|
|
static CAPS_LOCK: number;
|
|
|
|
static ESC: number;
|
|
|
|
static SPACEBAR: number;
|
|
|
|
static PAGE_UP: number;
|
|
|
|
static PAGE_DOWN: number;
|
|
|
|
static END: number;
|
|
|
|
static HOME: number;
|
|
|
|
static LEFT: number;
|
|
|
|
static UP: number;
|
|
|
|
static RIGHT: number;
|
|
|
|
static DOWN: number;
|
|
|
|
static INSERT: number;
|
|
|
|
static DELETE: number;
|
|
|
|
static HELP: number;
|
|
|
|
static NUM_LOCK: number;
|
2014-11-24 15:53:47 +00:00
|
|
|
static PLUS: number;
|
|
|
|
static MINUS: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
callbackContext: any;
|
2014-11-05 15:20:08 +00:00
|
|
|
enabled: boolean;
|
2014-09-01 15:55:02 +00:00
|
|
|
event: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
lastChar: string;
|
2014-08-30 04:28:55 +00:00
|
|
|
lastKey: Phaser.Key;
|
2014-02-26 01:32:38 +00:00
|
|
|
onDownCallback: Function;
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
onPressCallback: Function;
|
2014-02-26 01:32:38 +00:00
|
|
|
onUpCallback: Function;
|
2014-09-01 15:55:02 +00:00
|
|
|
pressEvent: any;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
addCallbacks(context: any, onDown?: Function, onUp?: Function, onPress?: Function): void;
|
2014-01-16 14:46:12 +00:00
|
|
|
addKey(keycode: number): Phaser.Key;
|
2015-08-27 08:21:39 +00:00
|
|
|
addKeys(keys: any): any;
|
2014-01-07 09:58:00 +00:00
|
|
|
addKeyCapture(keycode: any): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
createCursorKeys(): Phaser.CursorKeys;
|
2014-03-20 11:07:37 +00:00
|
|
|
clearCaptures(): void;
|
2014-03-28 16:58:23 +00:00
|
|
|
destroy(): void;
|
2014-11-24 15:53:47 +00:00
|
|
|
downDuration(keycode: number, duration?: number): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
isDown(keycode: number): boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
processKeyDown(event: KeyboardEvent): void;
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
processKeyPress(event: KeyboardEvent): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
processKeyUp(event: KeyboardEvent): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
removeKey(keycode: number): void;
|
|
|
|
removeKeyCapture(keycode: number): void;
|
2014-04-19 08:05:43 +00:00
|
|
|
reset(hard?: boolean): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
start(): void;
|
|
|
|
stop(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
update(): void;
|
2014-11-24 15:53:47 +00:00
|
|
|
upDuration(keycode: number, duration?: number): boolean;
|
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2016-02-02 23:30:03 +00:00
|
|
|
class KeyCode {
|
|
|
|
|
|
|
|
static A: number;
|
|
|
|
static B: number;
|
|
|
|
static C: number;
|
|
|
|
static D: number;
|
|
|
|
static E: number;
|
|
|
|
static F: number;
|
|
|
|
static G: number;
|
|
|
|
static H: number;
|
|
|
|
static I: number;
|
|
|
|
static J: number;
|
|
|
|
static K: number;
|
|
|
|
static L: number;
|
|
|
|
static M: number;
|
|
|
|
static N: number;
|
|
|
|
static O: number;
|
|
|
|
static P: number;
|
|
|
|
static Q: number;
|
|
|
|
static R: number;
|
|
|
|
static S: number;
|
|
|
|
static T: number;
|
|
|
|
static U: number;
|
|
|
|
static V: number;
|
|
|
|
static W: number;
|
|
|
|
static X: number;
|
|
|
|
static Y: number;
|
|
|
|
static Z: number;
|
|
|
|
static ZERO: number;
|
|
|
|
static ONE: number;
|
|
|
|
static TWO: number;
|
|
|
|
static THREE: number;
|
|
|
|
static FOUR: number;
|
|
|
|
static FIVE: number;
|
|
|
|
static SIX: number;
|
|
|
|
static SEVEN: number;
|
|
|
|
static EIGHT: number;
|
|
|
|
static NINE: number;
|
|
|
|
static NUMPAD_0: number;
|
|
|
|
static NUMPAD_1: number;
|
|
|
|
static NUMPAD_2: number;
|
|
|
|
static NUMPAD_3: number;
|
|
|
|
static NUMPAD_4: number;
|
|
|
|
static NUMPAD_5: number;
|
|
|
|
static NUMPAD_6: number;
|
|
|
|
static NUMPAD_7: number;
|
|
|
|
static NUMPAD_8: number;
|
|
|
|
static NUMPAD_9: number;
|
|
|
|
static NUMPAD_MULTIPLY: number;
|
|
|
|
static NUMPAD_ADD: number;
|
|
|
|
static NUMPAD_ENTER: number;
|
|
|
|
static NUMPAD_SUBTRACT: number;
|
|
|
|
static NUMPAD_DECIMAL: number;
|
|
|
|
static NUMPAD_DIVIDE: number;
|
|
|
|
static F1: number;
|
|
|
|
static F2: number;
|
|
|
|
static F3: number;
|
|
|
|
static F4: number;
|
|
|
|
static F5: number;
|
|
|
|
static F6: number;
|
|
|
|
static F7: number;
|
|
|
|
static F8: number;
|
|
|
|
static F9: number;
|
|
|
|
static F10: number;
|
|
|
|
static F11: number;
|
|
|
|
static F12: number;
|
|
|
|
static F13: number;
|
|
|
|
static F14: number;
|
|
|
|
static F15: number;
|
|
|
|
static COLON: number;
|
|
|
|
static EQUALS: number;
|
|
|
|
static COMMA: number;
|
|
|
|
static UNDERSCORE: number;
|
|
|
|
static PERIOD: number;
|
|
|
|
static QUESTION_MARK: number;
|
|
|
|
static TILDE: number;
|
|
|
|
static OPEN_BRACKET: number;
|
|
|
|
static BACKWARD_SLASH: number;
|
|
|
|
static CLOSED_BRACKET: number;
|
|
|
|
static QUOTES: number;
|
|
|
|
static BACKSPACE: number;
|
|
|
|
static TAB: number;
|
|
|
|
static CLEAR: number;
|
|
|
|
static ENTER: number;
|
|
|
|
static SHIFT: number;
|
|
|
|
static CONTROL: number;
|
|
|
|
static ALT: number;
|
|
|
|
static CAPS_LOCK: number;
|
|
|
|
static ESC: number;
|
|
|
|
static SPACEBAR: number;
|
|
|
|
static PAGE_UP: number;
|
|
|
|
static PAGE_DOWN: number;
|
|
|
|
static END: number;
|
|
|
|
static HOME: number;
|
|
|
|
static LEFT: number;
|
|
|
|
static UP: number;
|
|
|
|
static RIGHT: number;
|
|
|
|
static DOWN: number;
|
|
|
|
static INSERT: number;
|
|
|
|
static DELETE: number;
|
|
|
|
static HELP: number;
|
|
|
|
static NUM_LOCK: number;
|
|
|
|
static PLUS: number;
|
|
|
|
static MINUS: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Line {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(x1?: number, y1?: number, x2?: number, y2?: number);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
angle: number;
|
|
|
|
end: Phaser.Point;
|
2014-03-20 11:07:37 +00:00
|
|
|
height: number;
|
|
|
|
left: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
length: number;
|
2015-01-05 11:02:25 +00:00
|
|
|
normalAngle: number;
|
|
|
|
normalX: number;
|
|
|
|
normalY: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
perpSlope: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
right: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
slope: number;
|
|
|
|
start: Phaser.Point;
|
2014-03-20 11:07:37 +00:00
|
|
|
top: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
type: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
width: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
static intersectsPoints(a: Phaser.Point, b: Phaser.Point, e: Phaser.Point, f: Phaser.Point, asSegment?: boolean, result?: Phaser.Point): Phaser.Point;
|
|
|
|
static intersects(a: Phaser.Line, b: Phaser.Line, asSegment?: boolean, result?: Phaser.Point): Phaser.Point;
|
2015-01-05 11:02:25 +00:00
|
|
|
static reflect(a: Phaser.Line, b: Phaser.Line): number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-08-07 00:40:37 +00:00
|
|
|
centerOn(x: number, y: number): Phaser.Line;
|
2014-09-10 23:02:23 +00:00
|
|
|
clone(output: Phaser.Line): Phaser.Line;
|
2014-03-20 11:07:37 +00:00
|
|
|
coordinatesOnLine(stepRate: number, results: any[]): any[];
|
2015-01-05 11:02:25 +00:00
|
|
|
fromAngle(x: number, y: number, angle: number, length: number): Phaser.Line;
|
2014-02-26 01:32:38 +00:00
|
|
|
fromSprite(startSprite: Phaser.Sprite, endSprite: Phaser.Sprite, useCenter?: boolean): Phaser.Line;
|
|
|
|
intersects(line: Phaser.Line, asSegment?: boolean, result?: Phaser.Point): Phaser.Point;
|
2015-08-06 16:10:39 +00:00
|
|
|
midPoint(out?: Phaser.Point): Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
pointOnLine(x: number, y: number): boolean;
|
|
|
|
pointOnSegment(x: number, y: number): boolean;
|
2015-06-13 02:04:02 +00:00
|
|
|
random(out?: Phaser.Point): Phaser.Point;
|
2015-01-05 11:02:25 +00:00
|
|
|
reflect(line: Phaser.Line): number;
|
2015-06-13 04:20:43 +00:00
|
|
|
rotate(angle: number, asDegrees?: boolean): Phaser.Line;
|
2015-08-07 00:35:31 +00:00
|
|
|
rotateAround(x: number, y: number, angle: number, asDegrees?: boolean): Phaser.Line;
|
2014-02-26 01:32:38 +00:00
|
|
|
setTo(x1?: number, y1?: number, x2?: number, y2?: number): Phaser.Line;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-11-16 22:10:48 +00:00
|
|
|
class LinkedList {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-11-16 22:10:48 +00:00
|
|
|
first: any;
|
|
|
|
last: any;
|
|
|
|
next: any;
|
|
|
|
prev: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
total: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-11-16 22:10:48 +00:00
|
|
|
add(item: any): any;
|
2014-02-26 01:32:38 +00:00
|
|
|
callAll(callback: Function): void;
|
2014-11-16 22:10:48 +00:00
|
|
|
remove(item: any): void;
|
2014-04-23 07:26:26 +00:00
|
|
|
reset(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Loader {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-04-03 19:13:35 +00:00
|
|
|
static PHYSICS_LIME_CORONA_JSON: number;
|
|
|
|
static PHYSICS_PHASER_JSON: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
static TEXTURE_ATLAS_JSON_ARRAY: number;
|
|
|
|
static TEXTURE_ATLAS_JSON_HASH: number;
|
|
|
|
static TEXTURE_ATLAS_XML_STARLING: number;
|
2016-02-02 23:30:03 +00:00
|
|
|
static TEXTURE_ATLAS_JSON_PYXEL: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
baseURL: string;
|
2015-07-17 00:08:45 +00:00
|
|
|
cache: Phaser.Cache;
|
2015-10-06 14:30:54 +00:00
|
|
|
crossOrigin: boolean | string;
|
2015-02-11 22:24:47 +00:00
|
|
|
enableParallel: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
hasLoaded: boolean;
|
|
|
|
isLoading: boolean;
|
2015-02-11 22:24:47 +00:00
|
|
|
maxParallelDownloads: number;
|
2014-04-19 08:05:43 +00:00
|
|
|
onFileStart: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
onFileComplete: Phaser.Signal;
|
|
|
|
onFileError: Phaser.Signal;
|
|
|
|
onLoadComplete: Phaser.Signal;
|
|
|
|
onLoadStart: Phaser.Signal;
|
2014-07-16 13:51:57 +00:00
|
|
|
onPackComplete: Phaser.Signal;
|
2015-07-12 22:35:38 +00:00
|
|
|
path: string;
|
2014-03-20 11:07:37 +00:00
|
|
|
preloadSprite: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
progress: number;
|
|
|
|
progressFloat: number;
|
2015-02-11 22:24:47 +00:00
|
|
|
resetLocked: boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
useXDomainRequest: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
asyncComplete(file: any, errorMessage?: string): void;
|
|
|
|
addSyncPoint(type: string, key: string): Phaser.Loader;
|
2015-04-24 16:16:31 +00:00
|
|
|
addToFileList(type: string, key: string, url?: string, properties?: any, overwrite?: boolean, extension?: string): Phaser.Loader;
|
|
|
|
atlas(key: string, textureURL?: string, atlasURL?: string, atlasData?: any, format?: number): Phaser.Loader;
|
|
|
|
atlasJSONArray(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;
|
2015-10-06 14:30:54 +00:00
|
|
|
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;
|
2015-04-24 16:16:31 +00:00
|
|
|
binary(key: string, url?: string, callback?: Function, callbackContext?: any): Phaser.Loader;
|
2015-06-23 20:50:27 +00:00
|
|
|
bitmapFont(key: string, textureURL?: string, atlasURL?: string, atlasData?: any, xSpacing?: number, ySpacing?: number): Phaser.Loader;
|
2014-02-26 01:32:38 +00:00
|
|
|
checkKeyExists(type: string, key: string): boolean;
|
2015-02-11 22:24:47 +00:00
|
|
|
csvLoadComplete(file: any, xhr: XMLHttpRequest): void;
|
|
|
|
fileComplete(file: any, xhr: XMLHttpRequest): void;
|
|
|
|
fileError(file: any, xhr: XMLHttpRequest, reason: string): void;
|
|
|
|
finishedLoading(abnormal?: boolean): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
getAsset(type: string, key: string): any;
|
2014-03-20 11:07:37 +00:00
|
|
|
getAssetIndex(type: string, key: string): number;
|
2015-02-11 22:24:47 +00:00
|
|
|
getAudioURL(urls: any[]): void;
|
2015-04-24 16:16:31 +00:00
|
|
|
image(key: string, url?: string, overwrite?: boolean): Phaser.Loader;
|
2015-07-30 14:01:52 +00:00
|
|
|
images(keys: string[], urls?: string[]): Phaser.Loader;
|
2015-04-24 16:16:31 +00:00
|
|
|
json(key: string, url?: string, overwrite?: boolean): Phaser.Loader;
|
2015-02-11 22:24:47 +00:00
|
|
|
jsonLoadComplete(file: any, xhr: XMLHttpRequest): void;
|
|
|
|
loadAudioTag(file: any): void;
|
|
|
|
loadFile(file: any): void;
|
|
|
|
loadImageTag(file: any): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
pack(key: string, url?: string, data?: any, callbackContext?: any): Phaser.Loader;
|
2015-02-11 22:24:47 +00:00
|
|
|
parseXml(data: string): XMLDocument;
|
2014-09-01 15:55:02 +00:00
|
|
|
physics(key: string, url?: string, data?: any, format?: string): Phaser.Loader;
|
2015-02-11 22:24:47 +00:00
|
|
|
processLoadQueue(): void;
|
|
|
|
processPack(pack: any): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
removeAll(): void;
|
2015-02-11 22:24:47 +00:00
|
|
|
removeFile(type: string, key: string): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
replaceInFileList(type: string, key: string, url: string, properties: any): void;
|
2015-02-11 22:24:47 +00:00
|
|
|
reset(hard?: boolean, clearEvents?: boolean): void;
|
2014-11-14 20:16:46 +00:00
|
|
|
resize(): void;
|
2015-04-24 16:16:31 +00:00
|
|
|
script(key: string, url?: String, callback?: Function, callbackContext?: any): Phaser.Loader;
|
2015-07-15 22:22:51 +00:00
|
|
|
shader(key: string, url?: String, overwrite?: boolean): Phaser.Loader;
|
2015-10-06 14:30:54 +00:00
|
|
|
setPreloadSprite(sprite: Phaser.Sprite | Phaser.Image, direction?: number): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
spritesheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): Phaser.Loader;
|
|
|
|
start(): void;
|
2015-04-24 16:16:31 +00:00
|
|
|
text(key: string, url?: string, overwrite?: boolean): Phaser.Loader;
|
2014-09-01 15:55:02 +00:00
|
|
|
tilemap(key: string, url?: string, data?: any, format?: number): Phaser.Loader;
|
2014-02-26 01:32:38 +00:00
|
|
|
totalLoadedFiles(): number;
|
2014-05-29 16:05:13 +00:00
|
|
|
totalLoadedPacks(): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
totalQueuedFiles(): number;
|
2014-05-29 16:05:13 +00:00
|
|
|
totalQueuedPacks(): number;
|
2015-07-17 00:08:45 +00:00
|
|
|
transformUrl(url: string, file?: any): string;
|
2015-02-11 22:24:47 +00:00
|
|
|
updateProgress(): void;
|
2015-10-06 14:30:54 +00:00
|
|
|
video(key: string, urls: string | string[] | any, loadEvent?: string, asBlob?: boolean): Phaser.Loader;
|
2015-02-11 22:24:47 +00:00
|
|
|
withSyncPoint(callback: Function, callbackContext?: any): Phaser.Loader;
|
2015-04-24 16:16:31 +00:00
|
|
|
xml(key: string, url?: string, overwrite?: boolean): Phaser.Loader;
|
2015-02-11 22:24:47 +00:00
|
|
|
xhrLoad(file: any, url: string, type: string, onload: Function, onerror?: Function): void;
|
|
|
|
xhrLoadWithXDR(file: any, url: string, type: string, onload: Function, onerror?: Function): void;
|
|
|
|
xmlLoadComplete(file: any, xhr: XMLHttpRequest): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class LoaderParser {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-07-17 00:08:45 +00:00
|
|
|
static bitmapFont(xml: any, baseTexture: PIXI.BaseTexture, xSpacing?: number, ySpacing?: number): any;
|
|
|
|
static xmlBitmapFont(xml: any, baseTexture: PIXI.BaseTexture, xSpacing?: number, ySpacing?: number): any;
|
|
|
|
static jsonBitmapFont(json: any, baseTexture: PIXI.BaseTexture, xSpacing?: number, ySpacing?: number): any;
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2015-02-24 01:22:13 +00:00
|
|
|
class Matrix extends PIXI.Matrix {
|
|
|
|
|
|
|
|
a: number;
|
|
|
|
b: number;
|
|
|
|
c: number;
|
|
|
|
d: number;
|
|
|
|
tx: number;
|
|
|
|
ty: number;
|
|
|
|
type: number;
|
|
|
|
|
2015-04-24 16:16:31 +00:00
|
|
|
constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number);
|
|
|
|
|
2015-02-24 01:22:13 +00:00
|
|
|
apply(pos: Phaser.Point, newPos?: Phaser.Point): Phaser.Point;
|
|
|
|
applyInverse(pos: Phaser.Point, newPos?: Phaser.Point): Phaser.Point;
|
2015-04-24 16:16:31 +00:00
|
|
|
clone(output?: Phaser.Matrix): Phaser.Matrix;
|
|
|
|
copyFrom(matrix: Phaser.Matrix): Phaser.Matrix;
|
|
|
|
copyTo(matrix: Phaser.Matrix): Phaser.Matrix;
|
|
|
|
fromArray(array: number[]): Phaser.Matrix;
|
|
|
|
setTo(a: number, b: number, c: number, d: number, tx: number, ty: number): Phaser.Matrix;
|
|
|
|
toArray(transpose?: boolean, array?: number[]): number[];
|
2015-02-24 01:22:13 +00:00
|
|
|
translate(x: number, y: number): Phaser.Matrix;
|
|
|
|
scale(x: number, y: number): Phaser.Matrix;
|
|
|
|
rotate(angle: number): Phaser.Matrix;
|
|
|
|
append(matrix: Phaser.Matrix): Phaser.Matrix;
|
|
|
|
identity(): Phaser.Matrix;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Math {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
static angleBetween(x1: number, y1: number, x2: number, y2: number): number;
|
2014-03-03 23:46:24 +00:00
|
|
|
static angleBetweenPoints(point1: Phaser.Point, point2: Phaser.Point): number;
|
2014-09-10 23:02:23 +00:00
|
|
|
static angleBetweenY(x1: number, y1: number, x2: number, y2: number): number;
|
|
|
|
static angleBetweenPointsY(point1: Phaser.Point, point2: Phaser.Point): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
static average(...numbers: number[]): number;
|
|
|
|
static bernstein(n: number, i: number): number;
|
|
|
|
static bezierInterpolation(v: number[], k: number): number;
|
|
|
|
static catmullRom(p0: number, p1: number, p2: number, p3: number, t: number): number;
|
|
|
|
static catmullRomInterpolation(v: number[], k: number): number;
|
|
|
|
static ceilTo(value: number, place?: number, base?: number): number;
|
|
|
|
static clamp(x: number, a: number, b: number): number;
|
|
|
|
static clampBottom(x: number, a: number): number;
|
|
|
|
static degToRad(degrees: number): number;
|
|
|
|
static difference(a: number, b: number): number;
|
|
|
|
static distance(x1: number, y1: number, x2: number, y2: number): number;
|
2015-05-25 16:08:07 +00:00
|
|
|
static distanceSq(x1: number, y1: number, x2: number, y2: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
static distancePow(xy: number, y1: number, x2: number, y2: number, pow?: number): number;
|
2014-07-01 21:42:36 +00:00
|
|
|
static factorial(value: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
static floorTo(value: number, place: number, base: number): number;
|
|
|
|
static fuzzyCeil(val: number, epsilon?: number): boolean;
|
|
|
|
static fuzzyEqual(a: number, b: number, epsilon?: number): boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
static fuzzyLessThan(a: Number, b: number, epsilon?: number): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
static fuzzyFloor(val: number, epsilon?: number): boolean;
|
|
|
|
static fuzzyGreaterThan(a: number, b: number, epsilon?: number): boolean;
|
|
|
|
static fuzzyLessThan(a: number, b: number, epsilon?: number): boolean;
|
|
|
|
static isEven(n: number): boolean;
|
|
|
|
static isOdd(n: number): boolean;
|
|
|
|
static linear(p0: number, p1: number, t: number): number;
|
|
|
|
static linearInterpolation(v: number[], k: number): number;
|
|
|
|
static mapLinear(x: number, a1: number, a2: number, b1: number, b2: number): number;
|
|
|
|
static max(...numbers: number[]): number;
|
|
|
|
static maxAdd(value: number, amount: number, max: number): number;
|
|
|
|
static maxProperty(...numbers: number[]): number;
|
|
|
|
static min(...numbers: number[]): number;
|
|
|
|
static minProperty(...numbers: number[]): number;
|
|
|
|
static minSub(value: number, amount: number, min: number): number;
|
|
|
|
static normalizeAngle(angle: number, radians?: boolean): number;
|
2014-05-14 14:54:40 +00:00
|
|
|
static percent(a: number, b: number, base?: number): number;
|
2014-03-03 23:46:24 +00:00
|
|
|
static p2px(v: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
static PI2: number;
|
|
|
|
static radToDeg(radians: number): number;
|
|
|
|
static reverseAngle(angleRed: number): number;
|
2015-01-27 12:14:06 +00:00
|
|
|
static roundAwayFromZero(value: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
static roundTo(value: number, place?: number, base?: number): number;
|
|
|
|
static shear(n: number): number;
|
|
|
|
static sign(x: number): number;
|
|
|
|
static sinCosGenerator(length: number, sinAmplitude?: number, cosAmplitude?: number, frequency?: number): { sin: number[]; cos: number[]; };
|
|
|
|
static smootherstep(x: number, min: number, max: number): number;
|
|
|
|
static smoothstep(x: number, min: number, max: number): number;
|
|
|
|
static snapTo(input: number, gap: number, start?: number): number;
|
|
|
|
static snapToCeil(input: number, gap: number, start?: number): number;
|
|
|
|
static snapToFloor(input: number, gap: number, start?: number): number;
|
|
|
|
static within(a: number, b: number, tolerance: number): boolean;
|
|
|
|
static wrap(value: number, min: number, max: number): number;
|
2014-04-26 00:34:19 +00:00
|
|
|
static wrapAngle(angle: number, radians?: boolean): number;
|
|
|
|
static wrapValue(value: number, amount: number, max: number): number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-11-14 20:16:46 +00:00
|
|
|
interface WheelEventProxy {
|
|
|
|
|
|
|
|
bindEvent(event: any): WheelEventProxy;
|
|
|
|
|
|
|
|
type: string;
|
|
|
|
deltaMode: number;
|
|
|
|
deltaX: number;
|
|
|
|
deltaY: number;
|
|
|
|
deltaZ: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Mouse {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-04-19 08:11:26 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-07-20 20:36:36 +00:00
|
|
|
static NO_BUTTON: number;
|
|
|
|
static LEFT_BUTTON: number;
|
|
|
|
static MIDDLE_BUTTON: number;
|
|
|
|
static RIGHT_BUTTON: number;
|
|
|
|
static BACK_BUTTON: number;
|
|
|
|
static FORWARD_BUTTON: number;
|
2014-07-01 21:42:36 +00:00
|
|
|
static WHEEL_DOWN: number;
|
|
|
|
static WHEEL_UP: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
button: number;
|
2014-09-01 15:55:02 +00:00
|
|
|
callbackContext: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
capture: boolean;
|
2014-11-05 15:20:08 +00:00
|
|
|
enabled: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
event: MouseEvent;
|
|
|
|
game: Phaser.Game;
|
2015-07-20 20:36:36 +00:00
|
|
|
input: Phaser.Input;
|
2014-02-26 01:32:38 +00:00
|
|
|
locked: boolean;
|
2014-11-14 20:16:46 +00:00
|
|
|
mouseDownCallback: (event: MouseEvent) => void;
|
|
|
|
mouseOutCallback: (event: MouseEvent) => void;
|
|
|
|
mouseOverCallback: (event: MouseEvent) => void;
|
|
|
|
mouseUpCallback: (event: MouseEvent) => void;
|
|
|
|
mouseWheelCallback: (event: MouseEvent) => void;
|
|
|
|
_onMouseDown: (event: MouseEvent) => void;
|
|
|
|
_onMouseMove: (event: MouseEvent) => void;
|
|
|
|
_onMouseUp: (event: MouseEvent) => void;
|
|
|
|
_onMouseOut: (event: MouseEvent) => void;
|
|
|
|
_onMouseOver: (event: MouseEvent) => void;
|
|
|
|
_onMouseWheel: (event: MouseEvent) => void;
|
|
|
|
_wheelEvent: WheelEventProxy;
|
2014-02-26 01:32:38 +00:00
|
|
|
pointerLock: Phaser.Signal;
|
2014-05-19 23:08:39 +00:00
|
|
|
stopOnGameOut: boolean;
|
2015-01-12 17:46:55 +00:00
|
|
|
wheelDelta: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
onMouseDown(event: MouseEvent): void;
|
|
|
|
onMouseMove(event: MouseEvent): void;
|
2014-05-19 21:33:36 +00:00
|
|
|
onMouseOut(event: MouseEvent): void;
|
|
|
|
onMouseOver(event: MouseEvent): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
onMouseUp(event: MouseEvent): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
onMouseUpGlobal(event: MouseEvent): void;
|
2014-07-01 21:42:36 +00:00
|
|
|
onMouseWheel(event: MouseEvent): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
pointerLockChange(event: MouseEvent): void;
|
2014-01-07 09:58:00 +00:00
|
|
|
releasePointerLock(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
requestPointerLock(): void;
|
|
|
|
start(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
stop(): void;
|
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class MSPointer {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
button: number;
|
|
|
|
capture: boolean;
|
2014-09-01 15:55:02 +00:00
|
|
|
callbackContext: any;
|
2015-02-11 22:24:47 +00:00
|
|
|
event: MSPointerEvent;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2015-07-20 20:36:36 +00:00
|
|
|
input: Phaser.Input;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
onPointerDown: (event: MSPointerEvent) => void;
|
|
|
|
onPointerMove: (event: MSPointerEvent) => void;
|
|
|
|
onPointerUp: (event: MSPointerEvent) => void;
|
|
|
|
mouseDownCallback: (event: MSPointerEvent) => void;
|
|
|
|
mouseMoveCallback: (event: MSPointerEvent) => void;
|
|
|
|
mouseUpCallback: (event: MSPointerEvent) => void;
|
|
|
|
pointerDownCallback: (event: MSPointerEvent) => void;
|
|
|
|
pointerMoveCallback: (event: MSPointerEvent) => void;
|
|
|
|
pointerUpCallback: (event: MSPointerEvent) => void;
|
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
start(): void;
|
|
|
|
stop(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Net {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
game: Phaser.Game;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
checkDomainName(domain: string): boolean;
|
|
|
|
decodeURI(value: string): string;
|
|
|
|
getHostName(): string;
|
|
|
|
getQueryString(parameter?: string): string;
|
2014-03-03 23:46:24 +00:00
|
|
|
updateQueryString(key: string, value: any, redirect?: boolean, url?: string): string;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-04-19 08:05:43 +00:00
|
|
|
class Particle extends Phaser.Sprite {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, x: number, y: number, key?: any, frame?: any);
|
|
|
|
|
2015-02-24 01:22:13 +00:00
|
|
|
fresh: boolean;
|
|
|
|
|
2014-04-19 08:05:43 +00:00
|
|
|
onEmit(): void;
|
|
|
|
reset(x: number, y: number, health?: number): Phaser.Particle;
|
|
|
|
setAlphaData(data: any[]): void;
|
|
|
|
setScaleData(data: any[]): void;
|
|
|
|
update(): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Particles {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
emitters: any;
|
2014-01-07 09:58:00 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
ID: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
add(emitter: Phaser.Particles.Arcade.Emitter): Phaser.Particles.Arcade.Emitter;
|
|
|
|
remove(emitter: Phaser.Particles.Arcade.Emitter): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
module Particles {
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
module Arcade {
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Emitter extends Phaser.Group {
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game, x?: number, y?: number, maxParticles?: number);
|
2014-04-19 08:05:43 +00:00
|
|
|
|
|
|
|
alphaData: any[];
|
|
|
|
autoAlpha: boolean;
|
|
|
|
autoScale: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
angle: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
angularDrag: number;
|
|
|
|
bottom: number;
|
|
|
|
bounce: Phaser.Point;
|
|
|
|
emitX: number;
|
|
|
|
emitY: number;
|
|
|
|
exists: boolean;
|
|
|
|
frequency: number;
|
|
|
|
gravity: number;
|
|
|
|
group: Phaser.Group;
|
|
|
|
height: number;
|
|
|
|
left: number;
|
|
|
|
lifespan: number;
|
2014-04-19 08:05:43 +00:00
|
|
|
maxParticles: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
maxParticleScale: number;
|
|
|
|
maxParticleSpeed: Phaser.Point;
|
|
|
|
maxRotation: number;
|
|
|
|
minParticleScale: number;
|
|
|
|
minParticleSpeed: Phaser.Point;
|
|
|
|
minRotation: number;
|
|
|
|
name: string;
|
|
|
|
on: boolean;
|
2014-04-19 08:05:43 +00:00
|
|
|
particleBringToTop: boolean;
|
|
|
|
particleSendToBack: boolean;
|
2016-02-01 16:30:33 +00:00
|
|
|
particleClass: any;
|
2014-03-20 11:07:37 +00:00
|
|
|
particleDrag: Phaser.Point;
|
2015-03-24 21:28:24 +00:00
|
|
|
physicsType: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
position: Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
right: number;
|
2014-04-19 08:05:43 +00:00
|
|
|
scaleData: any[];
|
2014-02-26 01:32:38 +00:00
|
|
|
top: number;
|
|
|
|
type: number;
|
|
|
|
width: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
|
2016-02-01 16:30:33 +00:00
|
|
|
at(object: any): Phaser.Particles.Arcade.Emitter;
|
2015-10-06 14:30:54 +00:00
|
|
|
emitParticle(x?: number, y?: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number): boolean;
|
2016-02-01 16:30:33 +00:00
|
|
|
explode(lifespan?: number, quantity?: number): Phaser.Particles.Arcade.Emitter;
|
|
|
|
flow(lifespan?: number, frequency?: number, quantity?: number, total?: number, immediate?: boolean): Phaser.Particles.Arcade.Emitter;
|
|
|
|
kill(): Phaser.Particles.Arcade.Emitter;
|
2014-04-28 13:23:44 +00:00
|
|
|
makeParticles(keys: any, frames?: any, quantity?: number, collide?: boolean, collideWorldBounds?: boolean): Phaser.Particles.Arcade.Emitter;
|
2014-04-19 08:05:43 +00:00
|
|
|
reset(x: number, y: number, health?: number): Phaser.Particles;
|
2016-02-01 16:30:33 +00:00
|
|
|
setAlpha(min?: number, max?: number, rate?: number, ease?: (k: number) => number, yoyo?: boolean): Phaser.Particles.Arcade.Emitter;
|
|
|
|
setRotation(min?: number, max?: number): Phaser.Particles.Arcade.Emitter;
|
|
|
|
setScale(minX?: number, maxX?: number, minY?: number, maxY?: number, rate?: number, ease?: (k: number) => number, yoyo?: boolean): Phaser.Particles.Arcade.Emitter;
|
|
|
|
setSize(width: number, height: number): Phaser.Particles.Arcade.Emitter;
|
|
|
|
setXSpeed(min: number, max: number): Phaser.Particles.Arcade.Emitter;
|
|
|
|
setYSpeed(min: number, max: number): Phaser.Particles.Arcade.Emitter;
|
|
|
|
start(explode?: boolean, lifespan?: number, frequency?: number, quantity?: number, forceQuantity?: boolean): Phaser.Particles.Arcade.Emitter;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(): void;
|
2016-02-01 16:30:33 +00:00
|
|
|
revive(): Phaser.Particles.Arcade.Emitter;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
2013-12-10 14:34:22 +00:00
|
|
|
}
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
2013-12-10 14:34:22 +00:00
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
class Physics {
|
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
constructor(game: Phaser.Game, config?: any);
|
2014-03-19 15:09:44 +00:00
|
|
|
|
|
|
|
static ARCADE: number;
|
|
|
|
static P2JS: number;
|
|
|
|
static NINJA: number;
|
|
|
|
static BOX2D: number;
|
|
|
|
static CHIPMUNK: number;
|
2015-04-24 16:16:31 +00:00
|
|
|
static MATTERJS: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
|
|
|
arcade: Phaser.Physics.Arcade;
|
2014-09-01 15:55:02 +00:00
|
|
|
config: any;
|
2014-03-19 15:09:44 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
ninja: Phaser.Physics.Ninja;
|
|
|
|
p2: Phaser.Physics.P2;
|
2015-04-24 16:16:31 +00:00
|
|
|
//todo box2d
|
|
|
|
box2d: any;
|
|
|
|
//todo chipmunk
|
|
|
|
//chipmunk: any;
|
|
|
|
//todo matter
|
|
|
|
//matter: any;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
|
|
|
clear(): void;
|
|
|
|
destroy(): void;
|
|
|
|
enable(object: any, system?: number, debug?: boolean): void;
|
|
|
|
parseConfig(): void;
|
|
|
|
preUpdate(): void;
|
2015-03-24 21:28:24 +00:00
|
|
|
reset(): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
setBoundsToWorld(): void;
|
|
|
|
startSystem(system: number): void;
|
|
|
|
update(): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-05-09 01:55:12 +00:00
|
|
|
export class Video {
|
|
|
|
|
|
|
|
game: Phaser.Game;
|
|
|
|
key: string;
|
|
|
|
video: HTMLVideoElement;
|
|
|
|
baseTexture: PIXI.BaseTexture;
|
|
|
|
texture: PIXI.Texture;
|
|
|
|
textureFrame: Phaser.Frame;
|
|
|
|
type: number;
|
|
|
|
disableTextureUpload: boolean;
|
|
|
|
dirty: boolean;
|
|
|
|
|
|
|
|
currentTime: number;
|
|
|
|
duration: number;
|
|
|
|
progress: number;
|
|
|
|
mute: boolean;
|
|
|
|
paused: boolean;
|
|
|
|
volume: boolean;
|
|
|
|
playbackRate: boolean;
|
|
|
|
playing: boolean;
|
|
|
|
loop: boolean;
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
videoStream: any;
|
2015-05-25 16:08:07 +00:00
|
|
|
isStreaming: boolean;
|
2015-05-09 01:55:12 +00:00
|
|
|
snapshot: Phaser.BitmapData;
|
2015-06-13 16:41:28 +00:00
|
|
|
timeout: number;
|
2015-06-11 05:01:29 +00:00
|
|
|
retryLimit: number;
|
|
|
|
retry: number;
|
|
|
|
retryInterval: number;
|
2015-05-09 01:55:12 +00:00
|
|
|
|
|
|
|
onAccess: Phaser.Signal;
|
|
|
|
onError: Phaser.Signal;
|
|
|
|
onPlay: Phaser.Signal;
|
|
|
|
onComplete: Phaser.Signal;
|
|
|
|
onUpdate: Phaser.Signal;
|
2015-06-13 16:41:28 +00:00
|
|
|
onTimeout: Phaser.Signal;
|
2015-05-09 01:55:12 +00:00
|
|
|
|
|
|
|
touchLocked: boolean;
|
|
|
|
complete: () => void;
|
|
|
|
|
2015-06-13 16:41:28 +00:00
|
|
|
constructor(game: Phaser.Game, key?: string, url?: string);
|
2015-05-09 01:55:12 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
add(object: Phaser.Sprite | Phaser.Sprite[] | Phaser.Image | Phaser.Image[]): Phaser.Video;
|
2015-05-09 01:55:12 +00:00
|
|
|
addToWorld(x?: number, y?: number, anchorX?: number, anchorY?: Number, scaleX?: number, scaleY?: number): Phaser.Image;
|
|
|
|
createVideoFromBlob(blob: Blob): Phaser.Video;
|
2015-06-09 23:59:24 +00:00
|
|
|
startMediaStream(captureAudio?: boolean, width?: number, height?: number): Phaser.Video;
|
2015-06-13 16:41:28 +00:00
|
|
|
createVideoFromURL(url: string, autoplay?: boolean): Phaser.Video;
|
2015-05-09 01:55:12 +00:00
|
|
|
changeSource(src: string, autoplay?: boolean): Phaser.Video;
|
2015-06-13 16:41:28 +00:00
|
|
|
connectToMediaStram(video: any, stream: any): Phaser.Video;
|
2015-05-09 01:55:12 +00:00
|
|
|
destroy(): void;
|
|
|
|
play(loop?: boolean, playbackRate?: number): Phaser.Video;
|
2015-05-25 16:08:07 +00:00
|
|
|
playHandler(): void;
|
2015-05-09 01:55:12 +00:00
|
|
|
render(): void;
|
2015-06-13 16:41:28 +00:00
|
|
|
removeVideoElement(): void;
|
2015-05-09 01:55:12 +00:00
|
|
|
resizeFrame(parent: any, width: number, height: number): void;
|
|
|
|
setTouchLock(): void;
|
|
|
|
grab(clear?: boolean, alpha?: number, blendMode?: string): Phaser.BitmapData;
|
|
|
|
stop(): void;
|
|
|
|
unlock(): boolean;
|
|
|
|
updateTexture(event?: any, width?: number, height?: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
module Physics {
|
2014-03-17 12:35:14 +00:00
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
class Arcade {
|
|
|
|
|
2015-03-24 21:28:24 +00:00
|
|
|
static SORT_NONE: number;
|
2015-03-03 21:14:25 +00:00
|
|
|
static LEFT_RIGHT: number;
|
|
|
|
static RIGHT_LEFT: number;
|
|
|
|
static TOP_BOTTOM: number;
|
|
|
|
static BOTTOM_TOP: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
static OVERLAP_BIAS: number;
|
|
|
|
static TILE_BIAS: number;
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game);
|
|
|
|
|
|
|
|
bounds: Phaser.Rectangle;
|
|
|
|
checkCollision: { up?: boolean; down?: boolean; left?: boolean; right?: boolean; };
|
2014-03-21 23:59:44 +00:00
|
|
|
forceX: boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
gravity: Phaser.Point;
|
|
|
|
quadTree: Phaser.QuadTree;
|
|
|
|
maxObjects: number;
|
|
|
|
maxLevels: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
skipQuadTree: boolean;
|
2015-03-03 21:14:25 +00:00
|
|
|
sortDirection: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
|
|
|
accelerationFromRotation(rotation: number, speed?: number, point?: Phaser.Point): Phaser.Point;
|
|
|
|
accelerateToObject(displayObject: any, destination: any, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number;
|
|
|
|
accelerateToPointer(displayObject: any, pointer?: Phaser.Pointer, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number;
|
|
|
|
accelerateToXY(displayObject: any, x: number, y: number, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number;
|
|
|
|
angleBetween(source: any, target: any): number;
|
|
|
|
angleToPointer(displayObject: any, pointer?: Phaser.Pointer): number;
|
|
|
|
angleToXY(displayObject: any, x: number, y: number): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
collide(object1: any, object2: any, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
computeVelocity(axis: number, body: Phaser.Physics.Arcade.Body, velocity: number, acceleration: number, drag: number, max?: number): number;
|
|
|
|
distanceBetween(source: any, target: any): number;
|
|
|
|
distanceToPointer(displayObject: any, pointer?: Phaser.Pointer): number;
|
|
|
|
distanceToXY(displayObject: any, x: number, y: number): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
enable(object: any, children?: Boolean): void;
|
|
|
|
enableBody(object: any): void;
|
2014-11-16 22:10:48 +00:00
|
|
|
getObjectsAtLocation(x: number, y: number, group: Phaser.Group, callback?: (callbackArg: any, object: any) => void, callbackContext?: any, callbackArg?: any): Sprite[];
|
2014-03-21 23:59:44 +00:00
|
|
|
intersects(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body): boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
moveToObject(displayObject: any, destination: any, speed?: number, maxTime?: number): number;
|
|
|
|
moveToPointer(displayObject: any, speed?: number, pointer?: Phaser.Pointer, maxTime?: number): number;
|
|
|
|
moveToXY(displayObject: any, x: number, y: number, speed?: number, maxTime?: number): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
overlap(object1: any, object2: any, overlapCallback?: Function, processCallback?: Function, callbackContext?: any): boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
processTileSeparationX(body: Phaser.Physics.Arcade.Body, x: number): boolean;
|
|
|
|
processTileSeparationY(body: Phaser.Physics.Arcade.Body, y: number): void;
|
|
|
|
setBounds(x: number, y: number, width: number, height: number): void;
|
|
|
|
setBoundsToWorld(): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
separate(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, processCallback?: Function, callbackContext?: any, overlapOnly?: boolean): boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
separateX(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean): boolean;
|
|
|
|
separateY(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean): boolean;
|
|
|
|
separateTile(i: number, body: Phaser.Physics.Arcade.Body, tile: Phaser.Tile): boolean;
|
2015-03-03 21:14:25 +00:00
|
|
|
sort(group: Phaser.Group): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
tileCheckX(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tile): number;
|
|
|
|
tileCheckY(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tile): number;
|
|
|
|
updateMotion(body: Phaser.Physics.Arcade.Body): void;
|
|
|
|
velocityFromAngle(angle: number, speed?: number, point?: Phaser.Point): Phaser.Point;
|
|
|
|
velocityFromRotation(rotation: number, speed?: number, point?: Phaser.Point): Phaser.Point;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module Arcade {
|
|
|
|
|
|
|
|
class Body {
|
|
|
|
|
|
|
|
constructor(sprite: Phaser.Sprite);
|
|
|
|
|
|
|
|
acceleration: Phaser.Point;
|
|
|
|
allowGravity: boolean;
|
|
|
|
allowRotation: boolean;
|
|
|
|
angle: number;
|
|
|
|
angularAcceleration: number;
|
|
|
|
angularDrag: number;
|
|
|
|
angularVelocity: number;
|
|
|
|
blocked: FaceChoices;
|
|
|
|
bottom: number;
|
|
|
|
bounce: Phaser.Point;
|
|
|
|
center: Phaser.Point;
|
|
|
|
checkCollision: FaceChoices;
|
|
|
|
collideWorldBounds: boolean;
|
|
|
|
customSeparateX: boolean;
|
|
|
|
customSeparateY: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
deltaMax: Phaser.Point;
|
2015-02-24 01:22:13 +00:00
|
|
|
dirty: boolean;
|
2014-07-22 11:39:53 +00:00
|
|
|
drag: Phaser.Point;
|
2014-03-19 15:09:44 +00:00
|
|
|
embedded: boolean;
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
enable: boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
facing: number;
|
2015-02-11 22:24:47 +00:00
|
|
|
friction: Phaser.Point;
|
2014-03-19 15:09:44 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
gravity: Phaser.Point;
|
|
|
|
halfWidth: number;
|
|
|
|
halfHeight: number;
|
2015-08-29 21:08:07 +00:00
|
|
|
height: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
immovable: boolean;
|
|
|
|
mass: number;
|
|
|
|
maxAngular: number;
|
|
|
|
maxVelocity: Phaser.Point;
|
|
|
|
moves: boolean;
|
|
|
|
newVelocity: Phaser.Point;
|
|
|
|
offset: Phaser.Point;
|
|
|
|
overlapX: number;
|
|
|
|
overlapY: number;
|
2014-03-28 16:58:23 +00:00
|
|
|
phase: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
position: Phaser.Point;
|
|
|
|
preRotation: number;
|
|
|
|
prev: Phaser.Point;
|
|
|
|
right: number;
|
|
|
|
rotation: number;
|
|
|
|
skipQuadTree: boolean;
|
|
|
|
sourceWidth: number;
|
|
|
|
sourceHeight: number;
|
|
|
|
speed: number;
|
|
|
|
sprite: Phaser.Sprite;
|
2015-05-09 01:55:12 +00:00
|
|
|
syncBounds: boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
tilePadding: Phaser.Point;
|
|
|
|
touching: FaceChoices;
|
|
|
|
type: number;
|
|
|
|
wasTouching: FaceChoices;
|
|
|
|
width: number;
|
|
|
|
velocity: Phaser.Point;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
|
|
|
|
checkWorldBounds(): void;
|
|
|
|
deltaX(): number;
|
|
|
|
deltaY(): number;
|
|
|
|
deltaZ(): number;
|
2016-01-15 18:30:29 +00:00
|
|
|
deltaAbsX(): number;
|
|
|
|
deltaAbsY(): number;
|
2014-03-19 15:09:44 +00:00
|
|
|
destroy(): void;
|
2014-04-03 19:13:35 +00:00
|
|
|
hitTest(x: number, y: number): boolean;
|
2016-01-15 18:30:29 +00:00
|
|
|
onFloor(): boolean;
|
|
|
|
onWall(): boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
preUpdate(): void;
|
|
|
|
postUpdate(): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
render(context: any, body: Phaser.Physics.Arcade.Body, color?: string, filled?: boolean): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
renderBodyInfo(debug: Phaser.Utils.Debug, body: Phaser.Physics.Arcade.Body): void;
|
|
|
|
reset(x: number, y: number): void;
|
2014-06-10 23:21:04 +00:00
|
|
|
setSize(width: number, height: number, offsetX?: number, offsetY?: number): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
updateBounds(): boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class FaceChoices {
|
|
|
|
|
|
|
|
none: boolean;
|
|
|
|
any: boolean;
|
|
|
|
up: boolean;
|
|
|
|
down: boolean;
|
|
|
|
left: boolean;
|
|
|
|
right: boolean;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
class Ninja {
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
game: Phaser.Game
|
|
|
|
gravity: number;
|
|
|
|
bounds: Phaser.Rectangle;
|
|
|
|
maxObjects: number;
|
|
|
|
maxLevels: number;
|
|
|
|
quadTree: Phaser.QuadTree;
|
2014-03-19 15:09:44 +00:00
|
|
|
time: Phaser.Time;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
clearTilemapLayerBodies(map: Phaser.Tilemap, layer: any): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
collide(object1: any, object2: any, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean;
|
2015-06-16 18:10:01 +00:00
|
|
|
convertTilemap(map: Phaser.Tilemap, layer: any, slopeMap: any): Phaser.Physics.Ninja.Tile[];
|
2014-03-16 15:21:22 +00:00
|
|
|
enableAABB(object: any, children?: boolean): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
enableCircle(object: any, radius: number, children?: boolean): void;
|
2014-03-16 15:21:22 +00:00
|
|
|
enableTile(object: any, id: number, children?: boolean): void;
|
|
|
|
enable(object: any, type?: number, id?: number, radius?: number, children?: boolean): void;
|
|
|
|
enableBody(object: any, type?: number, id?: number, radius?: number): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
overlap(object1: any, object2: any, overlapCallback?: Function, processCallback?: Function, callbackContext?: any): boolean;
|
|
|
|
separate(body1: Phaser.Physics.Ninja.Body, body2: Phaser.Physics.Ninja.Body, processCallback?: Function, callbackContext?: any, overlapOnly?: boolean): boolean;
|
2014-03-16 15:21:22 +00:00
|
|
|
setBounds(x: number, y: number, width: number, height: number): void;
|
|
|
|
setBoundsToWorld(): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
module Ninja {
|
|
|
|
|
|
|
|
class Body {
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
constructor(system: Phaser.Physics.Ninja, sprite: Phaser.Sprite, type?: number, id?: number, radius?: number, x?: number, y?: number, width?: number, height?: number);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
aabb: Phaser.Physics.Ninja.AABB;
|
|
|
|
angle: number;
|
|
|
|
bottom: number;
|
|
|
|
bounce: number;
|
|
|
|
checkCollision: Phaser.Physics.Arcade.FaceChoices;
|
2014-03-19 15:09:44 +00:00
|
|
|
circle: Phaser.Physics.Ninja.Circle;
|
2014-03-16 15:21:22 +00:00
|
|
|
collideWorldBounds: boolean;
|
|
|
|
drag: number;
|
|
|
|
facing: number;
|
|
|
|
friction: number;
|
|
|
|
game: Phaser.Game;
|
|
|
|
gravityScale: number;
|
|
|
|
height: number;
|
|
|
|
immovable: boolean;
|
|
|
|
maxSpeed: number;
|
|
|
|
right: number;
|
|
|
|
sprite: Phaser.Sprite;
|
|
|
|
system: Phaser.Physics.Ninja;
|
|
|
|
tile: Phaser.Physics.Ninja.Tile;
|
|
|
|
touching: Phaser.Physics.Arcade.FaceChoices;
|
|
|
|
type: number;
|
2014-09-01 15:55:02 +00:00
|
|
|
shape: any;
|
2014-03-19 15:09:44 +00:00
|
|
|
speed: number;
|
2014-03-16 15:21:22 +00:00
|
|
|
velocity: Phaser.Point;
|
|
|
|
wasTouching: Phaser.Physics.Arcade.FaceChoices;
|
|
|
|
width: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-17 12:35:14 +00:00
|
|
|
deltaAbsX(): number;
|
|
|
|
deltaAbsY(): number;
|
|
|
|
deltaX(): number;
|
|
|
|
deltaY(): number;
|
|
|
|
destroy(): void;
|
2014-03-16 15:21:22 +00:00
|
|
|
setZeroVelocity(): void;
|
|
|
|
moveTo(speed: number, angle: number): void;
|
|
|
|
moveFrom(speed: number, angle: number): void;
|
|
|
|
moveLeft(speed: number): void;
|
|
|
|
moveRight(speed: number): void;
|
|
|
|
moveUp(speed: number): void;
|
|
|
|
moveDown(speed: number): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
poseUpdate(): void;
|
|
|
|
preUpdate(): void;
|
2014-07-07 19:02:44 +00:00
|
|
|
render(context: any, body: Phaser.Physics.Ninja.Body, color?: string, filled?: boolean): void;
|
2014-03-16 15:21:22 +00:00
|
|
|
reset(): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class AABB {
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, width: number, height: number);
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
static COL_NONE: number;
|
|
|
|
static COL_AXIS: number;
|
|
|
|
static COL_OTHER: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
aabbTileProjections: any;
|
2014-03-16 15:21:22 +00:00
|
|
|
body: Phaser.Physics.Ninja.Body;
|
|
|
|
height: number;
|
|
|
|
oldPos: Phaser.Point;
|
|
|
|
pos: Phaser.Point;
|
|
|
|
system: Phaser.Physics.Ninja;
|
|
|
|
width: number;
|
|
|
|
velocity: Phaser.Point;
|
|
|
|
xw: number;
|
|
|
|
yw: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
collideWorldBounds(): void;
|
|
|
|
collideAABBVsAABB(aabb: Phaser.Physics.Ninja.AABB): boolean;
|
|
|
|
collideAABBVsTile(tile: Phaser.Physics.Ninja.Tile): boolean;
|
2014-03-17 12:35:14 +00:00
|
|
|
destroy(): void;
|
2014-03-16 15:21:22 +00:00
|
|
|
integrate(): void;
|
2014-08-28 13:56:27 +00:00
|
|
|
render(context: any, xOffset: number, yOffset: number, color: string, filled: boolean): void;
|
2015-07-17 00:08:45 +00:00
|
|
|
reportCollision(px: number, py: number, dx: number, dy: number): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
reportCollisionVsWorld(px: number, py: number, dx: number, dy: number, obj: any): void;
|
|
|
|
reportCollisionVsBody(px: number, py: number, dx: number, dy: number, obj: any): void;
|
2014-03-16 15:21:22 +00:00
|
|
|
resolveTile(x: number, y: number, body: Phaser.Physics.Ninja.AABB, tile: Phaser.Physics.Ninja.Tile): boolean;
|
|
|
|
reverse(): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Circle {
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, radius: number);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
COL_NONE: number;
|
|
|
|
COL_AXIS: number;
|
|
|
|
COL_OTHER: number;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
body: Phaser.Physics.Ninja.Body;
|
2015-02-11 22:24:47 +00:00
|
|
|
circleTileProjections: { [index: number]: ((x: number, y: number, oH: number, oV: number, obj: Phaser.Physics.Ninja.Circle, t: Phaser.Physics.Ninja.Tile) => number); };
|
2014-03-19 15:09:44 +00:00
|
|
|
oldPos: Phaser.Point;
|
2014-03-16 15:21:22 +00:00
|
|
|
height: number;
|
|
|
|
pos: Phaser.Point;
|
|
|
|
radius: number;
|
|
|
|
system: Phaser.Physics.Ninja;
|
2015-02-24 01:22:13 +00:00
|
|
|
type: number;
|
2014-03-16 15:21:22 +00:00
|
|
|
velocity: Phaser.Point;
|
|
|
|
width: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
xw: number;
|
|
|
|
yw: number;
|
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
collideCircleVsTile(tile: Phaser.Physics.Ninja.Tile): boolean;
|
|
|
|
collideWorldBounds(): void;
|
2014-03-17 12:35:14 +00:00
|
|
|
destroy(): void;
|
2014-11-14 20:16:46 +00:00
|
|
|
distance(dest: number, round?: boolean): number;
|
2014-03-17 12:35:14 +00:00
|
|
|
integrate(): void;
|
2014-07-07 19:02:44 +00:00
|
|
|
render(context: any, xOffset: number, yOffset: number, color: string, filled: boolean): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
reportCollisionVsWorld(px: number, py: number, dx: number, dy: number, obj: any): void;
|
|
|
|
reportCollisionVsBody(px: number, py: number, dx: number, dy: number, obj: any): void;
|
2014-03-16 15:21:22 +00:00
|
|
|
resolveCircleTile(x: number, y: number, oH: number, oV: number, obj: Phaser.Physics.Ninja.Circle, t: Phaser.Physics.Ninja.Tile): boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
}
|
|
|
|
|
2015-01-27 14:46:20 +00:00
|
|
|
enum TileType {
|
|
|
|
TYPE_EMPTY,
|
|
|
|
TYPE_FULL,
|
|
|
|
TYPE_45DEG,
|
|
|
|
TYPE_CONCAVE,
|
|
|
|
TYPE_CONVEX,
|
|
|
|
TYPE_22DEGs,
|
|
|
|
TYPE_22DEGb,
|
|
|
|
TYPE_67DEGs,
|
|
|
|
TYPE_67DEGb,
|
|
|
|
TYPE_HALF
|
|
|
|
}
|
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
class Tile {
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, width: number, height: number, type?: number);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
body: Phaser.Physics.Ninja.Body;
|
|
|
|
bottom: number;
|
2015-02-11 22:24:47 +00:00
|
|
|
flipped: boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
height: number;
|
|
|
|
id: number;
|
|
|
|
oldpos: Phaser.Point;
|
|
|
|
pos: Phaser.Point;
|
2014-03-16 15:21:22 +00:00
|
|
|
right: number;
|
2015-02-11 22:24:47 +00:00
|
|
|
rotation: number;
|
2014-03-16 15:21:22 +00:00
|
|
|
system: Phaser.Physics.Ninja;
|
2015-01-27 14:46:20 +00:00
|
|
|
type: Phaser.Physics.Ninja.TileType;
|
2014-03-19 15:09:44 +00:00
|
|
|
velocity: Phaser.Point;
|
|
|
|
width: number;
|
2014-03-16 15:21:22 +00:00
|
|
|
xw: number;
|
|
|
|
yw: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
clear(): void;
|
|
|
|
collideWorldBounds(): void;
|
|
|
|
destroy(): void;
|
|
|
|
integrate(): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
reportCollisionVsWorld(px: number, py: number, dx: number, dy: number, obj: any): void;
|
2014-03-16 15:21:22 +00:00
|
|
|
setType(id: number): number;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-03-16 15:21:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2013-12-10 14:34:22 +00:00
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
class P2 {
|
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
constructor(game: Phaser.Game, config?: any);
|
2014-03-19 15:09:44 +00:00
|
|
|
|
|
|
|
applyDamping: boolean;
|
|
|
|
applyGravity: boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
applySpringForces: boolean;
|
2014-04-19 08:05:43 +00:00
|
|
|
boundsCollidesWith: Phaser.Physics.P2.Body[];
|
2014-06-28 00:02:29 +00:00
|
|
|
boundsCollisionGroup: Phaser.Physics.P2.CollisionGroup;
|
2014-09-09 11:47:27 +00:00
|
|
|
config: any;
|
2014-09-10 23:02:23 +00:00
|
|
|
callbackContext: any;
|
|
|
|
collisionGroups: Phaser.Physics.P2.CollisionGroup[];
|
2014-04-19 08:05:43 +00:00
|
|
|
contactMaterial: Phaser.Physics.P2.ContactMaterial;
|
2014-03-19 15:09:44 +00:00
|
|
|
emitImpactEvent: boolean;
|
2014-04-19 08:05:43 +00:00
|
|
|
everythingCollisionGroup: Phaser.Physics.P2.CollisionGroup;
|
2014-03-19 15:09:44 +00:00
|
|
|
frameRate: number;
|
|
|
|
friction: number;
|
|
|
|
game: Phaser.Game;
|
|
|
|
gravity: Phaser.Physics.P2.InversePointProxy;
|
|
|
|
materials: Phaser.Physics.P2.Material[];
|
2014-06-28 00:02:29 +00:00
|
|
|
nothingCollisionGroup: Phaser.Physics.P2.CollisionGroup;
|
2014-03-19 15:09:44 +00:00
|
|
|
onBodyAdded: Phaser.Signal;
|
|
|
|
onBodyRemoved: Phaser.Signal;
|
|
|
|
onBeginContact: Phaser.Signal;
|
|
|
|
onConstraintAdded: Phaser.Signal;
|
|
|
|
onConstraintRemoved: Phaser.Signal;
|
|
|
|
onContactMaterialAdded: Phaser.Signal;
|
|
|
|
onContactMaterialRemoved: Phaser.Signal;
|
|
|
|
onEndContact: Phaser.Signal;
|
|
|
|
onSpringAdded: Phaser.Signal;
|
|
|
|
onSpringRemoved: Phaser.Signal;
|
2014-04-26 00:34:19 +00:00
|
|
|
paused: boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
postBroaddphaseCallback: Function;
|
2014-03-19 15:09:44 +00:00
|
|
|
restitution: number;
|
|
|
|
solveConstraints: boolean;
|
|
|
|
time: any;
|
|
|
|
total: number;
|
|
|
|
useElapsedTime: boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
walls: {
|
|
|
|
left?: Phaser.Physics.P2.Body;
|
|
|
|
right?: Phaser.Physics.P2.Body;
|
|
|
|
top?: Phaser.Physics.P2.Body;
|
|
|
|
bottom?: Phaser.Physics.P2.Body;
|
|
|
|
};
|
|
|
|
world: p2.World;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
|
|
|
addBody(body: Phaser.Physics.P2.Body): boolean;
|
|
|
|
addContactMaterial(material: Phaser.Physics.P2.ContactMaterial): Phaser.Physics.P2.ContactMaterial;
|
2014-09-10 23:02:23 +00:00
|
|
|
addConstraint<T>(constraint: T): T;
|
2014-03-19 15:09:44 +00:00
|
|
|
addSpring(spring: Phaser.Physics.P2.Spring): Phaser.Physics.P2.Spring;
|
2014-09-01 15:55:02 +00:00
|
|
|
beginContactHandler(event: any): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
clear(): void;
|
|
|
|
clearTilemapLayerBodies(map: Phaser.Tilemap, layer?: any): void;
|
|
|
|
convertCollisionObjects(map: Phaser.Tilemap, layer?: any, addToWorld?: boolean): Phaser.Physics.P2.Body[];
|
|
|
|
convertTilemap(map: Phaser.Tilemap, layer?: any, addToWorld?: Boolean, optimize?: boolean): Phaser.Physics.P2.Body[];
|
2014-09-10 23:02:23 +00:00
|
|
|
createBody(x: number, y: number, mass: number, addToWorld?: boolean, options?: p2.BodyOptions, data?: number[][]): Phaser.Physics.P2.Body;
|
|
|
|
createBody(x: number, y: number, mass: number, addToWorld?: boolean, options?: p2.BodyOptions, data?: number[]): Phaser.Physics.P2.Body;
|
2014-06-27 23:48:01 +00:00
|
|
|
createCollisionGroup(group?: Phaser.Group): Phaser.Physics.P2.CollisionGroup;
|
|
|
|
createCollisionGroup(group?: Phaser.Sprite): Phaser.Physics.P2.CollisionGroup;
|
2014-09-10 23:02:23 +00:00
|
|
|
createContactMaterial(materialA: Phaser.Physics.P2.Material, materialB: Phaser.Physics.P2.Material, options?: p2.ContactMaterialOptions): Phaser.Physics.P2.ContactMaterial;
|
|
|
|
createDistanceConstraint(bodyA: any, bodyB: any, distance: number, localAnchorA?: number[], localAnchorB?: number[], maxForce?: number): Phaser.Physics.P2.DistanceConstraint;
|
2014-03-19 15:09:44 +00:00
|
|
|
createGearConstraint(bodyA: any, bodyB: any, angle?: number, ratio?: number): Phaser.Physics.P2.GearConstraint;
|
2014-09-10 23:02:23 +00:00
|
|
|
createLockConstraint(bodyA: any, bodyB: any, offset?: number[], angle?: number, maxForce?: number): Phaser.Physics.P2.LockConstraint;
|
2014-03-19 15:09:44 +00:00
|
|
|
createMaterial(name?: string, body?: Phaser.Physics.P2.Body): Phaser.Physics.P2.Material;
|
2014-09-10 23:02:23 +00:00
|
|
|
createParticle(x: number, y: number, mass: number, addToWorld?: boolean, options?: p2.BodyOptions, data?: number[][]): Phaser.Physics.P2.Body;
|
|
|
|
createParticle(x: number, y: number, mass: number, addToWorld?: boolean, options?: p2.BodyOptions, data?: number[]): Phaser.Physics.P2.Body;
|
|
|
|
createPrismaticConstraint(body: any, bodyB: any, lockRotation?: boolean, anchorA?: number[], anchorB?: number[], axis?: Float32Array, maxForce?: number): Phaser.Physics.P2.PrismaticConstraint;
|
2015-01-22 12:28:31 +00:00
|
|
|
createRevoluteConstraint(bodyA: any, pivotA: number[], bodyB: any, pivotB: number[], maxForce?: number, worldPivot?: number[]): Phaser.Physics.P2.RevoluteConstraint;
|
2014-09-10 23:02:23 +00:00
|
|
|
createRotationalSpring(bodyA: any, bodyB: any, restAngle?: number, stiffness?: number, damping?: number): p2.RotationalSpring;
|
|
|
|
createSpring(bodyA: any, bodyB: any, restLength?: number, stiffness?: number, damping?: number, worldA?: number[], worldB?: number[], localA?: number[], localB?: number[]): Phaser.Physics.P2.Spring;
|
2014-03-19 15:09:44 +00:00
|
|
|
destroy(): void;
|
|
|
|
enable(object: any, debug?: boolean, children?: boolean): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
enableBody(object: any, debug: boolean): void;
|
|
|
|
endContactHandler(event: any): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
getBodies(): Phaser.Physics.P2.Body[];
|
2014-09-01 15:55:02 +00:00
|
|
|
getBody(object: any): Phaser.Physics.P2.Body;
|
2014-09-10 23:02:23 +00:00
|
|
|
getConstraints(): p2.Constraint[];
|
2014-03-19 15:09:44 +00:00
|
|
|
getSprings(): Phaser.Physics.P2.Spring[];
|
|
|
|
getContactMaterial(materialA: Phaser.Physics.P2.Material, materialB: Phaser.Physics.P2.Material): Phaser.Physics.P2.ContactMaterial;
|
|
|
|
hitTest(worldPoint: Phaser.Point, bodies?: any[], precision?: number, filterStatic?: boolean): Phaser.Physics.P2.Body[];
|
|
|
|
mpx(v: number): number;
|
|
|
|
mpxi(v: number): number;
|
2014-04-26 00:34:19 +00:00
|
|
|
pause(): void;
|
|
|
|
preUpdate(): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
pxm(v: number): number;
|
|
|
|
pxmi(v: number): number;
|
|
|
|
removeBody(body: Phaser.Physics.P2.Body): Phaser.Physics.P2.Body;
|
|
|
|
removeBodyNextStep(body: Phaser.Physics.P2.Body): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
removeConstraint<T>(constraint: T): T;
|
|
|
|
removeContactMaterial(material: Phaser.Physics.P2.ContactMaterial): Phaser.Physics.P2.ContactMaterial;
|
2014-03-19 15:09:44 +00:00
|
|
|
removeSpring(spring: Phaser.Physics.P2.Spring): Phaser.Physics.P2.Spring;
|
2014-11-27 16:00:18 +00:00
|
|
|
reset(): void;
|
2014-04-26 00:34:19 +00:00
|
|
|
resume(): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
setBounds(x: number, y: number, width: number, height: number, left?: Boolean, right?: boolean, top?: boolean, bottom?: boolean, setCollisionGroup?: boolean): void;
|
|
|
|
setBoundsToWorld(left?: boolean, right?: boolean, top?: boolean, bottom?: boolean, setCollisionGroup?: boolean): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
setCollisionGroup(object: any, group: Phaser.Physics.P2.CollisionGroup): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
setImpactEvents(state: boolean): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
setMaterial(material: Phaser.Physics.P2.Material, bodies?: Phaser.Physics.P2.Body[]): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
setPostBroadphaseCallback(callback: Function, context: any): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
setWorldMaterial(material: Phaser.Physics.P2.Material, left?: boolean, right?: boolean, top?: boolean, bottom?: boolean): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
toJSON(): any;
|
2014-03-19 15:09:44 +00:00
|
|
|
update(): void;
|
|
|
|
updateBoundsCollisionGroup(setCollisionGroup?: boolean): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
module P2 {
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
class Body {
|
|
|
|
|
|
|
|
static DYNAMIC: number;
|
|
|
|
static STATIC: number;
|
|
|
|
static KINEMATIC: number;
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, sprite?: Phaser.Sprite, x?: number, y?: number, mass?: number);
|
|
|
|
|
|
|
|
allowSleep: boolean;
|
|
|
|
angle: number;
|
|
|
|
angularDamping: number;
|
|
|
|
angularForce: number;
|
|
|
|
angularVelocity: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
collidesWith: Phaser.Physics.P2.CollisionGroup[];
|
2014-03-17 12:35:14 +00:00
|
|
|
collideWorldBounds: boolean;
|
|
|
|
damping: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
data: p2.Body;
|
2014-03-17 12:35:14 +00:00
|
|
|
debug: boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
debugBody: Phaser.Physics.P2.BodyDebug;
|
2014-09-10 23:02:23 +00:00
|
|
|
dynamic: boolean;
|
2014-03-17 12:35:14 +00:00
|
|
|
fixedRotation: boolean;
|
2014-03-19 15:09:44 +00:00
|
|
|
force: Phaser.Physics.P2.InversePointProxy;
|
2014-09-10 23:02:23 +00:00
|
|
|
kinematic: boolean;
|
2014-03-17 12:35:14 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
gravity: Phaser.Point;
|
|
|
|
id: number;
|
|
|
|
inertia: number;
|
|
|
|
mass: number;
|
|
|
|
motionState: number;
|
|
|
|
offset: Phaser.Point;
|
|
|
|
onBeginContact: Phaser.Signal;
|
|
|
|
onEndContact: Phaser.Signal;
|
|
|
|
rotation: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
removeNextStep: boolean;
|
2014-03-17 12:35:14 +00:00
|
|
|
sprite: Phaser.Sprite;
|
|
|
|
sleepSpeedLimit: number;
|
|
|
|
static: boolean;
|
|
|
|
type: number;
|
2014-03-19 15:09:44 +00:00
|
|
|
velocity: Phaser.Physics.P2.InversePointProxy;
|
|
|
|
world: Phaser.Physics.P2;
|
2014-03-17 12:35:14 +00:00
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
|
|
|
|
addToWorld(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
addCapsule(length: number, radius: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Capsule;
|
|
|
|
addCircle(radius: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Circle;
|
|
|
|
addFixture(fixtureData: string): p2.Shape[];
|
|
|
|
addLine(length: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Line;
|
|
|
|
addParticle(offsetX?: number, offsetY?: number, rotation?: number): p2.Particle;
|
|
|
|
addPolygon(options: { optimalDecomp?: boolean; skipSimpleCheck?: boolean; removeCollinearPoints?: boolean; }, points: number[][]): boolean;
|
|
|
|
addPhaserPolygon(key: string, object: string): Phaser.Physics.P2.FixtureList;
|
|
|
|
addPlane(offsetX?: number, offsetY?: number, rotation?: number): p2.Plane;
|
|
|
|
addRectangle(width: number, height: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Rectangle;
|
|
|
|
addShape(shape: p2.Shape, offsetX?: number, offsetY?: number, rotation?: number): p2.Shape;
|
2014-03-17 12:35:14 +00:00
|
|
|
adjustCenterOfMass(): void;
|
|
|
|
applyDamping(dt: number): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
applyForce(force: number[], worldX: number, worldY: number): void;
|
2015-07-17 00:08:45 +00:00
|
|
|
applyImpulse(impulse: number[], worldX: number, worldY: number): void;
|
2015-08-01 11:08:21 +00:00
|
|
|
applyImpulseLocal(impulse: number[], localX: number, localY: number): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
clearCollision(clearGroup?: boolean, cleanMask?: boolean, shape?: p2.Shape): void;
|
2014-03-17 12:35:14 +00:00
|
|
|
clearShapes(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
collides(group: any, callback?: Function, callbackContext?: any, shape?: p2.Shape): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
createBodyCallback(object: any, callback: Function, callbackContext: any): void;
|
|
|
|
createGroupCallback(group: Phaser.Physics.P2.CollisionGroup, callback: Function, callbackContext: any): void;
|
2014-03-17 12:35:14 +00:00
|
|
|
destroy(): void;
|
|
|
|
getCollisionMask(): number;
|
2015-07-17 00:08:45 +00:00
|
|
|
getVelocityAtPoint(result: number[], relativePoint: number[]): number[];
|
2014-04-23 07:26:26 +00:00
|
|
|
loadPolygon(key: string, object: string): boolean;
|
2014-03-17 12:35:14 +00:00
|
|
|
moveBackward(speed: number): void;
|
|
|
|
moveDown(speed: number): void;
|
|
|
|
moveForward(speed: number): void;
|
|
|
|
moveLeft(speed: number): void;
|
|
|
|
moveRight(speed: number): void;
|
|
|
|
moveUp(speed: number): void;
|
|
|
|
preUpdate(): void;
|
|
|
|
postUpdate(): void;
|
2015-08-29 22:19:37 +00:00
|
|
|
removeCollisionGroup(group: any, clearCallback?: boolean, shape?: p2.Shape): void;
|
2014-03-17 12:35:14 +00:00
|
|
|
removeFromWorld(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
removeShape(shape: p2.Shape): boolean;
|
|
|
|
reverse(speed: number): void;
|
2014-03-17 12:35:14 +00:00
|
|
|
rotateLeft(speed: number): void;
|
|
|
|
rotateRight(speed: number): void;
|
|
|
|
reset(x: number, y: number, resetDamping?: boolean, resetMass?: boolean): void;
|
|
|
|
shapeChanged(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
setCircle(radius: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Circle;
|
|
|
|
setCollisionGroup(group: Phaser.Physics.P2.CollisionGroup, shape?: p2.Shape): void;
|
|
|
|
setRectangle(width?: number, height?: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Rectangle;
|
|
|
|
setRectangleFromSprite(sprite: any): p2.Rectangle;
|
|
|
|
setMaterial(material: Phaser.Physics.P2.Material, shape?: p2.Shape): void;
|
2014-03-17 12:35:14 +00:00
|
|
|
setZeroDamping(): void;
|
|
|
|
setZeroForce(): void;
|
|
|
|
setZeroRotation(): void;
|
|
|
|
setZeroVelocity(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
toLocalFrame(out: number[], worldPoint: number[]): void;
|
2014-03-17 12:35:14 +00:00
|
|
|
thrust(speed: number): void;
|
2016-03-01 22:31:58 +00:00
|
|
|
thrustLeft(speed: number): void;
|
|
|
|
thrustRight(speed: number): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
toWorldFrame(out: number[], localPoint: number[]): void;
|
|
|
|
updateCollisionMask(shape?: p2.Shape): void;
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class BodyDebug extends Phaser.Group {
|
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
constructor(game: Phaser.Game, body: Phaser.Physics.P2.Body, settings: { pixelsPerLengthUnit?: number; debugPolygons?: boolean; lineWidth?: number; alpha?: number; });
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
body: Phaser.Physics.P2.Body;
|
|
|
|
canvas: Phaser.Graphics;
|
|
|
|
ppu: number;
|
|
|
|
|
|
|
|
updateSpriteTransform(): void;
|
|
|
|
draw(): void;
|
|
|
|
|
2014-03-17 12:35:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class CollisionGroup {
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
constructor(bitmask: number);
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
mask: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
class ContactMaterial extends p2.ContactMaterial {
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
class DistanceConstraint extends p2.DistanceConstraint {
|
2014-03-17 12:35:14 +00:00
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
constructor(world: Phaser.Physics.P2, bodyA: Phaser.Physics.P2.Body, bodyB: Phaser.Physics.P2.Body, distance: number, maxForce: number);
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
game: Phaser.Game;
|
2014-03-19 15:09:44 +00:00
|
|
|
world: Phaser.Physics.P2;
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-04-19 08:05:43 +00:00
|
|
|
class FixtureList {
|
|
|
|
|
|
|
|
constructor(list: any[]);
|
|
|
|
|
|
|
|
flatten(array: any[]): any[];
|
|
|
|
getFixtures(keys: string): any[];
|
|
|
|
getFixtureByKey(key: string): any[];
|
|
|
|
getGroup(groupID: number): any[];
|
|
|
|
init(): void;
|
|
|
|
parse(): void;
|
|
|
|
setCategory(bit: number, fictureKey: string): void;
|
|
|
|
setMask(bit: number, fixtureKey: string): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
setMaterial(material: any, fixtureKey: string): void;
|
2014-04-19 08:05:43 +00:00
|
|
|
setSensor(value: boolean, fixtureKey: string): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
class GearConstraint extends p2.GearConstraint {
|
2014-03-17 12:35:14 +00:00
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
constructor(world: Phaser.Physics.P2, bodyA: Phaser.Physics.P2.Body, bodyB: Phaser.Physics.P2.Body, angle?: number, ratio?: number);
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
game: Phaser.Game;
|
2014-03-19 15:09:44 +00:00
|
|
|
world: Phaser.Physics.P2;
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class InversePointProxy {
|
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
constructor(world: Phaser.Physics.P2, destination: any);
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
mx: number;
|
|
|
|
my: number;
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
class LockConstraint extends p2.LockConstraint {
|
2014-03-17 12:35:14 +00:00
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
constructor(world: Phaser.Physics.P2, bodyA: Phaser.Physics.P2.Body, bodyB: Phaser.Physics.P2.Body, offset?: number[], angle?: number, maxForce?: number);
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
game: Phaser.Game;
|
2014-03-19 15:09:44 +00:00
|
|
|
world: Phaser.Physics.P2;
|
2014-03-17 12:35:14 +00:00
|
|
|
}
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
class Material extends p2.Material {
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
constructor(name: string);
|
|
|
|
|
|
|
|
name: string;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class PointProxy {
|
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
constructor(world: Phaser.Physics.P2, destination: any);
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
mx: number;
|
2014-11-16 22:10:48 +00:00
|
|
|
my: number;
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
class PrismaticConstraint extends p2.PrismaticConstraint {
|
2014-03-17 12:35:14 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
constructor(world: Phaser.Physics.P2, bodyA?: Phaser.Physics.P2.Body, bodyB?: Phaser.Physics.P2.Body, lockRotation?: boolean, anchorA?: number[], anchorB?: number[], axis?: number[], maxForce?: number);
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
game: Phaser.Game;
|
2014-03-19 15:09:44 +00:00
|
|
|
world: Phaser.Physics.P2;
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-01-22 12:28:31 +00:00
|
|
|
class RevoluteConstraint extends p2.RevoluteConstraint {
|
2014-03-17 12:35:14 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
constructor(world: Phaser.Physics.P2, bodyA: Phaser.Physics.P2.Body, pivotA: number[], bodyB: Phaser.Physics.P2.Body, pivotB: number[], maxForce?: number);
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
game: Phaser.Game;
|
2014-03-19 15:09:44 +00:00
|
|
|
world: Phaser.Physics.P2;
|
2014-03-17 12:35:14 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class Spring {
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
constructor(world: Phaser.Physics.P2, bodyA: Phaser.Physics.P2.Body, bodyB: Phaser.Physics.P2.Body, restLength?: number, stiffness?: number, damping?: number, worldA?: number[], worldB?: number[], localA?: number[], localB?: number[]);
|
2014-03-17 12:35:14 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
data: p2.LinearSpring;
|
2014-03-17 12:35:14 +00:00
|
|
|
game: Phaser.Game;
|
2014-03-19 15:09:44 +00:00
|
|
|
world: Phaser.Physics.P2;
|
2014-03-10 16:58:12 +00:00
|
|
|
|
|
|
|
}
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
2014-01-13 14:18:15 +00:00
|
|
|
}
|
|
|
|
|
2015-01-22 12:28:31 +00:00
|
|
|
class Plugin implements IStateCycle {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
constructor(game: Phaser.Game, parent: PIXI.DisplayObject);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
active: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
hasPostRender: boolean;
|
|
|
|
hasPostUpdate: boolean;
|
|
|
|
hasPreUpdate: boolean;
|
|
|
|
hasRender: boolean;
|
|
|
|
hasUpdate: boolean;
|
2015-02-11 22:24:47 +00:00
|
|
|
parent: PIXI.DisplayObject;
|
2014-02-26 01:32:38 +00:00
|
|
|
visible: boolean;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
destroy(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
postRender(): void;
|
|
|
|
preUpdate(): void;
|
|
|
|
render(): void;
|
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-03-19 15:09:44 +00:00
|
|
|
module Plugin {
|
|
|
|
|
2014-05-14 14:54:40 +00:00
|
|
|
class AStar extends Phaser.Plugin {
|
|
|
|
|
|
|
|
static VERSION: string;
|
|
|
|
static COST_ORTHAGONAL: number;
|
|
|
|
static COST_DIAGAONAL: number;
|
|
|
|
static DISTANCE_MANHATTEN: string;
|
|
|
|
static DISTANCE_EUCLIDIAN: string;
|
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
constructor(parent: PIXI.DisplayObject);
|
2014-05-14 14:54:40 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
parent: PIXI.DisplayObject;
|
2014-05-14 14:54:40 +00:00
|
|
|
version: string;
|
|
|
|
|
|
|
|
findPath(startPoint: Phaser.Point, goalPoint: Phaser.Point): Phaser.Plugin.AStar.AStarPath;
|
|
|
|
isWalkable(x: number, y: number): boolean;
|
|
|
|
setAStarMap(map: Phaser.Tilemap, layerName: string, tilesetName: string): Phaser.Plugin.AStar;
|
2014-08-28 13:56:27 +00:00
|
|
|
|
2014-05-14 14:54:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module AStar {
|
|
|
|
|
|
|
|
class AStarNode {
|
|
|
|
|
|
|
|
constructor(x: number, y: number, isWalkable: boolean);
|
|
|
|
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
g: number;
|
|
|
|
h: number;
|
|
|
|
f: number;
|
|
|
|
parent: Phaser.Plugin.AStar.AStarNode;
|
|
|
|
travelCost: number;
|
|
|
|
walkable: boolean;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class AStarPath {
|
|
|
|
|
|
|
|
constructor(nodes: Phaser.Plugin.AStar.AStarNode[], start: Phaser.Plugin.AStar.AStarNode, goal: Phaser.Plugin.AStar.AStarNode);
|
|
|
|
|
|
|
|
nodes: Phaser.Plugin.AStar.AStarNode[];
|
|
|
|
start: Phaser.Plugin.AStar.AStarNode;
|
|
|
|
goal: Phaser.Plugin.AStar.AStarNode;
|
|
|
|
visited: Phaser.Plugin.AStar.AStarNode[];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class ColorHarmony extends Phaser.Plugin {
|
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
getAnalogousHarmony(color: number, threshold?: number): any;
|
2014-05-14 14:54:40 +00:00
|
|
|
getComplementHarmony(color: number): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
getSplitComplementHarmony(color: number, threshold: number): any;
|
|
|
|
getTriadicHarmony(color: number): any;
|
2014-05-14 14:54:40 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class CSS3Filters extends Phaser.Plugin {
|
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
constructor(parent: PIXI.DisplayObject);
|
2014-05-14 14:54:40 +00:00
|
|
|
|
|
|
|
blur: number;
|
|
|
|
brightness: number;
|
|
|
|
contrast: number;
|
|
|
|
grayscale: number;
|
|
|
|
hueRotate: number;
|
|
|
|
invert: number;
|
|
|
|
opacity: number;
|
|
|
|
saturate: number;
|
|
|
|
sepia: number;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class TilemapWalker extends Phaser.Plugin {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, map: Phaser.Tilemap, layer?: any, x?: number, y?: number);
|
|
|
|
|
|
|
|
collides: boolean;
|
|
|
|
game: Phaser.Game;
|
|
|
|
history: boolean;
|
|
|
|
facing: number;
|
|
|
|
map: Phaser.Tilemap;
|
|
|
|
location: Phaser.Point;
|
|
|
|
locationLayer: number;
|
|
|
|
|
|
|
|
checkTile(x: number, y: number): boolean;
|
|
|
|
getTileFromLocation(x: number, y: number): Phaser.Tile;
|
|
|
|
getTiles(width: number, height: number, center?: boolean): any[];
|
|
|
|
getTileBehind(distance?: number): Phaser.Tile;
|
|
|
|
getTileBehindLeft(distance?: number): Phaser.Tile;
|
|
|
|
getTileBehindRight(distance?: number): Phaser.Tile;
|
|
|
|
getTileAhead(distance?: number): Phaser.Tile;
|
|
|
|
getTileAheadLeft(distance?: number): Phaser.Tile;
|
|
|
|
getTileAheadRight(distance?: number): Phaser.Tile;
|
|
|
|
getTileLeft(distance: number): Phaser.Tile;
|
|
|
|
getTileRight(distance: number): Phaser.Tile;
|
|
|
|
moveForward(): boolean;
|
|
|
|
moveBackward(): boolean;
|
|
|
|
moveLeft(): boolean;
|
|
|
|
moveRight(): boolean;
|
|
|
|
putTile(index: number): void;
|
|
|
|
setLocation(x: number, y: number, layer?: any): boolean;
|
|
|
|
turnLeft(): void;
|
|
|
|
turnRight(): void;
|
|
|
|
updateLocation(x: number, y: number): boolean;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class SamplePlugin extends Phaser.Plugin {
|
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
constructor(game: Phaser.Game, parent: PIXI.DisplayObject);
|
2014-05-14 14:54:40 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
addSprite(sprite: Phaser.Sprite): void;
|
2014-05-14 14:54:40 +00:00
|
|
|
update(): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class VirtualJoystick extends Phaser.Plugin {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, parent: any);
|
|
|
|
|
|
|
|
angle: number;
|
|
|
|
base: Phaser.Sprite;
|
|
|
|
baseBMD: Phaser.BitmapData;
|
|
|
|
baseCircle: Phaser.Circle;
|
|
|
|
deltaX: number;
|
|
|
|
deltaY: number;
|
|
|
|
distance: number;
|
|
|
|
force: number;
|
|
|
|
isDragging: boolean;
|
|
|
|
limit: number;
|
|
|
|
limitPoint: Phaser.Point;
|
|
|
|
location: Phaser.Point;
|
|
|
|
nub: Phaser.Sprite;
|
|
|
|
nubBMD: Phaser.BitmapData;
|
|
|
|
speed: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
|
|
|
|
init(x: number, y: number, diameter?: number, limit?: number): void;
|
|
|
|
move(pointer: Phaser.Pointer, x: number, y: number): void;
|
|
|
|
render(): void;
|
|
|
|
setVelocity(sprite: Phaser.Sprite, minSpeed?: number, maxSpeed?: number): Phaser.Sprite;
|
|
|
|
startDrag(): void;
|
|
|
|
stopDrag(nub: Phaser.Sprite, pointer: Phaser.Pointer): void;
|
|
|
|
update(): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-05-09 01:55:12 +00:00
|
|
|
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
class Webcam extends Phaser.Plugin {
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
constructor(game: Phaser.Game, parent: PIXI.DisplayObject);
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-05-14 14:54:40 +00:00
|
|
|
active: boolean;
|
|
|
|
context: any;
|
|
|
|
stream: any;
|
|
|
|
video: HTMLVideoElement;
|
2014-03-19 15:09:44 +00:00
|
|
|
|
2014-05-14 14:54:40 +00:00
|
|
|
connectCallback: (stream: any) => void;
|
|
|
|
errorCallback: (e: any) => void;
|
|
|
|
grab: (context: any, x: number, y: number) => void;
|
|
|
|
start(width: number, height: number, context: any): void;
|
|
|
|
stop(): void;
|
|
|
|
update(): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
}
|
|
|
|
|
2015-01-27 14:14:18 +00:00
|
|
|
class Juicy extends Phaser.Plugin {
|
2014-05-14 14:54:40 +00:00
|
|
|
|
2015-01-27 14:14:18 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2015-02-11 22:24:47 +00:00
|
|
|
|
|
|
|
createScreenFlash(color?: string): Phaser.Plugin.Juicy.ScreenFlash;
|
|
|
|
createTrail(length?: number, color?: number): Phaser.Plugin.Juicy.Trail;
|
2015-01-27 14:14:18 +00:00
|
|
|
overScale(object: Phaser.Sprite, scale?: number, initialScale?: Phaser.Point): void;
|
|
|
|
jelly(object: Phaser.Sprite, strength?: number, delay?: number, initialScale?: Phaser.Point): void;
|
|
|
|
mouseStretch(object: Phaser.Sprite, strength?: number, initialScale?: Phaser.Point): void;
|
|
|
|
update(): void;
|
|
|
|
shake(duration?: number, strength?: number): void;
|
|
|
|
}
|
|
|
|
|
|
|
|
module Juicy {
|
|
|
|
|
|
|
|
class Trail {
|
|
|
|
|
|
|
|
constructor(game: Phaser.Game, trailLength?: number, color?: number);
|
|
|
|
|
|
|
|
target: Phaser.Sprite;
|
|
|
|
trailLength: number;
|
|
|
|
trailWidth: number;
|
|
|
|
trailScaling: boolean;
|
|
|
|
trailColor: number;
|
|
|
|
|
|
|
|
update(): void;
|
|
|
|
addSegment(x: number, y: number): void;
|
|
|
|
redrawSegments(offsetX: number, offsetY: number): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class ScreenFlash {
|
2014-05-14 14:54:40 +00:00
|
|
|
|
2015-01-27 14:14:18 +00:00
|
|
|
constructor(game: Phaser.Game, color?: string);
|
2014-05-14 14:54:40 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
flash(maxAlpha?: number, duration?: number): void;
|
2015-01-27 14:14:18 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2014-03-19 15:09:44 +00:00
|
|
|
}
|
|
|
|
|
2015-10-06 14:34:26 +00:00
|
|
|
interface PluginConstructorOf<T> {
|
|
|
|
new (...parameters: any[]): T;
|
|
|
|
}
|
|
|
|
|
2015-01-22 12:28:31 +00:00
|
|
|
class PluginManager implements IStateCycle {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-01-17 18:42:25 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
plugins: Phaser.Plugin[];
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-10-06 14:34:26 +00:00
|
|
|
add<T extends Phaser.Plugin>(plugin: PluginConstructorOf<T>, ...parameters: any[]): T;
|
2014-01-07 09:58:00 +00:00
|
|
|
destroy(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
postRender(): void;
|
|
|
|
postUpdate(): void;
|
|
|
|
preUpdate(): void;
|
|
|
|
remove(plugin: Phaser.Plugin): void;
|
|
|
|
removeAll(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
render(): void;
|
2014-03-26 09:05:36 +00:00
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
class Point extends PIXI.Point {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(x?: number, y?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
x: number;
|
|
|
|
y: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
type: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
static add(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
2014-08-31 01:21:33 +00:00
|
|
|
static subtract(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static multiply(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
static divide(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static equals(a: Phaser.Point, b: Phaser.Point): boolean;
|
2014-08-31 01:21:33 +00:00
|
|
|
static angle(a: Phaser.Point, b: Phaser.Point): number;
|
|
|
|
static angleSq(a: Phaser.Point, b: Phaser.Point): number;
|
|
|
|
static negative(a: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static multiplyAdd(a: Phaser.Point, b: Phaser.Point, scale: number, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static interpolate(a: Phaser.Point, b: Phaser.Point, alpha: number, out?: Phaser.Point): Phaser.Point;
|
2014-09-25 08:38:38 +00:00
|
|
|
static parse(obj: any, xProp?: string, yProp?: string): Phaser.Point;
|
2014-08-31 01:21:33 +00:00
|
|
|
static perp(a: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static rperp(a: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static distance(a: any, b: any, round?: boolean): number;
|
|
|
|
static project(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static projectUnit(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static normalRightHand(a: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static normalize(a: Phaser.Point, out?: Phaser.Point): Phaser.Point;
|
|
|
|
static rotate(a: Phaser.Point, x: number, y: number, angle: number, asDegrees?: boolean, distance?: number): Phaser.Point;
|
|
|
|
static centroid(points: Phaser.Point[], out?: Phaser.Point): Phaser.Point;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
add(x: number, y: number): Phaser.Point;
|
2014-05-14 14:54:40 +00:00
|
|
|
angle(a: Phaser.Point, asDegrees?: boolean): number;
|
2014-08-31 01:21:33 +00:00
|
|
|
angleSq(a: Phaser.Point): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
clamp(min: number, max: number): Phaser.Point;
|
|
|
|
clampX(min: number, max: number): Phaser.Point;
|
|
|
|
clampY(min: number, max: number): Phaser.Point;
|
2014-03-20 11:07:37 +00:00
|
|
|
clone(output?: Phaser.Point): Phaser.Point;
|
2014-08-31 01:21:33 +00:00
|
|
|
copyFrom(source: Phaser.Point): Phaser.Point;
|
2014-11-05 15:20:08 +00:00
|
|
|
copyTo<T>(dest: T): T;
|
|
|
|
ceil(): Phaser.Point;
|
2014-05-04 15:36:58 +00:00
|
|
|
cross(a: Phaser.Point): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
divide(x: number, y: number): Phaser.Point;
|
2014-08-31 01:21:33 +00:00
|
|
|
distance(dest: Phaser.Point, round?: boolean): number;
|
2014-05-04 15:36:58 +00:00
|
|
|
dot(a: Phaser.Point): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
equals(a: Phaser.Point): boolean;
|
2014-11-05 15:20:08 +00:00
|
|
|
floor(): Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
getMagnitude(): number;
|
2014-05-04 15:36:58 +00:00
|
|
|
getMagnitudeSq(): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
invert(): Phaser.Point;
|
|
|
|
isZero(): boolean;
|
|
|
|
multiply(x: number, y: number): Phaser.Point;
|
2014-08-31 01:21:33 +00:00
|
|
|
normalize(): Phaser.Point;
|
|
|
|
normalRightHand(): Phaser.Point;
|
|
|
|
perp(): Phaser.Point;
|
|
|
|
rperp(): Phaser.Point;
|
2015-07-30 01:41:25 +00:00
|
|
|
rotate(x: number, y: number, angle: number, asDegrees?: boolean, distance?: number): Phaser.Point;
|
2014-04-22 01:12:21 +00:00
|
|
|
set(x: number, y?: number): Phaser.Point;
|
2014-05-04 15:36:58 +00:00
|
|
|
setMagnitude(magnitude: number): Phaser.Point;
|
2014-04-22 01:12:21 +00:00
|
|
|
setTo(x: number, y?: number): Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
subtract(x: number, y: number): Phaser.Point;
|
|
|
|
toString(): string;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Pointer {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2016-02-02 23:30:03 +00:00
|
|
|
constructor(game: Phaser.Game, id: number, pointerMode?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-07-07 15:53:56 +00:00
|
|
|
static NO_BUTTON: number;
|
|
|
|
static LEFT_BUTTON: number;
|
|
|
|
static RIGHT_BUTTON: number;
|
|
|
|
static MIDDLE_BUTTON: number;
|
|
|
|
static BACK_BUTTON: number;
|
|
|
|
static FORWARD_BUTTON: number;
|
|
|
|
static ERASER_BUTTON: number;
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
active: boolean;
|
2016-02-01 16:54:25 +00:00
|
|
|
backButton: Phaser.DeviceButton;
|
2014-05-04 15:36:58 +00:00
|
|
|
button: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
circle: Phaser.Circle;
|
|
|
|
clientX: number;
|
|
|
|
clientY: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
dirty: boolean;
|
2014-05-21 20:48:29 +00:00
|
|
|
duration: number;
|
2016-02-01 16:54:25 +00:00
|
|
|
eraserButton: Phaser.DeviceButton;
|
2014-05-14 14:54:40 +00:00
|
|
|
exists: boolean;
|
2016-02-02 23:30:03 +00:00
|
|
|
forceOut: boolean;
|
2016-02-01 16:54:25 +00:00
|
|
|
forwardButton: Phaser.DeviceButton;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2016-02-02 23:30:03 +00:00
|
|
|
justReleasePreventsOver: boolean | number;
|
2014-02-26 01:32:38 +00:00
|
|
|
id: number;
|
2014-05-04 15:36:58 +00:00
|
|
|
identifier: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
isDown: boolean;
|
|
|
|
isMouse: boolean;
|
|
|
|
isUp: boolean;
|
2015-11-18 00:16:54 +00:00
|
|
|
leftButton: Phaser.DeviceButton;
|
2016-02-01 16:54:25 +00:00
|
|
|
middleButton: Phaser.DeviceButton;
|
2014-05-19 10:51:20 +00:00
|
|
|
movementX: number;
|
|
|
|
movementY: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
msSinceLastClick: number;
|
|
|
|
pageX: number;
|
|
|
|
pageY: number;
|
2014-05-04 15:36:58 +00:00
|
|
|
pointerId: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
position: Phaser.Point;
|
|
|
|
positionDown: Phaser.Point;
|
2014-04-03 19:13:35 +00:00
|
|
|
positionUp: Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
previousTapTime: number;
|
2014-05-19 10:51:20 +00:00
|
|
|
rawMovementX: number;
|
|
|
|
rawMovementY: number;
|
2015-11-18 00:15:09 +00:00
|
|
|
rightButton: Phaser.DeviceButton;
|
2014-02-26 01:32:38 +00:00
|
|
|
screenX: number;
|
|
|
|
screenY: number;
|
2014-05-04 15:36:58 +00:00
|
|
|
target: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
targetObject: any;
|
|
|
|
timeDown: number;
|
|
|
|
timeUp: number;
|
|
|
|
totalTouches: number;
|
2014-05-14 14:54:40 +00:00
|
|
|
type: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
withinGame: boolean;
|
|
|
|
worldX: number;
|
|
|
|
worldY: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-11-05 15:20:08 +00:00
|
|
|
addClickTrampoline(name: string, callback: Function, callbackContext: any, ...callbackArgs: any[]): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
justPressed(duration?: number): boolean;
|
|
|
|
justReleased(duration?: number): boolean;
|
|
|
|
leave(event: any): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
move(event: any, fromClick?: boolean): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
reset(): void;
|
2015-07-07 15:53:56 +00:00
|
|
|
resetButtons(): void;
|
2014-05-19 10:51:20 +00:00
|
|
|
resetMovement(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
start(event: any): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
stop(event: any): void;
|
|
|
|
update(): void;
|
2015-07-17 00:08:45 +00:00
|
|
|
updateButtons(event: MouseEvent): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Polygon {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
constructor(points: Phaser.Point[] | number[]);
|
2015-02-11 22:24:47 +00:00
|
|
|
constructor(...points: Phaser.Point[]);
|
|
|
|
constructor(...points: number[]);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-05-14 14:54:40 +00:00
|
|
|
area: number;
|
2015-10-06 14:30:54 +00:00
|
|
|
points: number[] | Phaser.Point[];
|
2014-03-03 23:46:24 +00:00
|
|
|
type: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
clone(output: Phaser.Polygon): Phaser.Polygon;
|
2014-03-03 23:46:24 +00:00
|
|
|
contains(x: number, y: number): boolean;
|
2015-02-24 01:22:13 +00:00
|
|
|
flatten(): Phaser.Polygon;
|
2015-10-06 14:30:54 +00:00
|
|
|
setTo(points: Phaser.Point[] | number[]): void;
|
2015-02-11 22:24:47 +00:00
|
|
|
setTo(...points: Phaser.Point[]): void;
|
|
|
|
setTo(...points: number[]): void;
|
2015-02-24 01:22:13 +00:00
|
|
|
toNumberArray(output?: number[]): number[];
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class QuadTree {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(x: number, y: number, width: number, height: number, maxObject?: number, maxLevels?: number, level?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
bounds: {
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
subWidth: number;
|
|
|
|
subHeight: number;
|
|
|
|
right: number;
|
|
|
|
bottom: number;
|
|
|
|
};
|
2014-03-20 11:07:37 +00:00
|
|
|
level: number;
|
|
|
|
maxObjects: number;
|
|
|
|
maxLevels: number;
|
|
|
|
objects: any[];
|
|
|
|
nodes: any[];
|
|
|
|
|
|
|
|
clear(): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
getIndex(rect: any): number;
|
2014-03-20 11:07:37 +00:00
|
|
|
insert(body: any): void;
|
|
|
|
populate(group: Phaser.Group): void;
|
|
|
|
populateHandler(sprite: Phaser.Sprite): void;
|
|
|
|
reset(x: number, y: number, width: number, height: number, maxObject?: number, maxLevels?: number, level?: number): void;
|
2014-05-14 14:54:40 +00:00
|
|
|
retrieve(source: any): any[];
|
2014-03-20 11:07:37 +00:00
|
|
|
split(): void;
|
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class RandomDataGenerator {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2016-02-02 23:30:03 +00:00
|
|
|
constructor(seeds: any[] | string);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
angle(): number;
|
2014-06-11 14:23:54 +00:00
|
|
|
between(min: number, max: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
frac(): number;
|
|
|
|
integer(): number;
|
|
|
|
integerInRange(min: number, max: number): number;
|
|
|
|
normal(): number;
|
2014-03-17 12:35:14 +00:00
|
|
|
pick<T>(ary: T[]): T;
|
2014-02-26 01:32:38 +00:00
|
|
|
real(): number;
|
|
|
|
realInRange(min: number, max: number): number;
|
2016-02-18 13:04:55 +00:00
|
|
|
sign(): number;
|
2016-02-03 11:21:43 +00:00
|
|
|
sow(seeds: any[]): void;
|
2016-02-02 02:26:47 +00:00
|
|
|
state(state?: string): string;
|
2014-03-03 23:46:24 +00:00
|
|
|
timestamp(min: number, max: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
uuid(): number;
|
2014-03-17 12:35:14 +00:00
|
|
|
weightedPick<T>(ary: T[]): T;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Rectangle {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(x: number, y: number, width: number, height: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
bottom: number;
|
|
|
|
bottomRight: Phaser.Point;
|
2015-05-25 16:08:07 +00:00
|
|
|
bottomLeft: Phaser.Point;
|
2014-02-26 01:32:38 +00:00
|
|
|
centerX: number;
|
|
|
|
centerY: number;
|
|
|
|
empty: boolean;
|
|
|
|
halfHeight: number;
|
|
|
|
halfWidth: number;
|
|
|
|
height: number;
|
|
|
|
left: number;
|
|
|
|
perimeter: number;
|
2014-07-09 10:34:18 +00:00
|
|
|
randomX: number;
|
|
|
|
randomY: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
right: number;
|
|
|
|
top: number;
|
|
|
|
topLeft: Phaser.Point;
|
2014-09-10 23:02:23 +00:00
|
|
|
topRight: Phaser.Point;
|
2015-02-24 01:22:13 +00:00
|
|
|
type: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
volume: number;
|
|
|
|
width: number;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-25 08:38:38 +00:00
|
|
|
static aabb(points: Phaser.Point[], out?: Phaser.Rectangle): Phaser.Rectangle;
|
2014-02-26 01:32:38 +00:00
|
|
|
static clone(a: Phaser.Rectangle, output?: Phaser.Rectangle): Phaser.Rectangle;
|
|
|
|
static contains(a: Phaser.Rectangle, x: number, y: number): boolean;
|
|
|
|
static containsPoint(a: Phaser.Rectangle, point: Phaser.Point): boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
static containsRaw(rx: number, ry: number, rw: number, rh: number, x: number, y: number): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
static containsRect(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean;
|
|
|
|
static equals(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean;
|
|
|
|
static inflate(a: Phaser.Rectangle, dx: number, dy: number): Phaser.Rectangle;
|
|
|
|
static inflatePoint(a: Phaser.Rectangle, point: Phaser.Point): Phaser.Rectangle;
|
|
|
|
static intersection(a: Phaser.Rectangle, b: Phaser.Rectangle, out?: Phaser.Rectangle): Phaser.Rectangle;
|
2014-03-20 11:07:37 +00:00
|
|
|
static intersects(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
static intersectsRaw(left: number, right: number, top: number, bottom: number, tolerance: number): boolean;
|
|
|
|
static size(a: Phaser.Rectangle, output?: Phaser.Point): Phaser.Point;
|
|
|
|
static union(a: Phaser.Rectangle, b: Phaser.Rectangle, out?: Phaser.Rectangle): Phaser.Rectangle;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-05-09 01:55:12 +00:00
|
|
|
ceil(): void;
|
|
|
|
ceilAll(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
centerOn(x: number, y: number): Phaser.Rectangle;
|
2014-02-26 01:32:38 +00:00
|
|
|
clone(output: Phaser.Rectangle): Phaser.Rectangle;
|
|
|
|
contains(x: number, y: number): boolean;
|
|
|
|
containsRect(b: Phaser.Rectangle): boolean;
|
|
|
|
copyFrom(source: any): Phaser.Rectangle;
|
2014-09-01 15:55:02 +00:00
|
|
|
copyTo(dest: any): any;
|
2014-02-26 01:32:38 +00:00
|
|
|
equals(b: Phaser.Rectangle): boolean;
|
|
|
|
floor(): void;
|
|
|
|
floorAll(): void;
|
|
|
|
inflate(dx: number, dy: number): Phaser.Rectangle;
|
|
|
|
intersection(b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle;
|
|
|
|
intersects(b: Phaser.Rectangle, tolerance: number): boolean;
|
|
|
|
intersectsRaw(left: number, right: number, top: number, bottom: number, tolerance: number): boolean;
|
|
|
|
offset(dx: number, dy: number): Phaser.Rectangle;
|
|
|
|
offsetPoint(point: Phaser.Point): Phaser.Rectangle;
|
2015-06-13 03:18:50 +00:00
|
|
|
random(out?: Phaser.Point): Phaser.Point;
|
2015-06-11 05:01:29 +00:00
|
|
|
resize(width: number, height: number): Phaser.Rectangle;
|
2014-02-26 01:32:38 +00:00
|
|
|
setTo(x: number, y: number, width: number, height: number): Phaser.Rectangle;
|
2014-10-30 08:56:24 +00:00
|
|
|
scale(x: number, y?: number): Phaser.Rectangle;
|
2014-02-26 01:32:38 +00:00
|
|
|
size(output?: Phaser.Point): Phaser.Point;
|
|
|
|
toString(): string;
|
|
|
|
union(b: Phaser.Rectangle, out?: Phaser.Rectangle): Phaser.Rectangle;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
class RenderTexture extends PIXI.RenderTexture {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-10-22 20:42:03 +00:00
|
|
|
constructor(game: Phaser.Game, width?: number, height?: number, key?: string, scaleMode?: number, resolution?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-07-13 22:05:18 +00:00
|
|
|
crop: PIXI.Rectangle;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2014-03-03 23:46:24 +00:00
|
|
|
key: string;
|
2014-02-26 01:32:38 +00:00
|
|
|
type: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-04-24 16:16:31 +00:00
|
|
|
render(displayObject: PIXI.DisplayObject, matrix?: Phaser.Matrix, clear?: boolean): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
renderXY(displayObject: PIXI.DisplayObject, x: number, y: number, clear?: boolean): void;
|
2015-04-24 16:16:31 +00:00
|
|
|
renderRawXY(displayObject: PIXI.DisplayObject, x: number, y: number, clear?: boolean): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class RequestAnimationFrame {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
constructor(game: Phaser.Game, forceSetTimeOut?: boolean);
|
|
|
|
|
2015-01-27 12:14:06 +00:00
|
|
|
forceSetTimeOut: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
isRunning: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
isRAF(): boolean;
|
|
|
|
isSetTimeOut(): boolean;
|
|
|
|
start(): boolean;
|
|
|
|
stop(): void;
|
2014-11-10 21:15:52 +00:00
|
|
|
updateRAF(rafTime: number): void;
|
2015-08-01 11:08:21 +00:00
|
|
|
updateSetTimeout(time: number): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
class RetroFont extends Phaser.RenderTexture {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
constructor(game: Phaser.Game, key: string, characterWidth: number, characterHeight: number, chars: string, charsPerRow?: number, xSpacing?: number, ySpacing?: number, xOffset?: number, yOffset?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
static ALIGN_CENTER: string;
|
|
|
|
static ALIGN_LEFT: string;
|
|
|
|
static ALIGN_RIGHT: string;
|
|
|
|
static TEXT_SET1: string;
|
|
|
|
static TEXT_SET2: string;
|
|
|
|
static TEXT_SET3: string;
|
|
|
|
static TEXT_SET4: string;
|
|
|
|
static TEXT_SET5: string;
|
|
|
|
static TEXT_SET6: string;
|
|
|
|
static TEXT_SET7: string;
|
|
|
|
static TEXT_SET8: string;
|
|
|
|
static TEXT_SET9: string;
|
|
|
|
static TEXT_SET10: string;
|
|
|
|
static TEXT_SET11: string;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
align: string;
|
|
|
|
autoUpperCase: boolean;
|
|
|
|
characterHeight: number;
|
|
|
|
characterPerRow: number;
|
|
|
|
characterSpacingX: number;
|
|
|
|
characterSpacingY: number;
|
|
|
|
characterWidth: number;
|
|
|
|
customSpacingX: number;
|
|
|
|
customSpacingY: number;
|
|
|
|
fixedWidth: number;
|
2014-10-30 08:56:24 +00:00
|
|
|
fontSet: Image;
|
2014-09-10 23:02:23 +00:00
|
|
|
frameData: Phaser.FrameData;
|
2014-03-10 16:58:12 +00:00
|
|
|
multiLine: boolean;
|
|
|
|
offsetX: number;
|
|
|
|
offsetY: number;
|
2015-11-23 05:38:09 +00:00
|
|
|
smoothed: boolean;
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
stamp: Phaser.Image;
|
2014-03-20 11:07:37 +00:00
|
|
|
text: string;
|
|
|
|
|
|
|
|
buildRetroFontText(): void;
|
2014-03-10 16:58:12 +00:00
|
|
|
getLongestLine(): number;
|
2014-03-20 11:07:37 +00:00
|
|
|
pasteLine(line: string, x: number, y: number, customSpacingX: number): void;
|
2014-03-10 16:58:12 +00:00
|
|
|
removeUnsupportedCharacters(stripCR?: boolean): string;
|
|
|
|
setFixedWidth(width: number, lineAlignment?: string): void;
|
|
|
|
setText(content: string, multiLine?: boolean, characterSpacing?: number, lineSpacing?: number, lineAlignment?: string, allowLowerCase?: boolean): void;
|
Update phaser.d.ts
Updated from last week
Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently.
`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 22:47:29 +00:00
|
|
|
updateOffset(x?: number, y?: number): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
}
|
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
class Rope extends PIXI.Rope {
|
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
constructor(game: Phaser.Game, x: number, y: number, key: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture | Phaser.Video, frame?: string | number, points?: Phaser.Point[]);
|
2014-09-10 23:02:23 +00:00
|
|
|
|
|
|
|
angle: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
animations: Phaser.AnimationManager;
|
|
|
|
alive: boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
autoCull: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
body: Phaser.Physics.Arcade.Body | Phaser.Physics.P2.Body | Phaser.Physics.Ninja.Body | any;
|
|
|
|
bottom: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
cameraOffset: Phaser.Point;
|
|
|
|
checkWorldBounds: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
cropRect: Phaser.Rectangle;
|
|
|
|
components: any;
|
|
|
|
customRender: boolean;
|
|
|
|
debug: boolean;
|
|
|
|
deltaX: number;
|
|
|
|
deltaY: number;
|
|
|
|
deltaZ: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
destroyPhase: boolean;
|
|
|
|
exists: boolean;
|
|
|
|
events: Phaser.Events;
|
|
|
|
fixedToCamera: boolean;
|
2015-10-06 14:30:54 +00:00
|
|
|
frame: string | number;
|
2014-09-10 23:02:23 +00:00
|
|
|
frameName: string;
|
2015-02-24 01:22:13 +00:00
|
|
|
fresh: boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
game: Phaser.Game;
|
2015-07-20 20:36:36 +00:00
|
|
|
inCamera: boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
input: Phaser.InputHandler;
|
|
|
|
inputEnabled: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
inWorld: boolean;
|
|
|
|
left: number;
|
|
|
|
lifespan: number;
|
2015-10-06 14:30:54 +00:00
|
|
|
key: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture | Phaser.Video;
|
2014-09-10 23:02:23 +00:00
|
|
|
name: string;
|
2015-07-20 20:36:36 +00:00
|
|
|
offsetX: number;
|
|
|
|
offsetY: number;
|
|
|
|
outOfBoundsKill: boolean;
|
|
|
|
overlap(displayObject: Phaser.Sprite | Phaser.Image | Phaser.TileSprite | Phaser.Button | PIXI.DisplayObject): boolean;
|
2015-07-08 18:09:42 +00:00
|
|
|
pendingDestroy: boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
points: Phaser.Point[];
|
|
|
|
position: Phaser.Point;
|
2015-02-24 01:22:13 +00:00
|
|
|
previousPosition: Phaser.Point;
|
|
|
|
previousRotation: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
right: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
renderOrderID: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
segments: Phaser.Rectangle[];
|
2015-07-20 20:36:36 +00:00
|
|
|
smoothed: boolean;
|
|
|
|
top: number;
|
2014-09-10 23:02:23 +00:00
|
|
|
type: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
transformCallback: Function;
|
2015-08-28 09:10:29 +00:00
|
|
|
transformCallbackContext: any;
|
2015-07-20 20:36:36 +00:00
|
|
|
scaleMin: Phaser.Point;
|
|
|
|
scaleMax: Phaser.Point;
|
2015-01-27 12:14:06 +00:00
|
|
|
updateAnimation: Function;
|
2014-09-10 23:02:23 +00:00
|
|
|
world: Phaser.Point;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
z: number;
|
|
|
|
|
2015-07-20 20:36:36 +00:00
|
|
|
bringToTop(): Phaser.Rope;
|
|
|
|
checkTransform(wt: PIXI.Matrix): void;
|
|
|
|
crop(rect: Phaser.Rectangle, copy?: boolean): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
destroy(destroyChildren?: boolean): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
kill(): Phaser.Rope;
|
|
|
|
loadTexture(key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number, stopAnimation?: boolean): void;
|
|
|
|
moveUp(): Phaser.Rope;
|
|
|
|
moveDown(): Phaser.Rope;
|
|
|
|
play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
2014-09-10 23:02:23 +00:00
|
|
|
preUpdate(): void;
|
|
|
|
postUpdate(): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
reset(x: number, y: number, health?: number): Phaser.Rope;
|
|
|
|
resizeFrame(parent: any, width: number, height: number): void;
|
|
|
|
resetFrame(): void;
|
|
|
|
revive(health?: number): Phaser.Rope;
|
|
|
|
sendToBack(): Phaser.Rope;
|
2014-09-10 23:02:23 +00:00
|
|
|
setFrame(frame: Phaser.Frame): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
setScaleMinMax(minX?: number, minY?: number, maxX?: number, maxY?: number): void;
|
|
|
|
updateCrop(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
update(): void;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-02-24 01:22:13 +00:00
|
|
|
class RoundedRectangle extends PIXI.RoundedRectangle {
|
|
|
|
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
radius: number;
|
|
|
|
type: number;
|
|
|
|
|
|
|
|
clone(): RoundedRectangle;
|
|
|
|
contains(x: number, y: number): boolean;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Signal {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
active: boolean;
|
2014-11-24 15:53:47 +00:00
|
|
|
boundDispatch: Function;
|
2014-02-26 01:32:38 +00:00
|
|
|
memorize: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-07-09 20:15:00 +00:00
|
|
|
add(listener: Function, listenerContext?: any, priority?: number, ...args: any[]): Phaser.SignalBinding;
|
|
|
|
addOnce(listener: Function, listenerContext?: any, priority?: number, ...args: any[]): Phaser.SignalBinding;
|
2014-02-26 01:32:38 +00:00
|
|
|
dispatch(...params: any[]): void;
|
|
|
|
dispose(): void;
|
|
|
|
forget(): void;
|
|
|
|
getNumListeners(): number;
|
|
|
|
halt(): void;
|
|
|
|
has(listener: Function, context?: any): boolean;
|
|
|
|
remove(listener: Function, context?: any): Function;
|
2014-07-03 01:22:56 +00:00
|
|
|
removeAll(context?: any): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
toString(): string;
|
|
|
|
validateListener(listener: Function, fnName: string): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class SignalBinding {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-07-09 20:15:00 +00:00
|
|
|
constructor(signal: Phaser.Signal, listener: Function, isOnce: boolean, listenerContext?: any, priority?: number, ...args: any[]);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
active: boolean;
|
2014-10-30 08:56:24 +00:00
|
|
|
callCount: number;
|
2014-09-01 15:55:02 +00:00
|
|
|
context: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
params: any[];
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
execute(paramsArr?: any[]): void;
|
|
|
|
detach(): Function;
|
|
|
|
isBound(): boolean;
|
|
|
|
isOnce(): boolean;
|
|
|
|
getListener(): Function;
|
|
|
|
getSignal(): Phaser.Signal;
|
|
|
|
toString(): string;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class SinglePad {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
constructor(game: Phaser.Game, padParent: any);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
callbackContext: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
connected: boolean;
|
|
|
|
deadZone: number;
|
|
|
|
game: Phaser.Game;
|
|
|
|
index: number;
|
|
|
|
onAxisCallback: Function;
|
|
|
|
onConnectCallback: Function;
|
|
|
|
onDisconnectCallback: Function;
|
|
|
|
onDownCallback: Function;
|
|
|
|
onFloatCallback: Function;
|
|
|
|
onUpCallback: Function;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
axis(axisCode: number): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
addCallbacks(context: any, callbacks: any): void;
|
2014-06-11 14:23:54 +00:00
|
|
|
buttonValue(buttonCode: number): number;
|
2014-09-01 15:55:02 +00:00
|
|
|
connect(rawPad: any): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
destroy(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
disconnect(): void;
|
2015-09-13 20:43:38 +00:00
|
|
|
getButton(buttonCode: number): Phaser.DeviceButton;
|
2014-02-26 01:32:38 +00:00
|
|
|
isDown(buttonCode: number): boolean;
|
2014-06-11 14:23:54 +00:00
|
|
|
isUp(buttonCode: number): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
justPressed(buttonCode: number, duration?: number): boolean;
|
|
|
|
justReleased(buttonCode: number, duration?: number): boolean;
|
|
|
|
pollStatus(): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
processAxisChange(axisState: any): void;
|
|
|
|
processButtonDown(buttonCode: number, value: any): void;
|
|
|
|
processButtonFloat(buttonCode: number, value: any): void;
|
|
|
|
processButtonUp(buttonCode: number, value: any): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
reset(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Sound {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-04-26 00:34:19 +00:00
|
|
|
constructor(game: Phaser.Game, key: string, volume?: number, loop?: boolean, connect?: boolean);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
autoplay: boolean;
|
2014-10-09 13:44:25 +00:00
|
|
|
allowMultiple: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
context: any;
|
|
|
|
currentMarker: string;
|
2014-01-07 09:58:00 +00:00
|
|
|
currentTime: number;
|
2014-04-03 19:13:35 +00:00
|
|
|
destroy(remove?: boolean): void;
|
2014-01-07 09:58:00 +00:00
|
|
|
duration: number;
|
2014-05-04 15:36:58 +00:00
|
|
|
durationMS: number;
|
2014-09-01 15:55:02 +00:00
|
|
|
externalNode: any;
|
2015-02-11 22:24:47 +00:00
|
|
|
fadeTween: Phaser.Tween;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2014-09-01 15:55:02 +00:00
|
|
|
gainNode: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
isDecoded: boolean;
|
|
|
|
isDecoding: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
isPlaying: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
key: string;
|
|
|
|
loop: boolean;
|
2014-09-01 15:55:02 +00:00
|
|
|
markers: any;
|
|
|
|
masterGainNode: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
mute: boolean;
|
|
|
|
name: string;
|
2014-01-07 09:58:00 +00:00
|
|
|
onDecoded: Phaser.Signal;
|
2015-02-24 01:22:13 +00:00
|
|
|
onEndedHandler: () => void;
|
2014-09-25 08:38:38 +00:00
|
|
|
onFadeComplete: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
onLoop: Phaser.Signal;
|
|
|
|
onMarkerComplete: Phaser.Signal;
|
|
|
|
onMute: Phaser.Signal;
|
2014-01-07 09:58:00 +00:00
|
|
|
onPause: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
onPlay: Phaser.Signal;
|
2014-01-07 09:58:00 +00:00
|
|
|
onResume: Phaser.Signal;
|
|
|
|
onStop: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
override: boolean;
|
|
|
|
paused: boolean;
|
|
|
|
pausedPosition: number;
|
|
|
|
pausedTime: number;
|
|
|
|
pendingPlayback: boolean;
|
2014-05-04 15:36:58 +00:00
|
|
|
position: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
startTime: number;
|
|
|
|
stopTime: number;
|
|
|
|
totalDuration: number;
|
|
|
|
usingAudioTag: boolean;
|
|
|
|
usingWebAudio: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
volume: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-07-03 13:04:14 +00:00
|
|
|
addMarker(name: string, start: number, duration: number, volume?: number, loop?: boolean): void;
|
2014-04-03 19:13:35 +00:00
|
|
|
destroy(): void;
|
2015-02-11 22:24:47 +00:00
|
|
|
fadeIn(duration?: number, loop?: boolean, marker?: string): void;
|
2014-09-25 08:38:38 +00:00
|
|
|
fadeOut(duration?: number): void;
|
2014-10-20 09:52:49 +00:00
|
|
|
fadeTo(duration?: number, volume?: number): void;
|
2015-02-11 22:24:47 +00:00
|
|
|
loopFull(volume?: number): Phaser.Sound;
|
2014-02-26 01:32:38 +00:00
|
|
|
pause(): void;
|
|
|
|
play(marker?: string, position?: number, volume?: number, loop?: boolean, forceRestart?: boolean): Phaser.Sound;
|
2014-01-07 09:58:00 +00:00
|
|
|
removeMarker(name: string): void;
|
|
|
|
restart(marker: string, position: number, volume?: number, loop?: boolean): void;
|
|
|
|
resume(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
soundHasUnlocked(key: string): void;
|
2014-01-07 09:58:00 +00:00
|
|
|
stop(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class SoundManager {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
channels: number;
|
|
|
|
connectToMaster: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
context: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
mute: boolean;
|
2016-04-06 01:09:22 +00:00
|
|
|
muteOnPause: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
noAudio: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
onSoundDecode: Phaser.Signal;
|
2015-05-09 01:55:12 +00:00
|
|
|
onVolumeChange: Phaser.Signal;
|
|
|
|
onMute: Phaser.Signal;
|
|
|
|
onUnMute: Phaser.Signal;
|
2014-01-07 09:58:00 +00:00
|
|
|
touchLocked: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
usingAudioTag: boolean;
|
|
|
|
usingWebAudio: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
volume: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
add(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound;
|
2014-09-25 08:38:38 +00:00
|
|
|
addSprite(key: string): Phaser.AudioSprite;
|
2014-01-07 09:58:00 +00:00
|
|
|
boot(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
decode(key: string, sound?: Phaser.Sound): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
destroy(): void;
|
2014-01-07 09:58:00 +00:00
|
|
|
pauseAll(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
play(key: string, volume?: number, loop?: boolean): Phaser.Sound;
|
2014-04-03 19:13:35 +00:00
|
|
|
remove(sound: Phaser.Sound): boolean;
|
|
|
|
removeByKey(key: string): number;
|
2014-01-07 09:58:00 +00:00
|
|
|
resumeAll(): void;
|
2015-10-06 14:30:54 +00:00
|
|
|
setDecodedCallback(files: string[] | Phaser.Sound[], callback: Function, callbackContext: any): void;
|
2015-05-09 01:55:12 +00:00
|
|
|
setTouchLock(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
stopAll(): void;
|
2015-05-09 01:55:12 +00:00
|
|
|
unlock(): boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
class Sprite extends PIXI.Sprite {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
constructor(game: Phaser.Game, x: number, y: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture, frame?: string | number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
alive: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
anchor: Phaser.Point;
|
2014-03-20 11:07:37 +00:00
|
|
|
angle: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
animations: Phaser.AnimationManager;
|
|
|
|
autoCull: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
body: Phaser.Physics.Arcade.Body | Phaser.Physics.P2.Body | Phaser.Physics.Ninja.Body | any;
|
2015-02-16 15:47:55 +00:00
|
|
|
bottom: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
cameraOffset: Phaser.Point;
|
2014-03-03 23:46:24 +00:00
|
|
|
checkWorldBounds: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
components: any;
|
2014-06-10 22:37:33 +00:00
|
|
|
cropRect: Phaser.Rectangle;
|
2015-07-20 20:36:36 +00:00
|
|
|
customRender: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
debug: boolean;
|
|
|
|
deltaX: number;
|
|
|
|
deltaY: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
deltaZ: number;
|
2014-04-23 07:26:26 +00:00
|
|
|
destroyPhase: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
events: Phaser.Events;
|
|
|
|
exists: boolean;
|
|
|
|
fixedToCamera: boolean;
|
2015-10-06 14:30:54 +00:00
|
|
|
frame: string | number;
|
2014-02-26 01:32:38 +00:00
|
|
|
frameName: string;
|
2015-02-24 01:22:13 +00:00
|
|
|
fresh: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
health: number;
|
|
|
|
inCamera: boolean;
|
|
|
|
input: Phaser.InputHandler;
|
|
|
|
inputEnabled: boolean;
|
|
|
|
inWorld: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture;
|
2015-02-16 15:47:55 +00:00
|
|
|
left: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
lifespan: number;
|
2015-06-17 01:00:04 +00:00
|
|
|
maxHealth: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
name: string;
|
2015-02-16 15:47:55 +00:00
|
|
|
offsetX: number;
|
|
|
|
offsetY: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
outOfBoundsKill: boolean;
|
2015-07-08 18:09:42 +00:00
|
|
|
pendingDestroy: boolean;
|
2015-02-24 01:22:13 +00:00
|
|
|
previousPosition: Phaser.Point;
|
|
|
|
previousRotation: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
position: Phaser.Point;
|
2014-03-03 23:46:24 +00:00
|
|
|
physicsEnabled: boolean;
|
2015-03-24 21:28:24 +00:00
|
|
|
physicsType: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
renderOrderID: number;
|
2015-02-16 15:47:55 +00:00
|
|
|
right: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
scale: Phaser.Point;
|
2014-11-10 21:15:52 +00:00
|
|
|
scaleMin: Phaser.Point;
|
|
|
|
scaleMax: Phaser.Point;
|
2014-03-20 11:07:37 +00:00
|
|
|
smoothed: boolean;
|
2015-02-16 15:47:55 +00:00
|
|
|
top: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
type: number;
|
2015-05-09 01:55:12 +00:00
|
|
|
tintedTexture: HTMLCanvasElement;
|
2015-07-20 20:36:36 +00:00
|
|
|
transformCallback: Function;
|
2015-08-28 09:10:29 +00:00
|
|
|
transformCallbackContext: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
world: Phaser.Point;
|
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
z: number;
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
bringToTop(): Phaser.Sprite;
|
2014-06-10 22:37:33 +00:00
|
|
|
crop(rect: Phaser.Rectangle, copy: boolean): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
checkTransform(wt: PIXI.Matrix): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
damage(amount: number): Phaser.Sprite;
|
2014-03-20 11:07:37 +00:00
|
|
|
destroy(destroyChildren?: boolean): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
drawPolygon(): void;
|
2015-06-17 01:00:04 +00:00
|
|
|
heal(amount: number): Phaser.Sprite;
|
2014-02-26 01:32:38 +00:00
|
|
|
kill(): Phaser.Sprite;
|
2015-10-06 14:30:54 +00:00
|
|
|
loadTexture(key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number, stopAnimation?: boolean): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
moveUp(): Phaser.Sprite;
|
|
|
|
moveDown(): Phaser.Sprite;
|
|
|
|
overlap(displayObject: Phaser.Sprite | Phaser.Image | Phaser.TileSprite | Phaser.Button | PIXI.DisplayObject): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
|
|
|
postUpdate(): void;
|
|
|
|
preUpdate(): void;
|
|
|
|
reset(x: number, y: number, health?: number): Phaser.Sprite;
|
2014-06-10 22:37:33 +00:00
|
|
|
resetFrame(): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
resizeFrame(parent: any, width: number, height: number): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
revive(health?: number): Phaser.Sprite;
|
2015-07-20 20:36:36 +00:00
|
|
|
sendToBack(): Phaser.Sprite;
|
2014-06-10 22:37:33 +00:00
|
|
|
setFrame(frame: Phaser.Frame): void;
|
2014-11-10 21:15:52 +00:00
|
|
|
setScaleMinMax(minX?: number, minY?: number, maxX?: number, maxY?: number): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
update(): void;
|
2014-06-10 22:37:33 +00:00
|
|
|
updateCrop(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class SpriteBatch extends Phaser.Group {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-02-11 22:24:47 +00:00
|
|
|
constructor(game: Phaser.Game, parent: PIXI.DisplayObjectContainer, name?: string, addedToStage?: boolean);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
type: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2016-02-02 23:30:03 +00:00
|
|
|
class Stage extends PIXI.DisplayObjectContainer {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 02:40:26 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2014-03-03 23:46:24 +00:00
|
|
|
name: string;
|
2016-02-02 23:30:03 +00:00
|
|
|
disableVisibilityChange: boolean;
|
|
|
|
exists: boolean;
|
|
|
|
currentRenderOrderID: number;
|
|
|
|
backgroundColor: any;
|
2014-03-10 16:58:12 +00:00
|
|
|
smoothed: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
parseConfig(config: any): void;
|
2014-03-03 23:46:24 +00:00
|
|
|
preUpdate(): void;
|
|
|
|
update(): void;
|
2016-02-02 23:30:03 +00:00
|
|
|
postUpdate(): void;
|
2015-01-02 18:21:30 +00:00
|
|
|
updateTransform(): void;
|
2016-02-02 23:30:03 +00:00
|
|
|
checkVisibility(): void;
|
2015-02-24 01:22:13 +00:00
|
|
|
visibilityChange(event: Event): void;
|
2016-02-02 23:30:03 +00:00
|
|
|
setBackgroundColor(backgroundColor: number | string): void;
|
|
|
|
destroy(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-09-01 15:54:05 +00:00
|
|
|
interface ResizeCallback {
|
2015-03-23 08:13:06 +00:00
|
|
|
(scale: ScaleManager, parentBounds: Rectangle): any;
|
2014-09-01 15:54:05 +00:00
|
|
|
}
|
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
class ScaleManager {
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
constructor(game: Phaser.Game, width: number | string, height: number | string);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
static EXACT_FIT: number;
|
|
|
|
static NO_SCALE: number;
|
|
|
|
static SHOW_ALL: number;
|
2014-09-01 02:40:26 +00:00
|
|
|
static RESIZE: number;
|
2014-11-10 21:15:52 +00:00
|
|
|
static USER_SCALE: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
aspectRatio: number;
|
2014-11-14 20:16:46 +00:00
|
|
|
bounds: Rectangle;
|
2014-11-18 12:54:07 +00:00
|
|
|
boundingParent: HTMLElement;
|
2014-11-10 21:15:52 +00:00
|
|
|
compatibility: {
|
2014-11-18 12:54:07 +00:00
|
|
|
canExpandParent: boolean;
|
2015-01-02 18:21:30 +00:00
|
|
|
clickTrampoline: string;
|
2014-11-18 12:54:07 +00:00
|
|
|
forceMinimumDocumentHeight: boolean;
|
2014-11-10 21:15:52 +00:00
|
|
|
noMargins: boolean;
|
2014-11-14 20:16:46 +00:00
|
|
|
scrollTo: Point;
|
2014-11-18 12:54:07 +00:00
|
|
|
supportsFullScreen: boolean;
|
2014-11-10 21:15:52 +00:00
|
|
|
};
|
2014-11-14 20:16:46 +00:00
|
|
|
currentScaleMode: number;
|
2014-11-18 12:54:07 +00:00
|
|
|
dom: Phaser.DOM;
|
2014-11-14 20:16:46 +00:00
|
|
|
enterIncorrectOrientation: Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
event: any;
|
2014-03-20 11:07:37 +00:00
|
|
|
forceLandscape: boolean;
|
2014-11-14 20:16:46 +00:00
|
|
|
forcePortrait: boolean;
|
2014-04-23 09:47:00 +00:00
|
|
|
fullScreenScaleMode: number;
|
2014-11-14 20:16:46 +00:00
|
|
|
fullScreenTarget: HTMLElement;
|
2014-11-24 15:53:47 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
grid: Phaser.FlexGrid;
|
2014-11-14 20:16:46 +00:00
|
|
|
height: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
incorrectOrientation: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
isFullScreen: boolean;
|
2015-01-27 12:14:06 +00:00
|
|
|
isGameLandscape: boolean; //readonly
|
|
|
|
isGamePortrait: boolean; //readonly
|
2014-02-26 01:32:38 +00:00
|
|
|
isPortrait: boolean;
|
2014-11-14 20:16:46 +00:00
|
|
|
isLandscape: boolean;
|
|
|
|
leaveIncorrectOrientation: Signal;
|
2014-11-10 21:15:52 +00:00
|
|
|
margin: { left: number; top: number; right: number; bottom: number; x: number; y: number; };
|
2014-11-14 20:16:46 +00:00
|
|
|
maxHeight: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
maxWidth: number;
|
|
|
|
minHeight: number;
|
|
|
|
minWidth: number;
|
2014-11-14 20:16:46 +00:00
|
|
|
offset: Point;
|
2014-11-16 22:10:48 +00:00
|
|
|
onFullScreenInit: Phaser.Signal;
|
2014-11-18 12:54:07 +00:00
|
|
|
onFullScreenChange: Phaser.Signal;
|
|
|
|
onFullScreenError: Phaser.Signal;
|
|
|
|
onOrientationChange: Phaser.Signal;
|
2014-11-14 20:16:46 +00:00
|
|
|
onSizeChange: Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
pageAlignHorizontally: boolean;
|
|
|
|
pageAlignVertically: boolean;
|
2014-11-14 20:16:46 +00:00
|
|
|
parentNode: HTMLElement;
|
2014-09-01 02:40:26 +00:00
|
|
|
parentIsWindow: boolean;
|
2014-11-14 20:16:46 +00:00
|
|
|
parentScaleFactor: Point;
|
|
|
|
scaleFactor: Point;
|
|
|
|
scaleFactorInversed: Point;
|
2014-09-10 23:02:23 +00:00
|
|
|
scaleMode: number;
|
2014-11-14 20:16:46 +00:00
|
|
|
screenOrientation: string;
|
2014-03-03 23:46:24 +00:00
|
|
|
sourceAspectRatio: number;
|
2014-09-01 02:40:26 +00:00
|
|
|
trackParentInterval: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
width: number;
|
2014-11-14 20:16:46 +00:00
|
|
|
windowConstraints: {
|
2016-02-03 22:22:17 +00:00
|
|
|
bottom: string;
|
|
|
|
right: string;
|
2014-11-14 20:16:46 +00:00
|
|
|
};
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-11-14 20:16:46 +00:00
|
|
|
boot(): void;
|
2014-11-10 21:15:52 +00:00
|
|
|
createFullScreenTarget(): HTMLDivElement;
|
2014-09-01 02:40:26 +00:00
|
|
|
destroy(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
forceOrientation(forceLandscape: boolean, forcePortrait?: boolean): void;
|
2014-11-14 20:16:46 +00:00
|
|
|
getParentBounds(target?: Rectangle): Rectangle;
|
2014-09-01 15:55:02 +00:00
|
|
|
parseConfig(config: any): void;
|
2014-09-01 02:40:26 +00:00
|
|
|
preUpdate(): void;
|
2014-11-14 20:16:46 +00:00
|
|
|
pauseUpdate(): void;
|
|
|
|
refresh(): void;
|
|
|
|
setGameSize(width: number, height: number): void;
|
2014-09-01 15:54:05 +00:00
|
|
|
setResizeCallback(callback: ResizeCallback, context: any): void;
|
2014-11-18 12:54:07 +00:00
|
|
|
setUserScale(hScale: number, vScale: number, hTrim?: number, vTrim?: number): void;
|
2014-11-14 20:16:46 +00:00
|
|
|
setMinMax(minWidth: number, minHeight: number, maxWidth?: number, maxHeight?: number): void;
|
|
|
|
setupScale(width: number, height: number): void;
|
2014-11-24 15:53:47 +00:00
|
|
|
setupScale(width: string, height: string): void;
|
2014-11-23 11:32:13 +00:00
|
|
|
scaleSprite(sprite: Sprite, width?: number, height?: number, letterBox?: boolean): Sprite;
|
2014-11-14 20:16:46 +00:00
|
|
|
scaleSprite(sprite: Image, width?: number, height?: number, letterBox?: boolean): Sprite;
|
|
|
|
startFullScreen(antialias?: boolean, allowTrampoline?: boolean): boolean;
|
2014-11-05 15:20:08 +00:00
|
|
|
stopFullScreen(): boolean;
|
2014-11-14 20:16:46 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class DOM {
|
|
|
|
|
2014-11-18 12:54:07 +00:00
|
|
|
static visualBounds: Phaser.Rectangle;
|
|
|
|
static layoutBounds: Phaser.Rectangle;
|
|
|
|
static documentBounds: Phaser.Rectangle;
|
|
|
|
|
2014-11-14 20:16:46 +00:00
|
|
|
static calibrate(coords: any, cushion?: number): any;
|
|
|
|
static getAspectRatio(object: any): number;
|
|
|
|
static getScreenOrientation(primaryFallback?: string): string;
|
|
|
|
static getBounds(element: any, cushion?: number): any;
|
|
|
|
static getOffset(element: any, point?: Point): Point;
|
2014-11-18 12:54:07 +00:00
|
|
|
static inLayoutViewport(element: any, cushion?: number): boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
2013-10-25 03:24:35 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class State {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
add: Phaser.GameObjectFactory;
|
|
|
|
cache: Phaser.Cache;
|
|
|
|
camera: Phaser.Camera;
|
2014-04-26 00:34:19 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
input: Phaser.Input;
|
2015-03-24 21:28:24 +00:00
|
|
|
key: string;
|
2014-02-26 01:32:38 +00:00
|
|
|
load: Phaser.Loader;
|
2014-03-20 11:07:37 +00:00
|
|
|
make: Phaser.GameObjectCreator;
|
2014-02-26 01:32:38 +00:00
|
|
|
particles: Phaser.Particles;
|
2014-11-23 11:32:13 +00:00
|
|
|
physics: Phaser.Physics;
|
2014-03-20 11:07:37 +00:00
|
|
|
rnd: Phaser.RandomDataGenerator;
|
|
|
|
scale: Phaser.ScaleManager;
|
2014-04-26 00:34:19 +00:00
|
|
|
sound: Phaser.SoundManager;
|
2014-02-26 01:32:38 +00:00
|
|
|
stage: Phaser.Stage;
|
2014-04-26 00:34:19 +00:00
|
|
|
time: Phaser.Time;
|
2014-02-26 01:32:38 +00:00
|
|
|
tweens: Phaser.TweenManager;
|
|
|
|
world: Phaser.World;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
create(): void;
|
2015-04-10 11:53:20 +00:00
|
|
|
init(...args: any[]): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
loadRender(): void;
|
|
|
|
loadUpdate(): void;
|
|
|
|
paused(): void;
|
2015-01-27 12:14:06 +00:00
|
|
|
pauseUpdate(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
preload(): void;
|
2015-04-24 16:16:31 +00:00
|
|
|
preRender(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
render(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
resize(): void;
|
2015-04-24 16:16:31 +00:00
|
|
|
resumed(): void;
|
2014-03-19 15:09:44 +00:00
|
|
|
shutdown(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2015-01-22 12:28:31 +00:00
|
|
|
interface IStateCycle {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
preUpdate(): void;
|
|
|
|
update(): void;
|
|
|
|
render(): void;
|
|
|
|
postRender(): void;
|
|
|
|
destroy(): void;
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class StateManager {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game, pendingState?: Phaser.State);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-04-24 16:16:31 +00:00
|
|
|
created: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
current: string;
|
|
|
|
game: Phaser.Game;
|
|
|
|
onCreateCallback: Function;
|
|
|
|
onInitCallback: Function;
|
|
|
|
onLoadRenderCallback: Function;
|
|
|
|
onLoadUpdateCallback: Function;
|
2014-04-26 00:34:19 +00:00
|
|
|
onPausedCallback: Function;
|
2014-05-04 15:36:58 +00:00
|
|
|
onPauseUpdateCallback: Function;
|
2014-02-26 01:32:38 +00:00
|
|
|
onPreloadCallback: Function;
|
|
|
|
onPreRenderCallback: Function;
|
|
|
|
onRenderCallback: Function;
|
2014-03-10 16:58:12 +00:00
|
|
|
onResumedCallback: Function;
|
2014-09-10 23:02:23 +00:00
|
|
|
onResizeCallback: Function;
|
2014-02-26 01:32:38 +00:00
|
|
|
onShutDownCallback: Function;
|
|
|
|
onUpdateCallback: Function;
|
2014-09-01 15:55:02 +00:00
|
|
|
states: any;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-05-25 16:08:07 +00:00
|
|
|
onStateChange: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
add(key: string, state: any, autoStart?: boolean): void;
|
|
|
|
checkState(key: string): boolean;
|
2014-09-10 23:02:23 +00:00
|
|
|
clearCurrentState(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
destroy(): void;
|
|
|
|
getCurrentState(): Phaser.State;
|
|
|
|
link(key: string): void;
|
|
|
|
loadComplete(): void;
|
2014-12-02 14:11:43 +00:00
|
|
|
preRender(elapsedTime: number): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
preUpdate(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
render(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
remove(key: string): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
resume(): void;
|
2014-04-19 08:05:43 +00:00
|
|
|
restart(clearWorld?: boolean, clearCache?: boolean): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
resize(width: number, height: number): void;
|
2014-04-26 00:34:19 +00:00
|
|
|
start(key: string, clearWorld?: boolean, clearCache?: boolean, ...args: any[]): void;
|
2014-01-07 09:58:00 +00:00
|
|
|
update(): void;
|
2014-09-25 08:38:38 +00:00
|
|
|
unlink(key: string): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2015-06-23 20:50:27 +00:00
|
|
|
interface PhaserTextStyle {
|
|
|
|
|
|
|
|
font?: string;
|
|
|
|
fill?: any;
|
|
|
|
align?: string;
|
|
|
|
stroke?: string;
|
|
|
|
strokeThickness?: number;
|
|
|
|
wordWrap?: boolean;
|
|
|
|
wordWrapWidth?: number;
|
2016-04-03 14:57:15 +00:00
|
|
|
maxLines?: number;
|
2015-06-23 20:50:27 +00:00
|
|
|
shadowOffsetX?: number;
|
|
|
|
shadowOffsetY?: number;
|
|
|
|
shadowColor?: string;
|
|
|
|
shadowBlur?: number;
|
|
|
|
valign?: string;
|
2015-07-17 00:08:45 +00:00
|
|
|
tab?: number;
|
|
|
|
tabs?: number;
|
2015-06-23 20:50:27 +00:00
|
|
|
|
2015-08-29 21:08:07 +00:00
|
|
|
fontSize?: number;
|
2015-06-23 20:50:27 +00:00
|
|
|
fontStyle?: string;
|
|
|
|
fontVariant?: string;
|
2015-10-06 14:30:54 +00:00
|
|
|
fontWeight?: string | number;
|
2015-06-23 20:50:27 +00:00
|
|
|
backgroundColor?: string;
|
|
|
|
boundsAlignH?: string;
|
|
|
|
boundsAlignV?: string;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-06-17 16:18:04 +00:00
|
|
|
class Text extends Phaser.Sprite {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-06-23 20:50:27 +00:00
|
|
|
constructor(game: Phaser.Game, x: number, y: number, text: string, style?: PhaserTextStyle);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-06-17 16:18:04 +00:00
|
|
|
static fontPropertiesCanvas: any;
|
|
|
|
static fontPropertiesContext: any;
|
|
|
|
static fontPropertiesCache: any;
|
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
align: string;
|
2014-02-26 01:32:38 +00:00
|
|
|
angle: number;
|
2015-07-02 12:39:59 +00:00
|
|
|
autoRound: boolean;
|
2015-06-17 16:18:04 +00:00
|
|
|
boundsAlignH: string;
|
|
|
|
boundsAlignV: string;
|
2014-02-26 01:32:38 +00:00
|
|
|
cameraOffset: Phaser.Point;
|
2015-06-17 16:18:04 +00:00
|
|
|
canvas: HTMLCanvasElement;
|
2014-09-25 08:38:38 +00:00
|
|
|
colors: string[];
|
2015-06-17 16:18:04 +00:00
|
|
|
context: CanvasRenderingContext2D;
|
2015-02-11 22:24:47 +00:00
|
|
|
cssFont: string;
|
2014-04-23 07:26:26 +00:00
|
|
|
destroyPhase: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
events: Phaser.Events;
|
2014-02-26 01:32:38 +00:00
|
|
|
exists: boolean;
|
2014-09-01 15:55:02 +00:00
|
|
|
fill: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
fixedToCamera: boolean;
|
|
|
|
font: string;
|
2015-10-06 14:30:54 +00:00
|
|
|
fontSize: number | string;
|
2015-02-11 22:24:47 +00:00
|
|
|
fontStyle: string;
|
2015-07-28 07:05:08 +00:00
|
|
|
fontStyles: string[];
|
2015-02-11 22:24:47 +00:00
|
|
|
fontVariant: string;
|
2015-10-06 14:30:54 +00:00
|
|
|
fontWeight: string | number;
|
|
|
|
fontWeights: (string | number)[];
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2014-03-03 23:46:24 +00:00
|
|
|
input: Phaser.InputHandler;
|
|
|
|
inputEnabled: boolean;
|
|
|
|
lineSpacing: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
name: string;
|
2015-03-24 21:28:24 +00:00
|
|
|
padding: Phaser.Point;
|
2015-07-08 18:09:42 +00:00
|
|
|
pendingDestroy: boolean;
|
2015-03-24 21:28:24 +00:00
|
|
|
physicsType: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
position: Phaser.Point;
|
2015-02-17 06:01:42 +00:00
|
|
|
previousPosition: Phaser.Point;
|
|
|
|
previousRotation: number;
|
|
|
|
renderOrderID: number;
|
2015-06-17 16:18:04 +00:00
|
|
|
resolution: number;
|
2014-03-03 23:46:24 +00:00
|
|
|
shadowBlur: number;
|
|
|
|
shadowColor: string;
|
2015-05-09 01:55:12 +00:00
|
|
|
shadowFill: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
shadowOffsetX: number;
|
|
|
|
shadowOffsetY: number;
|
2015-05-09 01:55:12 +00:00
|
|
|
shadowStroke: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
stroke: string;
|
2015-07-08 11:52:39 +00:00
|
|
|
strokeColors: string[];
|
2014-03-03 23:46:24 +00:00
|
|
|
strokeThickness: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
scale: Phaser.Point;
|
2015-07-17 00:08:45 +00:00
|
|
|
tab: number;
|
2015-10-06 14:30:54 +00:00
|
|
|
tabs: number | number[];
|
2014-02-26 01:32:38 +00:00
|
|
|
text: string;
|
2015-06-17 16:18:04 +00:00
|
|
|
textBounds: Phaser.Rectangle;
|
2014-03-03 23:46:24 +00:00
|
|
|
type: number;
|
2016-02-04 16:00:21 +00:00
|
|
|
useAdvancedWrap: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
world: Phaser.Point;
|
2014-03-03 23:46:24 +00:00
|
|
|
wordWrap: boolean;
|
|
|
|
wordWrapWidth: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
z: number;
|
|
|
|
|
2015-06-17 16:18:04 +00:00
|
|
|
addColor(color: string, position: number): Phaser.Text;
|
2015-07-28 07:05:08 +00:00
|
|
|
addFontStyle(style: string, position: number): Phaser.Text;
|
|
|
|
addFontWeight(weight: string, position: number): Phaser.Text;
|
2015-07-08 11:52:39 +00:00
|
|
|
addStrokeColor(color: string, position: number): Phaser.Text;
|
2015-06-17 16:18:04 +00:00
|
|
|
clearColors(): Phaser.Text;
|
2015-07-28 07:05:08 +00:00
|
|
|
clearFontValues(): Phaser.Text;
|
2015-02-11 22:24:47 +00:00
|
|
|
componentsToFont(components: any): string;
|
2014-03-20 11:07:37 +00:00
|
|
|
destroy(destroyChildren?: boolean): void;
|
2015-02-11 22:24:47 +00:00
|
|
|
fontToComponents(font: string): any;
|
2014-03-03 23:46:24 +00:00
|
|
|
postUpdate(): void;
|
2015-07-17 00:08:45 +00:00
|
|
|
parseList(list: any[]): Phaser.Text;
|
2016-02-02 23:37:08 +00:00
|
|
|
precalculateWordWrap(text: string): string[];
|
2014-03-03 23:46:24 +00:00
|
|
|
preUpdate(): void;
|
2015-07-22 21:57:14 +00:00
|
|
|
renderTabLine(line: string, x: number, y: number, fill?: boolean): void;
|
2015-06-17 16:18:04 +00:00
|
|
|
setShadow(x?: number, y?: number, color?: any, blur?: number, shadowStroke?: boolean, shadowFill?: boolean): Phaser.Text;
|
2015-06-23 20:50:27 +00:00
|
|
|
setStyle(style?: PhaserTextStyle): Phaser.Text;
|
2015-06-17 16:18:04 +00:00
|
|
|
setText(text: string): Phaser.Text;
|
|
|
|
setTextBounds(x?: number, y?: number, width?: number, height?: number): Phaser.Text;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(): void;
|
2015-02-11 22:24:47 +00:00
|
|
|
updateFont(components: any): void;
|
|
|
|
updateLine(text: string, x?: number, y?: number): void;
|
2015-05-09 01:55:12 +00:00
|
|
|
updateShadow(state?: boolean): void;
|
|
|
|
updateTexture(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
2013-10-25 03:24:35 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Tile {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
constructor(layer: any, index: number, x: number, y: Number, width: number, height: number);//
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
alpha: number;
|
|
|
|
bottom: number;
|
|
|
|
callback: Function;
|
2014-09-01 15:55:02 +00:00
|
|
|
callbackContext: any;
|
2014-03-20 11:07:37 +00:00
|
|
|
centerX: number;
|
|
|
|
centerY: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
canCollide: boolean;
|
|
|
|
collideDown: boolean;
|
|
|
|
collideLeft: boolean;
|
|
|
|
collideNone: boolean;
|
|
|
|
collideRight: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
collisionCallback: Function;
|
2014-09-01 15:55:02 +00:00
|
|
|
collisionCallbackContext: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
collides: boolean;
|
|
|
|
collideUp: boolean;
|
|
|
|
faceBottom: boolean;
|
|
|
|
faceLeft: boolean;
|
|
|
|
faceRight: boolean;
|
|
|
|
faceTop: boolean;
|
|
|
|
game: Phaser.Game;
|
|
|
|
height: number;
|
|
|
|
index: number;
|
2014-09-01 15:55:02 +00:00
|
|
|
layer: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
left: number;
|
2014-09-01 15:55:02 +00:00
|
|
|
properties: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
right: number;
|
|
|
|
scanned: boolean;
|
|
|
|
top: number;
|
|
|
|
width: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
worldX: number;
|
|
|
|
worldY: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
x: number;
|
|
|
|
y: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-08-06 15:24:33 +00:00
|
|
|
copy(tile: Phaser.Tile): Phaser.Tile;
|
2014-03-20 11:07:37 +00:00
|
|
|
containsPoint(x: number, y: number): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
destroy(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
intersects(x: number, y: number, right: number, bottom: number): boolean;
|
|
|
|
isInterested(collides: boolean, faces: boolean): boolean;
|
|
|
|
resetCollision(): void;
|
|
|
|
setCollision(left: boolean, right: boolean, up: boolean, down: boolean): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
setCollisionCallback(callback: Function, context: any): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
2013-10-25 03:24:35 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
class Tilemap {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
constructor(game: Phaser.Game, key?: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
static CSV: number;
|
|
|
|
static TILED_JSON: number;
|
2014-05-14 14:54:40 +00:00
|
|
|
static NORTH: number;
|
|
|
|
static EAST: number;
|
|
|
|
static SOUTH: number;
|
|
|
|
static WEST: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-03 23:46:24 +00:00
|
|
|
collision: any[];
|
2014-03-10 16:58:12 +00:00
|
|
|
collideIndexes: any[];
|
2014-02-26 01:32:38 +00:00
|
|
|
currentLayer: number;
|
|
|
|
debugMap: any[];
|
2014-05-14 14:54:40 +00:00
|
|
|
format: number;
|
2014-08-28 13:56:27 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
height: number;
|
|
|
|
heightInPixels: number;
|
|
|
|
images: any[];
|
2015-07-07 07:48:20 +00:00
|
|
|
imagecollections: ImageCollection[];
|
2014-08-28 13:56:27 +00:00
|
|
|
key: string;
|
2014-05-29 16:50:10 +00:00
|
|
|
layer: Phaser.TilemapLayer[];
|
2014-09-01 15:55:02 +00:00
|
|
|
layers: any[];
|
2014-02-26 01:32:38 +00:00
|
|
|
objects: any[];
|
|
|
|
orientation: string;
|
2014-09-01 15:55:02 +00:00
|
|
|
properties: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
tileHeight: number;
|
|
|
|
tiles: Phaser.Tile[];
|
|
|
|
tilesets: Phaser.Tileset[];
|
|
|
|
tileWidth: number;
|
|
|
|
version: number;
|
|
|
|
width: number;
|
|
|
|
widthInPixels: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-06-23 20:50:27 +00:00
|
|
|
addTilesetImage(tileset: string, key?: string | Phaser.BitmapData, tileWidth?: number, tileHeight?: number, tileMargin?: number, tileSpacing?: number, gid?: number): Phaser.Tileset;
|
2014-02-26 01:32:38 +00:00
|
|
|
calculateFaces(layer: number): void;
|
|
|
|
copy(x: number, y: number, width: number, height: number, layer?: any): Phaser.Tile[];
|
2014-05-29 16:50:10 +00:00
|
|
|
create(name: string, width: number, height: number, tileWidth: number, tileHeight: number, group?: Phaser.Group): Phaser.TilemapLayer;
|
2014-03-19 15:09:44 +00:00
|
|
|
createBlankLayer(name: string, width: number, height: number, tileWidth: number, tileHeight: number, group?: Phaser.Group): Phaser.TilemapLayer;
|
2014-09-01 15:55:02 +00:00
|
|
|
createFromObjects(name: string, gid: number, key: string, frame?: any, exists?: boolean, autoCull?: boolean, group?: Phaser.Group, CustomClass?: any, adjustY?: boolean): void;
|
2014-11-14 20:16:46 +00:00
|
|
|
createFromTiles(tiles: any, replacements: any, key: string, layer?: any, group?: Phaser.Group, properties?: any): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
createLayer(layer: any, width?: number, height?: number, group?: Phaser.Group): Phaser.TilemapLayer;
|
|
|
|
destroy(): void;
|
|
|
|
dump(): void;
|
|
|
|
fill(index: number, x: number, y: number, width: number, height: number, layer?: any): void;
|
2014-05-07 23:57:19 +00:00
|
|
|
forEach(callback: Function, context: any, x: number, y: Number, width: number, height: number, layer?: any): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
getImageIndex(name: string): number;
|
|
|
|
getIndex(location: any[], name: string): number;
|
|
|
|
getLayer(layer: any): number;
|
|
|
|
getLayerIndex(name: string): number;
|
|
|
|
getObjectIndex(name: string): number;
|
2014-05-14 14:54:40 +00:00
|
|
|
getTile(x: number, y: number, layer?: any, nonNull?: boolean): Phaser.Tile;
|
2014-02-26 01:32:38 +00:00
|
|
|
getTileAbove(layer: number, x: number, y: number): Phaser.Tile;
|
|
|
|
getTileBelow(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;
|
|
|
|
getTilesetIndex(name: string): number;
|
2015-10-06 14:30:54 +00:00
|
|
|
getTileWorldXY(x: number, y: number, tileWidth?: number, tileHeight?: number, layer?: number | string | Phaser.TilemapLayer, nonNull?: boolean): Phaser.Tile;
|
2014-03-10 16:58:12 +00:00
|
|
|
hasTile(x: number, y: number, layer: Phaser.TilemapLayer): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
paste(x: number, y: number, tileblock: Phaser.Tile[], layer?: any): void;
|
2014-03-21 23:59:44 +00:00
|
|
|
putTile(tile: any, x: number, y: number, layer?: any): Phaser.Tile;
|
2014-02-26 01:32:38 +00:00
|
|
|
putTileWorldXY(tile: any, x: number, y: number, tileWidth: number, tileHeight: number, layer?: any): void;
|
|
|
|
random(x: number, y: number, width: number, height: number, layer?: any): void;
|
|
|
|
removeAllLayers(): void;
|
2014-05-29 16:50:10 +00:00
|
|
|
removeTile(x: number, y: number, layer?: any): Phaser.Tile;
|
|
|
|
removeTileWorldXY(x: number, y: number, tileWidth: number, tileHeight: number, layer?: any): Phaser.Tile;
|
2014-02-26 01:32:38 +00:00
|
|
|
replace(source: number, dest: number, x: number, y: number, width: number, height: number, layer?: any): void;
|
2014-05-19 21:33:36 +00:00
|
|
|
searchTileIndex(index: number, skip?: number, reverse?: boolean, layer?: any): Phaser.Tile;
|
2014-05-14 14:54:40 +00:00
|
|
|
setCollision(indexes: any, collides?: boolean, layer?: any, recalculate?: boolean): void;
|
|
|
|
setCollisionBetween(start: number, stop: number, collides?: boolean, layer?: any, recalculate?: boolean): void;
|
|
|
|
setCollisionByExclusion(indexes: any[], collides?: boolean, layer?: any, recalculate?: boolean): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
setCollisionByIndex(index: number, collides?: boolean, layer?: number, recalculate?: boolean): void;
|
|
|
|
setLayer(layer: any): void;
|
2014-07-01 21:42:36 +00:00
|
|
|
setPreventRecalculate(value: boolean): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
setTileIndexCallback(indexes: any, callback: Function, callbackContext: any, layer?: any): void;
|
|
|
|
setTileLocationCallback(x: number, y: number, width: number, height: number, callback: Function, callbackContext: any, layer?: any): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
setTileSize(tileWidth: number, tileHeight: number): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
shuffle(x: number, y: number, width: number, height: number, layer: any): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
swap(tileA: number, tileB: number, x: number, y: number, width: number, height: number, layer?: any): void;
|
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
2013-10-25 03:24:35 +00:00
|
|
|
|
2015-06-23 20:50:27 +00:00
|
|
|
class TilemapLayer extends Phaser.Sprite {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-11-10 21:15:52 +00:00
|
|
|
constructor(game: Phaser.Game, tilemap: Phaser.Tilemap, index: number, width?: number, height?: number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
cameraOffset: Phaser.Point;
|
|
|
|
canvas: HTMLCanvasElement;
|
|
|
|
collisionHeight: number;
|
|
|
|
collisionWidth: number;
|
|
|
|
context: CanvasRenderingContext2D;
|
|
|
|
debug: boolean;
|
|
|
|
debugAlpha: number;
|
|
|
|
debugCallbackColor: string;
|
|
|
|
debugColor: string;
|
2014-11-10 21:15:52 +00:00
|
|
|
debugSettings: { missingImageFill: string; debuggedTileOverfill: string; forceFullRedraw: boolean; debugAlpha: number; facingEdgeStroke: string; collidingTileOverfill: string; };
|
2014-02-26 01:32:38 +00:00
|
|
|
dirty: boolean;
|
2015-03-03 21:14:25 +00:00
|
|
|
exists: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
fixedToCamera: boolean;
|
2014-01-07 09:58:00 +00:00
|
|
|
game: Phaser.Game;
|
2014-02-26 01:32:38 +00:00
|
|
|
index: number;
|
2014-11-10 21:15:52 +00:00
|
|
|
layer: Phaser.TilemapLayer;
|
2014-02-26 01:32:38 +00:00
|
|
|
map: Phaser.Tilemap;
|
2014-01-07 09:58:00 +00:00
|
|
|
name: string;
|
2015-03-24 21:28:24 +00:00
|
|
|
physicsType: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
rayStepRate: number;
|
2015-02-11 22:24:47 +00:00
|
|
|
renderSettings: { enableScrollDelta: boolean; overdrawRatio: number; copyCanvas: any; };
|
2014-02-26 01:32:38 +00:00
|
|
|
scrollFactorX: number;
|
|
|
|
scrollFactorY: number;
|
|
|
|
scrollX: number;
|
|
|
|
scrollY: number;
|
|
|
|
type: number;
|
2014-06-10 23:15:02 +00:00
|
|
|
wrap: boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-08-26 18:07:56 +00:00
|
|
|
destroy(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
getRayCastTiles(line: Phaser.Line, stepRate?: number, collides?: boolean, interestingFace?: boolean): Phaser.Tile[];
|
2014-04-26 00:34:19 +00:00
|
|
|
getTiles(x: number, y: number, width: number, height: number, collides?: boolean, interestingFace?: boolean): Phaser.Tile[];
|
2014-08-17 19:43:03 +00:00
|
|
|
getTileX(x: number): number;
|
2014-03-20 11:07:37 +00:00
|
|
|
getTileXY(x: number, y: number, point: Phaser.Point): Phaser.Point;
|
2014-08-17 19:43:03 +00:00
|
|
|
getTileY(y: number): number;
|
2014-02-26 01:32:38 +00:00
|
|
|
postUpdate(): void;
|
|
|
|
render(): void;
|
2015-07-07 02:27:28 +00:00
|
|
|
resize(width: number, height: number): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
resizeWorld(): void;
|
2014-11-10 21:15:52 +00:00
|
|
|
resetTilesetCache(): void;
|
2015-02-11 22:24:47 +00:00
|
|
|
setScale(xScale?: number, yScale?: number): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
updateMax(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class TilemapParser {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-08-24 12:55:00 +00:00
|
|
|
static INSERT_NULL: boolean;
|
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
static getEmptyData(tileWidth?: number, tileHeight?: number, width?: number, height?: number): any;
|
|
|
|
static parse(game: Phaser.Game, key: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): any;
|
|
|
|
static parseCSV(key: string, data: string, tileWidth?: number, tileHeight?: number): any;
|
|
|
|
static parseJSON(json: any): any;
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
|
|
|
|
2014-02-10 02:42:28 +00:00
|
|
|
class Tileset {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
constructor(name: string, firstgid: number, width?: number, height?: number, margin?: number, spacing?: number, properties?: any);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
columns: number;
|
2014-02-10 02:42:28 +00:00
|
|
|
firstgid: number;
|
2014-09-01 15:55:02 +00:00
|
|
|
image: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
name: string;
|
2014-09-01 15:55:02 +00:00
|
|
|
properties: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
rows: number;
|
2014-02-10 02:42:28 +00:00
|
|
|
tileHeight: number;
|
|
|
|
tileMargin: number;
|
|
|
|
tileSpacing: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
tileWidth: number;
|
|
|
|
total: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-11-10 21:15:52 +00:00
|
|
|
containsTileIndex(tileIndex: number): boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
draw(context: CanvasRenderingContext2D, x: number, y: number, index: number): void;
|
|
|
|
setImage(image: any): void;
|
|
|
|
setSpacing(margin?: number, spacing?: number): void;
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
class TileSprite extends PIXI.TilingSprite {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-10-06 14:30:54 +00:00
|
|
|
constructor(game: Phaser.Game, x: number, y: number, width: number, height: number, key?: string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture, frame?: string | number);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
alive: boolean;
|
2014-03-10 16:58:12 +00:00
|
|
|
angle: number;
|
|
|
|
animations: Phaser.AnimationManager;
|
2014-03-21 23:59:44 +00:00
|
|
|
autoCull: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
body: Phaser.Physics.Arcade.Body | Phaser.Physics.P2.Body | Phaser.Physics.Ninja.Body | any;
|
|
|
|
bottom: number;
|
2014-03-10 16:58:12 +00:00
|
|
|
cameraOffset: Phaser.Point;
|
2014-03-21 23:59:44 +00:00
|
|
|
checkWorldBounds: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
components: any;
|
|
|
|
customRender: boolean;
|
|
|
|
debug: boolean;
|
2014-04-23 07:26:26 +00:00
|
|
|
destroyPhase: boolean;
|
2014-03-03 23:46:24 +00:00
|
|
|
events: Phaser.Events;
|
2014-03-10 16:58:12 +00:00
|
|
|
exists: boolean;
|
|
|
|
fixedToCamera: boolean;
|
2015-10-06 14:30:54 +00:00
|
|
|
frame: string | number;
|
2014-03-10 16:58:12 +00:00
|
|
|
frameName: string;
|
2015-02-24 01:22:13 +00:00
|
|
|
fresh: boolean;
|
2014-03-10 16:58:12 +00:00
|
|
|
game: Phaser.Game;
|
2015-07-20 20:36:36 +00:00
|
|
|
inCamera: boolean;
|
2014-03-10 16:58:12 +00:00
|
|
|
input: Phaser.InputHandler;
|
|
|
|
inputEnabled: boolean;
|
2015-07-20 20:36:36 +00:00
|
|
|
inWorld: boolean;
|
|
|
|
key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture;
|
|
|
|
left: number;
|
2014-03-10 16:58:12 +00:00
|
|
|
name: string;
|
2015-07-20 20:36:36 +00:00
|
|
|
offsetX: number;
|
|
|
|
offsetY: number;
|
|
|
|
outOfBoundsKill: boolean;
|
2015-07-08 18:09:42 +00:00
|
|
|
pendingDestroy: boolean;
|
2015-04-24 16:16:31 +00:00
|
|
|
physicsType: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
position: Phaser.Point;
|
2015-07-20 20:36:36 +00:00
|
|
|
smoothed: boolean;
|
2015-02-24 01:22:13 +00:00
|
|
|
previousPosition: Phaser.Point;
|
|
|
|
previousRoation: number;
|
2015-07-20 20:36:36 +00:00
|
|
|
right: number;
|
|
|
|
top: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
renderOrderID: number;
|
2014-03-10 16:58:12 +00:00
|
|
|
type: number;
|
|
|
|
world: Phaser.Point;
|
2014-03-20 11:07:37 +00:00
|
|
|
z: number;
|
|
|
|
|
2014-04-22 22:31:07 +00:00
|
|
|
autoScroll(x: number, y: number): void;
|
2015-02-11 22:24:47 +00:00
|
|
|
destroy(destroyChildren?: boolean): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
loadTexture(key: string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture, frame?: string | number, stopAnimation?: boolean): void;
|
2014-03-10 16:58:12 +00:00
|
|
|
play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
|
|
|
|
postUpdate(): void;
|
|
|
|
preUpdate(): void;
|
2015-07-20 20:36:36 +00:00
|
|
|
overlap(displayObject: Phaser.Sprite | Phaser.Image | Phaser.TileSprite | Phaser.Button | PIXI.DisplayObject): boolean;
|
|
|
|
reset(x: number, y: number, health?: number): Phaser.TileSprite;
|
|
|
|
resizeFrame(parent: any, width: number, height: number): void;
|
|
|
|
resetFrame(): void;
|
2014-06-11 14:23:54 +00:00
|
|
|
setFrame(frame: Phaser.Frame): void;
|
2014-03-10 16:58:12 +00:00
|
|
|
stopScroll(): void;
|
|
|
|
update(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Time {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-03-10 16:58:12 +00:00
|
|
|
advancedTiming: boolean;
|
2014-11-10 21:15:52 +00:00
|
|
|
desiredFps: number;
|
2015-09-13 20:43:38 +00:00
|
|
|
desiredFpsMult: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
elapsed: number;
|
|
|
|
events: Phaser.Timer;
|
2014-11-24 15:53:47 +00:00
|
|
|
elapsedMS: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
fps: number;
|
|
|
|
fpsMax: number;
|
|
|
|
fpsMin: number;
|
|
|
|
frames: number;
|
|
|
|
game: Phaser.Game;
|
|
|
|
lastTime: number;
|
|
|
|
msMax: number;
|
|
|
|
msMin: number;
|
|
|
|
now: number;
|
|
|
|
pausedTime: number;
|
|
|
|
pauseDuration: number;
|
|
|
|
physicsElapsed: number;
|
2014-11-27 16:00:18 +00:00
|
|
|
physicsElapsedMS: number;
|
2014-10-13 15:18:42 +00:00
|
|
|
prevTime: number;
|
2014-11-10 21:15:52 +00:00
|
|
|
slowMotion: number;
|
|
|
|
suggestedFps: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
time: number;
|
2014-11-10 21:15:52 +00:00
|
|
|
timeExpected: number;
|
2014-02-26 01:32:38 +00:00
|
|
|
timeToCall: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-06-01 23:54:42 +00:00
|
|
|
add(timer: Phaser.Timer): Phaser.Timer;
|
2014-02-26 01:32:38 +00:00
|
|
|
boot(): void;
|
|
|
|
create(autoDestroy?: boolean): Phaser.Timer;
|
|
|
|
elapsedSecondsSince(since: number): number;
|
|
|
|
elapsedSince(since: number): number;
|
|
|
|
removeAll(): void;
|
|
|
|
reset(): void;
|
|
|
|
totalElapsedSeconds(): number;
|
|
|
|
update(time: number): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Timer {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game, autoDestroy?: boolean);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
static HALF: number;
|
|
|
|
static MINUTE: number;
|
|
|
|
static QUARTER: number;
|
|
|
|
static SECOND: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
autoDestroy: boolean;
|
|
|
|
duration: number;
|
|
|
|
events: Phaser.TimerEvent[];
|
|
|
|
expired: boolean;
|
|
|
|
game: Phaser.Game;
|
|
|
|
length: number;
|
|
|
|
ms: number;
|
|
|
|
next: number;
|
|
|
|
nextTick: number;
|
|
|
|
onComplete: Phaser.Signal;
|
|
|
|
running: boolean;
|
|
|
|
paused: boolean;
|
|
|
|
seconds: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2015-04-24 15:02:19 +00:00
|
|
|
add(delay: number, callback: Function, callbackContext?: any, ...args: any[]): Phaser.TimerEvent;
|
2014-04-19 08:05:43 +00:00
|
|
|
clearPendingEvents(): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
destroy(): void;
|
2015-04-24 15:02:19 +00:00
|
|
|
loop(delay: number, callback: Function, callbackContext?: any, ...args: any[]): Phaser.TimerEvent;
|
2014-02-26 01:32:38 +00:00
|
|
|
order(): void;
|
|
|
|
pause(): void;
|
|
|
|
remove(event: Phaser.TimerEvent): boolean;
|
2014-11-25 17:30:33 +00:00
|
|
|
removeAll(): void;
|
2015-04-24 15:02:19 +00:00
|
|
|
repeat(delay: number, repeatCount: number, callback: Function, callbackContext?: any, ...args: any[]): Phaser.TimerEvent;
|
2014-02-26 01:32:38 +00:00
|
|
|
resume(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
sortHandler(a: any, b: any): number;
|
2014-04-03 19:13:35 +00:00
|
|
|
start(startDelay?: number): void;
|
2014-09-29 11:13:37 +00:00
|
|
|
stop(clearEvents?: boolean): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(time: number): boolean;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class TimerEvent {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-10 23:02:23 +00:00
|
|
|
constructor(timer: Phaser.Timer, delay: number, tick: number, repeatCount: number, loop: boolean, callback: Function, callbackContext: any, ...args: any[]);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
args: any[];
|
|
|
|
callback: Function;
|
2014-09-01 15:55:02 +00:00
|
|
|
callbackContext: any;
|
2014-02-26 01:32:38 +00:00
|
|
|
delay: number;
|
|
|
|
loop: boolean;
|
|
|
|
pendingDelete: boolean;
|
|
|
|
repeatCount: number;
|
|
|
|
tick: number;
|
|
|
|
timer: Phaser.Timer;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Touch {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
callbackContext: any;
|
2014-11-05 15:20:08 +00:00
|
|
|
enabled: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
event: any;
|
|
|
|
game: Phaser.Game;
|
|
|
|
preventDefault: boolean;
|
|
|
|
touchCancelCallback: Function;
|
|
|
|
touchEndCallback: Function;
|
|
|
|
touchEnterCallback: Function;
|
|
|
|
touchLeaveCallback: Function;
|
|
|
|
touchMoveCallback: Function;
|
|
|
|
touchStartCallback: Function;
|
2015-05-09 01:55:12 +00:00
|
|
|
touchLockCallbacks: Function[];
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2016-02-02 23:30:03 +00:00
|
|
|
addTouchLockCallback(callback: Function, context?: any, onEnd?: Function): void;
|
2015-05-09 01:55:12 +00:00
|
|
|
removeTouchLockCallback(callback: Function, context?: any): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
consumeTouchMove(): void;
|
|
|
|
onTouchCancel(event: any): void;
|
|
|
|
onTouchEnd(event: any): void;
|
|
|
|
onTouchEnter(event: any): void;
|
|
|
|
onTouchLeave(event: any): void;
|
|
|
|
onTouchMove(event: any): void;
|
|
|
|
onTouchStart(event: any): void;
|
|
|
|
start(): void;
|
|
|
|
stop(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Tween {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
constructor(target: any, game: Phaser.Game, manager: Phaser.TweenManager);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
chainedTween: Phaser.Tween;
|
|
|
|
current: number;
|
2015-07-30 14:27:51 +00:00
|
|
|
frameBased: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
|
|
|
isRunning: boolean;
|
2014-11-24 15:53:47 +00:00
|
|
|
isPaused: boolean;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
manager: Phaser.TweenManager;
|
|
|
|
onChildComplete: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
onComplete: Phaser.Signal;
|
|
|
|
onLoop: Phaser.Signal;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
onRepeat: Phaser.Signal;
|
2014-02-26 01:32:38 +00:00
|
|
|
onStart: Phaser.Signal;
|
|
|
|
pendingDelete: boolean;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
properties: any;
|
|
|
|
repeatCounter: number;
|
2015-02-24 01:22:13 +00:00
|
|
|
//repeatDelay: number;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
reverse: boolean;
|
|
|
|
target: any;
|
2014-11-24 15:53:47 +00:00
|
|
|
timeline: Phaser.TweenData[];
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
timeScale: number;
|
|
|
|
totalDuration: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-11-24 15:53:47 +00:00
|
|
|
chain(...args: any[]): Phaser.Tween;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
delay(duration: number, index?: number): Phaser.Tween;
|
2014-11-24 15:53:47 +00:00
|
|
|
easing(ease: Function, index?: number): Phaser.Tween;
|
|
|
|
easing(ease: string, index?: number): Phaser.Tween;
|
2014-09-01 15:55:02 +00:00
|
|
|
from(properties: any, duration?: number, ease?: Function, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Phaser.Tween;
|
2014-11-24 15:53:47 +00:00
|
|
|
from(properties: any, duration?: number, ease?: string, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Phaser.Tween;
|
|
|
|
generateData(frameRate?: number, data?: any): any[];
|
2015-02-24 01:22:13 +00:00
|
|
|
interpolation(interpolation: Function, context?: any, index?: number): Phaser.Tween;
|
2014-11-24 15:53:47 +00:00
|
|
|
loop(value?: boolean): Phaser.Tween;
|
2015-06-23 20:50:27 +00:00
|
|
|
onUpdateCallback(callback: Function, callbackContext?: any): Phaser.Tween;
|
2014-02-26 01:32:38 +00:00
|
|
|
pause(): void;
|
2015-02-24 01:22:13 +00:00
|
|
|
repeat(total: number, repeatDelay?: number, index?: number): Phaser.Tween;
|
|
|
|
repeatDelay(duration: number, index?: number): Phaser.Tween;
|
2014-11-24 15:53:47 +00:00
|
|
|
repeatAll(total?: number): Phaser.Tween;
|
2014-02-26 01:32:38 +00:00
|
|
|
resume(): void;
|
2014-11-24 15:53:47 +00:00
|
|
|
start(index?: number): Phaser.Tween;
|
|
|
|
stop(complete?: boolean): Phaser.Tween;
|
2014-09-01 15:55:02 +00:00
|
|
|
to(properties: any, duration?: number, ease?: Function, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Phaser.Tween;
|
2014-11-24 15:53:47 +00:00
|
|
|
to(properties: any, duration?: number, ease?: string, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Phaser.Tween;
|
2014-02-26 01:32:38 +00:00
|
|
|
update(time: number): boolean;
|
2015-02-24 01:22:13 +00:00
|
|
|
updateTweenData(property: string, value: number | Function, index?: number): Phaser.Tween;
|
|
|
|
yoyo(enable: boolean, yoyoDelay?: number, index?: number): Phaser.Tween;
|
|
|
|
yoyoDelay(duration: number, index?: number): Phaser.Tween;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class TweenData {
|
|
|
|
|
|
|
|
constructor(parent: Phaser.Tween);
|
|
|
|
|
|
|
|
static COMPLETE: number;
|
|
|
|
static LOOPED: number;
|
|
|
|
static PENDING: number;
|
|
|
|
static RUNNING: number;
|
|
|
|
|
|
|
|
delay: number;
|
|
|
|
dt: number;
|
|
|
|
duration: number;
|
|
|
|
easingFunction: Function;
|
|
|
|
game: Phaser.Game;
|
|
|
|
inReverse: boolean;
|
2015-02-24 01:22:13 +00:00
|
|
|
interpolate: boolean;
|
|
|
|
interpolateFunctionContext: Phaser.Math;
|
|
|
|
interpolationContext: Phaser.Math;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
interpolationFunction: Function;
|
|
|
|
isRunning: boolean;
|
2014-11-24 15:53:47 +00:00
|
|
|
isFrom: boolean;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
parent: Phaser.Tween;
|
|
|
|
percent: number;
|
|
|
|
repeatCounter: number;
|
|
|
|
startTime: number;
|
|
|
|
value: number;
|
|
|
|
yoyo: boolean;
|
2015-02-24 01:22:13 +00:00
|
|
|
yoyoDelay: number;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
|
|
|
|
from(properties: any, duration?: number, ease?: Function, delay?: number, repeat?: number, yoyo?: boolean): Phaser.TweenData;
|
2014-11-24 15:53:47 +00:00
|
|
|
generateData(frameRate?: number): any[];
|
|
|
|
repeat(): number;
|
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:04:54 +00:00
|
|
|
start(): Phaser.TweenData;
|
|
|
|
to(properties: any, duration?: number, ease?: Function, delay?: number, repeat?: number, yoyo?: boolean): Phaser.TweenData;
|
2015-08-01 11:08:21 +00:00
|
|
|
update(time: number): number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class TweenManager {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-04-26 00:34:19 +00:00
|
|
|
|
2015-08-20 11:59:06 +00:00
|
|
|
frameBased: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
game: Phaser.Game;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
add(tween: Phaser.Tween): Phaser.Tween;
|
2014-09-01 15:55:02 +00:00
|
|
|
create(object: any): Phaser.Tween;
|
2014-02-26 01:32:38 +00:00
|
|
|
getAll(): Phaser.Tween[];
|
2014-09-01 15:55:02 +00:00
|
|
|
isTweening(object: any): boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
remove(tween: Phaser.Tween): Phaser.Tween;
|
|
|
|
removeAll(): void;
|
2014-11-24 15:53:47 +00:00
|
|
|
removeFrom(obj: any, children?: boolean): void;
|
2014-02-26 01:32:38 +00:00
|
|
|
resumeAll(): void;
|
|
|
|
update(): boolean;
|
|
|
|
pauseAll(): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
class Utils {
|
|
|
|
|
2014-09-01 15:55:02 +00:00
|
|
|
static getProperty(obj: any, prop: string): any;
|
|
|
|
static setProperty(obj: any, prop: string, value: any): any;
|
2015-06-23 20:50:27 +00:00
|
|
|
static chanceRoll(chance: number): boolean;
|
|
|
|
static randomChoice(choice1: string | number, choice2: any): any;
|
|
|
|
static parseDimension(size: any, dimension: number): number;
|
|
|
|
static pad(str: string, len?: number, pad?: string, dir?: number): string;
|
|
|
|
static isPlainObject(object: any): boolean;
|
2015-08-29 21:08:07 +00:00
|
|
|
static extend(deep: boolean, target: any, ...args: any[]): any;
|
2015-06-23 20:50:27 +00:00
|
|
|
static mixinPrototype(target: any, mixin: any, replace?: boolean): void;
|
|
|
|
static mixin<T>(from: T, to: any): T;
|
2014-07-13 22:05:18 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module Utils {
|
2014-03-10 16:58:12 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
class Debug {
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-10-30 08:56:24 +00:00
|
|
|
bmd: Phaser.BitmapData;
|
2014-03-20 11:07:37 +00:00
|
|
|
canvas: HTMLCanvasElement;
|
2014-02-26 01:32:38 +00:00
|
|
|
columnWidth: number;
|
|
|
|
context: CanvasRenderingContext2D;
|
|
|
|
currentAlpha: number;
|
|
|
|
currentX: number;
|
|
|
|
currentY: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
dirty: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
font: string;
|
|
|
|
game: Phaser.Game;
|
|
|
|
lineHeight: number;
|
|
|
|
renderShadow: boolean;
|
2014-10-23 11:27:34 +00:00
|
|
|
sprite: Phaser.Image;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-05-14 14:54:40 +00:00
|
|
|
AStar(astar: Phaser.Plugin.AStar, x: number, y: number, showVisited: boolean): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
boot(): void;
|
|
|
|
body(sprite: Phaser.Sprite, color?: string, filled?: boolean): void;
|
2014-03-12 09:10:42 +00:00
|
|
|
bodyInfo(sprite: Phaser.Sprite, x: number, y: Number, color?: string): void;
|
2014-10-03 20:28:20 +00:00
|
|
|
box2dBody(body: Phaser.Sprite, color?: string): void;
|
|
|
|
box2dWorld(): void;
|
2014-03-12 09:10:42 +00:00
|
|
|
cameraInfo(camera: Phaser.Camera, x: number, y: number, color?: string): void;
|
2015-08-26 18:07:56 +00:00
|
|
|
destroy(): void;
|
2014-03-12 09:10:42 +00:00
|
|
|
geom(object: any, color?: string, fiiled?: boolean, forceType?: number): void;
|
|
|
|
inputInfo(x: number, y: number, color?: string): void;
|
|
|
|
lineInfo(line: Phaser.Line, x: number, y: number, color?: string): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
key(key: Phaser.Key, x?: number, y?: number, color?: string): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
line(): void;
|
|
|
|
preUpdate(): void;
|
|
|
|
pixel(x: number, y: number, color?: string, size?: number): void;
|
2014-03-12 09:10:42 +00:00
|
|
|
pointer(pointer: Phaser.Pointer, hideIfUp?: boolean, downColor?: string, upColor?: string, color?: string): void;
|
|
|
|
quadTree(quadtree: Phaser.QuadTree, color?: string): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
rectangle(object: Phaser.Rectangle, color?: string, filled?: boolean): void;
|
2014-09-09 14:28:58 +00:00
|
|
|
reset(): void;
|
2014-09-10 23:02:23 +00:00
|
|
|
ropeSegments(rope: Phaser.Rope, color?: number, filled?: boolean): void;
|
2014-03-12 09:10:42 +00:00
|
|
|
soundInfo(sound: Phaser.Sound, x: number, y: number, color?: string): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
spriteBounds(sprite: any, color?: string, filled?: boolean): void;
|
|
|
|
spriteCoords(sprite: any, x: number, y: number, color?: string): void;
|
2014-03-12 09:10:42 +00:00
|
|
|
spriteInfo(sprite: Phaser.Sprite, x: number, y: number, color?: string): void;
|
|
|
|
spriteInputInfo(sprite: Phaser.Sprite, x: number, y: number, color?: string): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
start(x?: number, y?: number, color?: string, columnWidth?: number): void;
|
|
|
|
stop(): void;
|
2014-03-12 09:10:42 +00:00
|
|
|
text(text: string, x: number, y: number, color?: string, font?: string): void;
|
2014-04-26 00:34:19 +00:00
|
|
|
timer(timer: Phaser.Timer, x: number, y: number, color?: string): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-01-07 09:58:00 +00:00
|
|
|
}
|
2014-02-10 02:42:28 +00:00
|
|
|
|
2014-03-20 11:07:37 +00:00
|
|
|
class World extends Phaser.Group {
|
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
constructor(game: Phaser.Game);
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
bounds: Phaser.Rectangle;
|
|
|
|
camera: Phaser.Camera;
|
|
|
|
centerX: number;
|
|
|
|
centerY: number;
|
|
|
|
game: Phaser.Game;
|
|
|
|
height: number;
|
2015-02-11 22:24:47 +00:00
|
|
|
isPaused: boolean;
|
2014-02-26 01:32:38 +00:00
|
|
|
randomX: number;
|
|
|
|
randomY: number;
|
2015-03-03 21:14:25 +00:00
|
|
|
stats: {
|
|
|
|
skipped: number;
|
|
|
|
ignored: number;
|
|
|
|
checked: number;
|
|
|
|
};
|
2014-02-26 01:32:38 +00:00
|
|
|
width: number;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
boot(): void;
|
2014-09-01 15:55:02 +00:00
|
|
|
getObjectsUnderPointer(pointer: Phaser.Pointer, group: Phaser.Group, callback?: Function, callbackContext?: any): Phaser.Sprite;
|
2014-09-10 23:02:23 +00:00
|
|
|
resize(width: number, height: number): void;
|
2014-03-26 11:00:15 +00:00
|
|
|
setBounds(x: number, y: number, width: number, height: number): void;
|
2015-04-24 16:16:31 +00:00
|
|
|
sortLeftRight(a: Phaser.Sprite, b: Phaser.Sprite): number;
|
|
|
|
sortRightLeft(a: Phaser.Sprite, b: Phaser.Sprite): number;
|
|
|
|
sortTopBottom(a: Phaser.Sprite, b: Phaser.Sprite): number;
|
|
|
|
sortBottomTop(a: Phaser.Sprite, b: Phaser.Sprite): number;
|
|
|
|
sort(group: Phaser.Group, sortDirection?: number): void;
|
|
|
|
sort(key?: string, order?: number): void; //ugly? Group already has a sort method remove this line and you get error.
|
2014-03-19 15:09:44 +00:00
|
|
|
shutdown(): void;
|
2014-07-13 22:05:18 +00:00
|
|
|
wrap(sprite: any, padding?: number, useBounds?: boolean, horizontal?: boolean, vertical?: boolean): void;
|
2014-03-20 11:07:37 +00:00
|
|
|
|
2014-02-26 01:32:38 +00:00
|
|
|
}
|
2015-07-20 20:36:36 +00:00
|
|
|
|
2014-01-16 14:43:28 +00:00
|
|
|
}
|