예제 #1
0
    void OnCollisionEnter(Collision collision)
    {
        if (collision.collider.tag == "Ball")
        {
            var ball = collision.collider.GetComponent <Rigidbody>();
            ball.AddForce(collision.contacts[0].normal * Impulse, ForceMode.Impulse);
            soundsManager.PlayBumper2();
            AnimateBumperOnCollision();

            _scoreManager.AddScore(ScoreManager.TARGET_SCORE);
        }
    }