mirror of
https://github.com/wassname/phaser.git
synced 2026-08-19 12:30:07 +08:00
yuidoc scripts added. Tidied up the Docs folder. Added back in the Emitter and fixed the Tests that weren't compiling.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
var __extends = this.__extends || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
__.prototype = b.prototype;
|
||||
d.prototype = new __();
|
||||
@@ -17,20 +18,21 @@ var Phaser;
|
||||
var Scanlines = (function (_super) {
|
||||
__extends(Scanlines, _super);
|
||||
function Scanlines(game, parent) {
|
||||
_super.call(this, game, parent);
|
||||
_super.call(this, game, parent);
|
||||
this.spacing = 4;
|
||||
this.color = 'rgba(0, 0, 0, 0.3)';
|
||||
this.camera = parent;
|
||||
}
|
||||
Scanlines.prototype.postRender = function () {
|
||||
this.game.stage.context.fillStyle = this.color;
|
||||
for(var y = this.camera.screenView.y; y < this.camera.screenView.height; y += this.spacing) {
|
||||
|
||||
for (var y = this.camera.screenView.y; y < this.camera.screenView.height; y += this.spacing) {
|
||||
this.game.stage.context.fillRect(this.camera.screenView.x, y, this.camera.screenView.width, 1);
|
||||
}
|
||||
};
|
||||
return Scanlines;
|
||||
})(Phaser.Plugin);
|
||||
CameraFX.Scanlines = Scanlines;
|
||||
CameraFX.Scanlines = Scanlines;
|
||||
})(Plugins.CameraFX || (Plugins.CameraFX = {}));
|
||||
var CameraFX = Plugins.CameraFX;
|
||||
})(Phaser.Plugins || (Phaser.Plugins = {}));
|
||||
|
||||
Reference in New Issue
Block a user