Exemplo n.º 1
0
 private void OnDestroy()
 {
     TimingHandlers.CleanlyKillCoroutine(ref _oilHandler);
     TimingHandlers.CleanlyKillCoroutine(ref _foodHandler);
     TimingHandlers.CleanlyKillCoroutine(ref _partHandler);
     TimingHandlers.CleanlyKillCoroutine(ref _replenishFoodCoroutine);
     TimingHandlers.CleanlyKillCoroutine(ref _replenishOilCoroutine);
     TimingHandlers.CleanlyKillCoroutine(ref _handleActionsCoroutine);
 }
Exemplo n.º 2
0
 public void Enable(bool ingameElement, bool anim = true)
 {
     if (ingameElement)
     {
         if (anim)
         {
             TimingHandlers.CleanlyKillCoroutine(ref _showingCoroutine);
             _showingCoroutine = Timing.RunCoroutine(Show(true));
         }
         else
         {
             IngameElement.gameObject.SetActive(true);
         }
     }
     else
     {
         UIElement.gameObject.SetActive(true);
     }
 }