示例#1
0
 private void Update()
 {
     if (isFixing)
     {
         if (!parentLamp.GetIsFixed())
         {
             fixingCable.ChangeColour(fixingCableColour);
             if (currentTimeToFix <= 0)
             {
                 parentLamp.FixLamp(10f);
                 currentTimeToFix = fuseSettings.repairRate;
             }
             else
             {
                 currentTimeToFix -= Time.deltaTime;
             }
         }
         else
         {
             player.GetComponent <IFixable>().NotFixing();
             fixingCable.ChangeColour(Color.green);
             isFixing = false;
             if (audioPlayer != false)
             {
                 audioPlayer.SetUpAudioSource(AudioManager.instance.GetSound("ObjectFixed"));
                 audioPlayer.Play();
                 audioPlayer = null;
             }
         }
     }
 }