Inheritance: MonoBehaviour
Exemple #1
0
 void OnTriggerStay(Collider collision)
 {
     GroundFire fire = collision.gameObject.GetComponent<GroundFire>();
     if (fire != null && FireState != 2 && fire != groundFire)
     {
         IncreaseFireBar();
     }
 }
    void OnTriggerStay(Collider collision)
    {
        GroundFire fire = collision.gameObject.GetComponent <GroundFire>();

        if (fire != null && fire.currentRadius >= 1)
        {
            OnFire = true;
        }
    }
Exemple #3
0
    void Start()
    {
        mr = GetComponent<MeshRenderer>();
        mc = GetComponent<MeshCollider>();

        groundFire = GetComponentInChildren<GroundFire>();
        if (FireState == 1)
        {
            FireBar = 100.0f;
            StartFirePS();
            StartCoroutine(burnOut());
            fireAudioSource.Play();
        }
        else
        {
            // prevent fire from starting auto starting
            StopFirePS();
        }
    }