From c650de852081d7ebbcb5597e0885cfb775fb345c Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 13 Jul 2016 16:52:46 -0400 Subject: [PATCH] Real version of `Clone.prototype.setVisible` --- src/sprites/clone.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/sprites/clone.js b/src/sprites/clone.js index 169d72cc7..6a0f22fee 100644 --- a/src/sprites/clone.js +++ b/src/sprites/clone.js @@ -3,7 +3,7 @@ var MathUtil = require('../util/math-util'); var Target = require('../engine/target'); /** - * Clone (instance) of a sprite. + * Clone (instance) of a sprite. * @param {!Blocks} spriteBlocks Reference to the sprite's blocks. * @constructor */ @@ -116,12 +116,9 @@ Clone.prototype.setSay = function (type, message) { */ Clone.prototype.setVisible = function (visible) { this.visible = visible; - // @todo: Until visibility is implemented in the renderer, use a ghost. - if (this.visible) { - this.setEffect('ghost', 0); - } else { - this.setEffect('ghost', 100); - } + self.renderer.updateDrawableProperties(this.drawableID, { + visible: this.visible + }); }; /**