mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
49 lines
No EOL
1.2 KiB
TypeScript
49 lines
No EOL
1.2 KiB
TypeScript
/// <reference path="../Game.ts" />
|
|
/// <reference path="../cameras/Camera.ts" />
|
|
/// <reference path="IRenderer.ts" />
|
|
|
|
module Phaser {
|
|
|
|
export class HeadlessRenderer implements Phaser.IRenderer {
|
|
|
|
constructor(game: Phaser.Game) {
|
|
this._game = game;
|
|
}
|
|
|
|
/**
|
|
* The essential reference to the main game object
|
|
*/
|
|
private _game: Phaser.Game;
|
|
|
|
public render() {}
|
|
|
|
public renderGameObject(object) {
|
|
}
|
|
|
|
public renderSprite(camera: Camera, sprite: Sprite): bool {
|
|
return true;
|
|
}
|
|
|
|
public renderScrollZone(camera: Camera, scrollZone: ScrollZone): bool {
|
|
return true;
|
|
}
|
|
|
|
public renderCircle(camera: Camera, circle: Circle, context, outline?: bool = true, fill?: bool = true, lineColor?: string = 'rgb(0,255,0)', fillColor?: string = 'rgba(0,100,0.0.3)', lineWidth?: number = 1): bool {
|
|
return true;
|
|
}
|
|
|
|
public preRenderCamera(camera: Camera) {
|
|
}
|
|
|
|
public postRenderCamera(camera: Camera) {
|
|
}
|
|
|
|
public preRenderGroup(camera: Camera, group: Group) {
|
|
}
|
|
|
|
public postRenderGroup(camera: Camera, group: Group) {
|
|
}
|
|
|
|
}
|
|
|
|
} |