Example #1
0
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == "Paddle")
     {
         float movement = collision.gameObject.GetComponent <PaddleMovement>().GetMovement();
         collisionHandler.ChangeDirection(movement);
     }
     else if (collision.gameObject.tag == "Wall")
     {
         collisionHandler.WallHitted();
     }
 }