we can move, we can play, but can we touch? we look at collision rectangle.
we start by creating a new project & making a 'Rectangle' class. this class does not draw, but returning width height, x & y.
we then head back to our main project class & setup our mouse & make sure our new 'Rectangle' is also setup.
lastly updating one of the 'Rectangle' with the x, y mouse position & making sure we render them & also print out something when both 'Rectangle' hit each other.
source code:
https://github.com/lewislepton/kha-tutorial-series
SUPPORT ON PATREON FROM AS LITTLE AS $1:
https://patreon.com/lewislepton
intro & outro music is from this EP:
https://lewislepton.bandcamp.com/album/coat-noise-ep
like, share & subscribe to stay up to date.
https://lewislepton.com
https://patreon.com/lewislepton
https://twitter.com/lewislepton
https://facebook.com/lewislepton
https://lewislepton.bandcamp.com
https://soundcloud.com/lewislepton
https://github.com/lewislepton