Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (m_breathFire.IsBreathingFire() && !m_sfx.isPlaying)
     {
         m_sfx.Play();
     }
     else if (m_sfx.isPlaying && !m_breathFire.IsBreathingFire())
     {
         m_sfx.Stop();
     }
 }
Beispiel #2
0
 private void OnTriggerStay(Collider other)
 {
     if (m_breath.IsBreathingFire())
     {
         m_camera.LowPriorityShake(m_shakeDuration, m_fireShakeIntensity);
         BurnableScript burnable = other.gameObject.GetComponent <BurnableScript>();
         if (!burnable.IsMaxFire())
         {
             burnable.AddFire(Time.deltaTime);
             burnable.Burning();
         }
     }
 }