mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
80 lines
3 KiB
TypeScript
80 lines
3 KiB
TypeScript
/// <reference path="../gameobjects/Sprite.d.ts" />
|
|
/// <reference path="../Game.d.ts" />
|
|
module Phaser {
|
|
class Camera {
|
|
constructor(game: Game, id: number, x: number, y: number, width: number, height: number);
|
|
private _game;
|
|
private _clip;
|
|
private _stageX;
|
|
private _stageY;
|
|
private _rotation;
|
|
private _target;
|
|
private _sx;
|
|
private _sy;
|
|
private _fxFlashColor;
|
|
private _fxFlashComplete;
|
|
private _fxFlashDuration;
|
|
private _fxFlashAlpha;
|
|
private _fxFadeColor;
|
|
private _fxFadeComplete;
|
|
private _fxFadeDuration;
|
|
private _fxFadeAlpha;
|
|
private _fxShakeIntensity;
|
|
private _fxShakeDuration;
|
|
private _fxShakeComplete;
|
|
private _fxShakeOffset;
|
|
private _fxShakeDirection;
|
|
private _fxShakePrevX;
|
|
private _fxShakePrevY;
|
|
static STYLE_LOCKON: number;
|
|
static STYLE_PLATFORMER: number;
|
|
static STYLE_TOPDOWN: number;
|
|
static STYLE_TOPDOWN_TIGHT: number;
|
|
static SHAKE_BOTH_AXES: number;
|
|
static SHAKE_HORIZONTAL_ONLY: number;
|
|
static SHAKE_VERTICAL_ONLY: number;
|
|
public ID: number;
|
|
public worldView: Rectangle;
|
|
public totalSpritesRendered: number;
|
|
public scale: MicroPoint;
|
|
public scroll: MicroPoint;
|
|
public bounds: Rectangle;
|
|
public deadzone: Rectangle;
|
|
public showBorder: bool;
|
|
public borderColor: string;
|
|
public opaque: bool;
|
|
private _bgColor;
|
|
private _bgTexture;
|
|
private _bgTextureRepeat;
|
|
public showShadow: bool;
|
|
public shadowColor: string;
|
|
public shadowBlur: number;
|
|
public shadowOffset: MicroPoint;
|
|
public visible: bool;
|
|
public alpha: number;
|
|
public inputX: number;
|
|
public inputY: number;
|
|
public fx: FXManager;
|
|
public flash(color?: number, duration?: number, onComplete?, force?: bool): void;
|
|
public fade(color?: number, duration?: number, onComplete?, force?: bool): void;
|
|
public shake(intensity?: number, duration?: number, onComplete?, force?: bool, direction?: number): void;
|
|
public stopFX(): void;
|
|
public follow(target: Sprite, style?: number): void;
|
|
public focusOnXY(x: number, y: number): void;
|
|
public focusOn(point): void;
|
|
public setBounds(x?: number, y?: number, width?: number, height?: number): void;
|
|
public update(): void;
|
|
public render(): void;
|
|
public backgroundColor : string;
|
|
public setTexture(key: string, repeat?: string): void;
|
|
public setPosition(x: number, y: number): void;
|
|
public setSize(width: number, height: number): void;
|
|
public renderDebugInfo(x: number, y: number, color?: string): void;
|
|
public x : number;
|
|
public y : number;
|
|
public width : number;
|
|
public height : number;
|
|
public rotation : number;
|
|
private checkClip();
|
|
}
|
|
}
|