Example #1
0
 public void IsSecondarySystemFilling(bool isFilling)
 {
     isFillingSS = isFilling;
     if (previousLever)
     {
         previousLever.IsSecondarySystemFilling(isFilling);
     }
     UpdatePipesDisplay();
 }
 void StopActivity(bool suceed)
 {
     filling = false;
     associatedLever.IsSecondarySystemFilling(false);
     energyNeeded = false;
     oxygenNeeded = false;
     if (suceed)
     {
         ScoreManager.instance.WinPoints((int)GameManager.instance.pointsWinSecondarySystemFilled.Evaluate(timerBeforeExpiration / SecondarySystemsManager.instance.timeBeforeExpirationSecondarySystem));
         SoundsManager.instance.PlaySoundOneShot(SoundsManager.SoundName.SecondarySystemFilled, audioSource);
     }
     else
     {
         ScoreManager.instance.LosePoints(GameManager.instance.pointsLossSecondarySystemExpiration);
         SoundsManager.instance.PlaySoundOneShot(SoundsManager.SoundName.SecondarySystemExpire, audioSource);
     }
     timerBeforeExpiration = 0f;
     energyGauge.SetActive(false);
     oxygenGauge.SetActive(false);
     animator.SetBool("OnActivity", false);
     if (memberAnimator)
     {
         memberAnimator.speed = 0;
     }
     currentEnergy = 0f;
     currentOxygen = 0f;
     energyPropertyBlock.SetFloat("Height", 0);
     energyRenderer.SetPropertyBlock(energyPropertyBlock);
     oxygenPropertyBlock.SetFloat("Height", 0);
     oxygenRenderer.SetPropertyBlock(oxygenPropertyBlock);
     associatedPack.currentSecondarySystem = null;
     canBeDraw = true;
     SecondarySystemsManager.instance.StartActivityByEnd();
     SecondarySystemsManager.instance.activesSecondarySystems--;
     HintSecondarySystemManager.instance.activeSecondarySystems.Remove(this);
     if (associatedHint)
     {
         Destroy(associatedHint);
     }
 }