Add torch parameters to torch demo

This commit is contained in:
Andrew Kesterson
2014-06-11 11:07:28 -07:00
parent ad8cb3faa7
commit 3c8a90dd6d

View File

@@ -144,9 +144,9 @@ var moonlightSettings = {
// Create torch objects
// Torch constructor
var Torch = function(game, x, y, radius, fade, color) {
color = typeof color == undefined ? [255, 255, 255] : color;
fade = typeof fade == undefined ? 0.25 : fade;
radius = typeof radius == undefined ? 64 : radius;
color = typeof color !== undefined ? [255, 255, 255] : color;
fade = typeof fade !== undefined ? 0.25 : fade;
radius = typeof radius !== undefined ? 64 : radius;
Phaser.Sprite.call(this, game, x, y, null);
// Set the pivot point for this sprite to the center