Ejemplo n.º 1
0
    private void OnTriggerExit(Collider other)   // if the player tag cartag touches collider, mark it as no longer needed and deactivate
    {
        BulletFire BulletFires = gameObject.GetComponent <BulletFire>();

        CarTag carTag = other.GetComponent <CarTag>();

        if (carTag != null)
        {
            //  if (!exited)
            //   {
            exited = true;
            //     OnFireExited();
            ////    Debug.Log("EXIT");
            ////    Debug.Log("new one");

            StartCoroutine(WaitAndDeactivate());
            /////  OnFireExited();


            // StartCoroutine(WaitAndDeactivate());
            ////   transform.root.gameObject.SetActive(false);

            // }
        }
    }
Ejemplo n.º 2
0
    private void OnTriggerExit(Collider other)
    {
        CarTag carTag = other.GetComponent <CarTag>();

        if (carTag != null)
        {
            if (!exited)
            {
                exited = true;
                OnChunkExited();
                StartCoroutine(WaitAndDeactivate());
            }
        }
    }