Add torch parameters to torch demo

This commit is contained in:
Andrew Kesterson
2014-06-11 11:06:26 -07:00
parent b762154c7d
commit 5eca1ff733

View File

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