コード例 #1
0
 private void OnTriggerStay2D(Collider2D other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         if (lightManger != null)
         {
             if (lightManger.GetIsFullyCharged())
             {
                 if (lightManger.GetChargeState() != ChargeStates.StandBy)
                 {
                     if (audioPlayer)
                     {
                         audioPlayer.SetUpAudioSource(AudioManager.instance.GetSound("ObjectFixed"));
                         audioPlayer.Play();
                         audioPlayer = null;
                     }
                 }
                 chargeCable.ChangeColour(Color.green);
                 lightManger.SetChargeState(ChargeStates.StandBy);
             }
         }
     }
 }