Esempio n. 1
0
 private void OnDestroy()
 {
     if (this._buttonQTEEffect != null)
     {
         this._buttonQTEEffect.gameObject.SetActive(false);
     }
     if (this._buttonSwitchInEffect != null)
     {
         this._buttonSwitchInEffect.gameObject.SetActive(false);
     }
     if (this._hpBarImg != null)
     {
         this._hpBarImg.sprite = null;
         this._hpBarImg        = null;
     }
     if (this._spBarImg != null)
     {
         this._spBarImg.sprite = null;
         this._spBarImg        = null;
     }
     if (this._frameLightImg != null)
     {
         this._frameLightImg.sprite = null;
         this._frameLightImg        = null;
     }
     if (this._button != null)
     {
         SpriteState state = new SpriteState();
         state.set_disabledSprite(null);
         state.set_highlightedSprite(null);
         state.set_pressedSprite(null);
         this._button.spriteState = state;
         this._button.transition  = Selectable.Transition.None;
         this._button             = null;
     }
     if (this._iconImage != null)
     {
         this._iconImage.sprite = null;
         this._iconImage        = null;
     }
     if (this._CDMaskImg != null)
     {
         this._CDMaskImg.sprite = null;
         this._CDMaskImg        = null;
     }
 }