void enter() { if (isItCorrect()) { blink(green, blinkTime * 3); Invoke(nameof(plantOk), 1f); } else { Invoke(nameof(deletePin), blinkTime * 3); Led.GetComponent <Image>().color = red; } Invoke(nameof(blinkOff), blinkTime * 3); }
void blinkOff() { Led.GetComponent <Image>().color = white; buttonsInteractible = true; }
void blink(Color32 color, float blinkTime) { Led.GetComponent <Image>().color = color; Invoke(nameof(blinkOff), blinkTime); buttonsInteractible = false; }