How my game over if red box hits yellow box | Sololearn: Learn to code for FREE!

+2

How my game over if red box hits yellow box

https://code.sololearn.com/W5dX22wZATYy/?ref=app

7/31/2020 3:01:10 AM

Tony Sharma K. K Gaming

2 Answers

New Answer

+1

Add collision testing in upo() and downo() If posX > posY && posX < posY + yHeight then do something. If posY > posX && posY < posX + x Height then do something

0

You must check videos related collision detection on YouTube.