示例#1
0
        public void OnCollisionEnter2D(Collision2D collision2D)
        {
            var rotation        = Quaternion.FromToRotation(Vector3.up, collision2D.contacts[0].normal);
            var appliedVelocity = rotation * Vector3.up;

            ApplyVelocity(appliedVelocity);

            if (collision2D.gameObject.tag == "Paddle")
            {
                _gameManager.ResetComboValue();
                _soundManager.PlayBallHitsPaddleSound();
                _soundManager.ResetBrickCollideCount();
            }
        }