From 442f8d15e5ff8560ce2c0c0bed94ce48132945d0 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Wed, 11 Jun 2014 11:08:16 -0700 Subject: [PATCH] Add torch parameters to torch demo --- moonlight/js/moonlight-skulk.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index cfc8452..82e019d 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -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