1
using System
.Collections
;
2 using System
.Collections
.Generic
;
5 public class FlameColumn
: MonoBehaviour
{
8 private float m_FireDuration
= 2.5f
;
10 private float m_NoFireDuration
= 3.0f
;
12 private float m_FireDamage
= 10.0f
;
14 private float m_FireOffset
= 0.0f
;
15 private GameObject m_Fire
;
18 m_Fire
= transform
.Find("FireParticle").gameObject
;
19 StartCoroutine(StartFire());
22 IEnumerator
StartFire()
24 yield return new WaitForSeconds (m_FireOffset
);
27 yield return new WaitForSeconds(m_FireDuration
);
28 m_Fire
.SetActive(false);
29 yield return new WaitForSeconds(m_NoFireDuration
);
30 m_Fire
.SetActive(true);
34 private void OnTriggerStay2D(Collider2D collision
)
36 if (!m_Fire
.activeInHierarchy
|| !collision
.CompareTag("YarnPhysics"))
39 HealthSlider yarnHealth
= collision
.GetComponent
<HealthSlider
>();
40 if (yarnHealth
&& !yarnHealth
.BossEnded
)
42 yarnHealth
.FireDamage(m_FireDamage
);