public void remove(State state) {
   switch (state) {
     case BURNING:
       if (burning != null) {
         burning.on = false;
         burning = null;
       }
       break;
     case LEVITATING:
       if (levitation != null) {
         levitation.on = false;
         levitation = null;
       }
       break;
     case INVISIBLE:
       alpha(1f);
       break;
     case PARALYSED:
       paused = false;
       break;
     case FROZEN:
       if (iceBlock != null) {
         iceBlock.melt();
         iceBlock = null;
       }
       paused = false;
       break;
     case ILLUMINATED:
       if (halo != null) {
         halo.putOut();
       }
       break;
   }
 }
 public void add(State state) {
   switch (state) {
     case BURNING:
       burning = emitter();
       burning.pour(FlameParticle.FACTORY, 0.06f);
       if (getVisible()) {
         Sample.INSTANCE.play(Assets.SND_BURNING);
       }
       break;
     case LEVITATING:
       levitation = emitter();
       levitation.pour(Speck.factory(Speck.JET), 0.02f);
       break;
     case INVISIBLE:
       PotionOfInvisibility.melt(ch);
       break;
     case PARALYSED:
       paused = true;
       break;
     case FROZEN:
       iceBlock = IceBlock.freeze(this);
       paused = true;
       break;
     case ILLUMINATED:
       GameScene.effect(halo = new TorchHalo(this));
       break;
   }
 }
  @Override
  public void update() {

    super.update();

    if (paused && listener != null) {
      listener.onComplete(curAnim);
    }

    if (flashTime > 0 && (flashTime -= Game.elapsed) <= 0) {
      resetColor();
    }

    boolean visible = getVisible();

    if (burning != null) {
      burning.setVisible(visible);
    }
    if (levitation != null) {
      levitation.setVisible(visible);
    }
    if (iceBlock != null) {
      iceBlock.setVisible(visible);
    }
    if (sleeping) {
      showSleep();
    } else {
      hideSleep();
    }

    if (controlled) {
      showMindControl();
    }

    if (emo != null) {
      emo.setVisible(visible);
    }
  }