Trying to add a penalty when the player missed an enemy but I can’t seem to be able to re-enable the buttons after disabling it for a few secs.
void Update()
{
RayCastShow();
frozenTimer -= Time.deltaTime;
if (frozenTimer <= 0)
{
btnL.interactable = true;
btnR.interactable = true;
isFrozen = false;
}
}
public void Miss()
{
frozenTimer = 1f;
btnL.interactable = false;
btnR.interactable = false;
}
Can someone please tell me what’s wrong in my code thanks