Пример #1
0
 private void Init(Rarity rarity)
 {
     ChestDisplayOptions[] array = this.chestDisplayOptions;
     foreach (ChestDisplayOptions chestDisplayOptions in array)
     {
         if (chestDisplayOptions.enable != null)
         {
             chestDisplayOptions.enable.SetActive(chestDisplayOptions.rarity.Equals(rarity));
         }
         chestDisplayOptions.explosion.gameObject.SetActive(chestDisplayOptions.rarity.Equals(rarity));
         if (chestDisplayOptions.rarity.Equals(rarity))
         {
             currentOptions = chestDisplayOptions;
         }
     }
     globalBackground.material = currentOptions.backgroundMaterial;
 }
Пример #2
0
 private void OnDisable()
 {
     FinishAnimation();
     for (int i = 0; i != elements.Count; i++)
     {
         UnityEngine.Object.Destroy(elements[i].gameObject);
     }
     globalBackground.material = defaultBackgroundMaterial;
     if (currentOptions.enable != null)
     {
         currentOptions.enable.SetActive(value: false);
     }
     AnimatedCurrencyController.CancelAllAnimations();
     if (onComplete != null)
     {
         onComplete();
     }
     MenuController.UpdateTopMenu();
     currentOptions = null;
     MenuController.backButtonOverrideAction = null;
     doubleRewardRoutine = null;
 }