예제 #1
0
 void WhilePressed()
 {
     Bar.GainWater();
     // Poisoned Water
     if (Variables.poisonedWater)
     {
         Bar.GainO2(-0.01f);
         Bar.GainCO2(-0.01f);
         Bar.GainSun(-0.01f);
     }
 }
예제 #2
0
 public void Clicked() //obiekt został naklikniety
 {
     if (gameObject.CompareTag("O2"))
     {
         Bar.GainO2();
         Destroy(this.gameObject);
         --Variables.O2Counter;
     }
     if (gameObject.CompareTag("CO2"))
     {
         Bar.GainCO2();
         Destroy(this.gameObject);
         --Variables.CO2Counter;
     }
     if (gameObject.CompareTag("PG"))
     {
         //Wyzeruj Bary
         Bar.ClearBars();
         Destroy(this.gameObject);
         --Variables.pGasCounter;
     }
 }