Пример #1
0
    private void OnTriggerEnter(Collider other)
    {
        PlayerMovement pm = other.GetComponent <PlayerMovement>();

        if (other.CompareTag("Player"))
        {
            Debug.Log("Aceleracion objeto");
            audio2.Play();
            pm.Acellerate();
            pm.RemoveBonus(this);
            sc.enabled = false;
            mr.enabled = false;
            StartCoroutine(pm.AddPoints(points));
        }
    }