mirror of
https://github.com/wassname/phaser.git
synced 2026-09-12 12:40:47 +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:
+10
-10
@@ -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,7 +18,7 @@ var Phaser;
|
||||
var Shadow = (function (_super) {
|
||||
__extends(Shadow, _super);
|
||||
function Shadow(game, parent) {
|
||||
_super.call(this, game, parent);
|
||||
_super.call(this, game, parent);
|
||||
/**
|
||||
* Render camera shadow or not. (default is false)
|
||||
* @type {boolean}
|
||||
@@ -40,25 +41,24 @@ var Phaser;
|
||||
this.shadowOffset = new Phaser.Point(4, 4);
|
||||
this.camera = parent;
|
||||
}
|
||||
Shadow.prototype.preRender = /**
|
||||
/**
|
||||
* Pre-render is called at the start of the object render cycle, before any transforms have taken place.
|
||||
* It happens directly AFTER a canvas context.save has happened if added to a Camera.
|
||||
*/
|
||||
function () {
|
||||
// Shadow
|
||||
if(this.showShadow == true) {
|
||||
Shadow.prototype.preRender = function () {
|
||||
if (this.showShadow == true) {
|
||||
this.game.stage.context.shadowColor = this.shadowColor;
|
||||
this.game.stage.context.shadowBlur = this.shadowBlur;
|
||||
this.game.stage.context.shadowOffsetX = this.shadowOffset.x;
|
||||
this.game.stage.context.shadowOffsetY = this.shadowOffset.y;
|
||||
}
|
||||
};
|
||||
Shadow.prototype.render = /**
|
||||
|
||||
/**
|
||||
* render is called during the objects render cycle, right after all transforms have finished, but before any children/image data is rendered.
|
||||
*/
|
||||
function () {
|
||||
// Shadow off
|
||||
if(this.showShadow == true) {
|
||||
Shadow.prototype.render = function () {
|
||||
if (this.showShadow == true) {
|
||||
this.game.stage.context.shadowBlur = 0;
|
||||
this.game.stage.context.shadowOffsetX = 0;
|
||||
this.game.stage.context.shadowOffsetY = 0;
|
||||
@@ -66,7 +66,7 @@ var Phaser;
|
||||
};
|
||||
return Shadow;
|
||||
})(Phaser.Plugin);
|
||||
CameraFX.Shadow = Shadow;
|
||||
CameraFX.Shadow = Shadow;
|
||||
})(Plugins.CameraFX || (Plugins.CameraFX = {}));
|
||||
var CameraFX = Plugins.CameraFX;
|
||||
})(Phaser.Plugins || (Phaser.Plugins = {}));
|
||||
|
||||
Reference in New Issue
Block a user