mirror of
				https://codeberg.org/kbruen/y3s2-gui-project.git
				synced 2025-10-31 15:06:33 +02:00 
			
		
		
		
	After game over, ball goes horizontally on resume
This commit is contained in:
		
							parent
							
								
									77426a0b63
								
							
						
					
					
						commit
						95d8597377
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -155,12 +155,14 @@ void idle() { | ||||||
| 			// Ball exited board on the left side
 | 			// Ball exited board on the left side
 | ||||||
| 			rightScore += 1; | 			rightScore += 1; | ||||||
| 			ball.x = ball.y = 0; | 			ball.x = ball.y = 0; | ||||||
|  | 			ball.veloY = 0; | ||||||
| 			gameRunning = false; | 			gameRunning = false; | ||||||
| 		} | 		} | ||||||
| 		else if (ball.x - ball.radius > 1) { | 		else if (ball.x - ball.radius > 1) { | ||||||
| 			// Ball exited board on the right side
 | 			// Ball exited board on the right side
 | ||||||
| 			leftScore += 1; | 			leftScore += 1; | ||||||
| 			ball.x = ball.y = 0; | 			ball.x = ball.y = 0; | ||||||
|  | 			ball.veloY = 0; | ||||||
| 			gameRunning = false; | 			gameRunning = false; | ||||||
| 		} | 		} | ||||||
| 		else if (ball.y - ball.radius < -1) { | 		else if (ball.y - ball.radius < -1) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue