Skip to content

Commit

Permalink
Remove effect if input value is false
Browse files Browse the repository at this point in the history
  • Loading branch information
rexrainbow committed Jul 7, 2023
1 parent 56bae55 commit b2a8604
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/behaviors/effects/AddGlowProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var AddGlowProperties = function (gameObject) {

glowColor = value;

if (glowColor === null) {
if ((glowColor === null) || (glowColor === false)) {
if (gameObject._glow) {
gameObject.preFX.remove(gameObject._glow);
gameObject._glow = undefined;
Expand Down
2 changes: 1 addition & 1 deletion plugins/behaviors/effects/AddGrayscaleProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var AddGrayscaleProperties = function (gameObject) {

grayscale = value;

if (grayscale === null) {
if ((grayscale === null) || (grayscale === false)) {
if (gameObject._grayscaleEffect) {
gameObject.preFX.remove(gameObject._grayscaleEffect);
gameObject._grayscaleEffect = undefined;
Expand Down

0 comments on commit b2a8604

Please sign in to comment.