I am trying to get a manual reload with the "r" button, I have set up an input as "Reload" and used the code below, but it isn't working and i can't figure out why.
function Update()
{
if (Input.GetButtonDown("Reload"))
{
Reload();
}
}
function Reload () {
yield WaitForSeconds(reloadTime);
if (clips > 0)
{
clips--;
bulletsLeft = bulletsPerClip;
}
}
The reload function works, i know that for sure, but when I press "r" when playing, it does nothing. please help...