so we have made buttons in the past & we have now made switchable states. so lets make buttons switch our states.
we start by duplicating our previous '046_states' project & also copying our 'Button.hx' class from '033_button'.
heading right in we edit 'Button.hx' so when pressed it helps to change states. moving on to our states we create a button that will be used to change states.
lastly we make sure we link our buttons with the states to go to & then create a on mouse down function so it changes when clicked.
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