Learn to code by making a 2D space shooter game.

make sure to use UnityEngine.UI namespace to able to use slider component.
_currentValue += max value/100 this is like normalizing the max value so even you put 2000 max value if you do this it will turn it to 1
This method will be used to call the coroutine
This used to access coroutine or stop coroutine when we assigned them to coroutine
NullReferenceException: routine is null
I have stopped increase routine and decrease routine when we activate cool down.
this is how ThrusterBarcooldownRoutine is implement the logic.
this will set high speed to true when _moveSpeed times 2 and to false when _move speed equal to 5.
Input is checked inside update
Input is checked inside update

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Suleiman Abdullah

Suleiman Abdullah

Self taught Unity Developer, who is passion about making games