Exemple #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Player")
        {
            // Debug.Log("Entered checkpoint " + ID + "reached");
            if (dc.nextTargetCheckPoint == ID)
            {
                m.SetColor("_Color", ReachedColor);
                lr.material.SetColor("_Color", ReachedColor);
                dc.CheckPointReached();
                cpReached = true;
                audS.PlayOneShot(cpReachedSound);

                // Debug.Log("Check Point " + ID + "reached");
            }
        }
    }