simpja / Breakout-Phaser

Breakout game using the phaser game library for things like physics and collision detection.
https://pong-ping.vercel.app
1 stars 0 forks source link

Add friction #7

Closed simpja closed 4 years ago

simpja commented 4 years ago

Calls a function collision between ball and paddle that adds velocity to the ball given the current velocity of the paddle. The paddle's speed is currently a three-state thing: 5 pixels/frame going left or right, or standing still. This could be improved. Also the paddles could use an extension of their sprite class as to add some properties to them. It is currently some duplicating of code in order to make this functionality for both paddles which is not very clean or lean.