Пример #1
0
 private void Update()
 {
     if (magnetTr.position == magnetMan.runPath[magnetMan.runPath.Length - 1])
     {
         rotate = true;
         if (!playSound)
         {
             GameCtrl.instance.PlayMusic(new Vector3(0, 0, 0), sounds.musicList[8]);
             playSound = true;
         }
     }
     if (rotate == true)
     {
         timer      += Time.deltaTime;
         tr.rotation = Quaternion.Euler(0, 0, (timer % cycle / cycle) * 360);
         if (!opened)
         {
             thermometer.Open();
             opened = true;
         }
     }
 }