How to call function (or corutine) like update func. if button pressed.
I have corutine and start corutine from function. How in new input system call function like Update if i pressed ctrl button?
I make Action (look screen.) But i don’t know how it use.
bool reload = false;
IEnumerator Shoot()
{
reload = true;
GameObject BulletG = Instantiate(Bullet,SpawnPoint);
yield return new WaitForSeconds(1f);
reload = false;
}
public void StartShoot()
{
if (reload == false)
{
StartCoroutine(Shoot());
}
}
