Пример #1
0
 void Update()
 {
     currentDeltaTime = Time.deltaTime;
     if (gameState == GS.Play)
     {
         coin.CoinUpdate(currentDeltaTime, gameSpeed, economics.PriceToDeltaPos);
         economics.EcoUpdate(currentDeltaTime, Input.touchCount, Input.GetMouseButton(0));
         if (economics.GetEconomicChanged())
         {
             OutOfBounds(economics.EcoStatus);
         }
         //stats
         statistics.ProgressStorage(timer.RoundedTimeSecs(), 0);
         uiManager.UpdateUI(economics.GetStatus());
         background.BackgroundUpdate(currentDeltaTime);
         obstacleManager.UpdateIt(currentDeltaTime);
     }
     trendLine.UpdateLine(coin);
     //sound and logic
     if (economics.Deposit < 20)
     {
         SoundManager(4);
     }
     else if (economics.Deposit <= 0 && gameState != GS.Over)
     {
         GameOver();
     }
 }