Im making a fps game at the moment, but my code is saying that the Update void isn’t working. Any help?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Shoot : MonoBehaviour
{
public bool isReloading;
private void Update()
{
if (Input.GetMouseButton(0) && isReloading == false)
{
isReloading = true;
yield return new WaitForSeconds(1);
isReloading = false;
}
}
}
note that the Update in the void is underlined.