Ejemplo n.º 1
0
    private void OnTriggerEnter2D(Collider2D target)
    {
        if (target.tag == Helper.BALL_TAG)
        {
            m_anim.SetBool("Ball_in", true);

            SoundsManager.PlaySounds("basket");
        }
    }
Ejemplo n.º 2
0
    private void OnCollisionEnter2D(Collision2D target)
    {
        SoundsManager.PlaySounds("hitBall");

        if (target.gameObject.tag == Helper.GROUND_TAG)
        {
            StartCoroutine(DeactivateBall(0.5f));
        }

        if (target.gameObject.tag == Helper.PLAYER_TAG)
        {
            sr.material.color = Color.red;
            StartCoroutine(Wait());
        }
    }