public void GruntEffects(GruntType gruntType) { if (!nodding && !shaking) { if (gruntType == GruntType.Green) { StartCoroutine("Nod"); } else if (gruntType == GruntType.Red) { StartCoroutine("Shake"); } } }
private void Grunt(GruntType gruntType) { bool success = (gruntType == GruntType.Green) == greenLight.isOn; EndGruntOpportunity(); if (success) { TriggerGruntSuccess(gruntType); } else { TriggerGruntFailure(); } }
public void TriggerGruntOpportunity(GruntType gruntType, string promptText, float availabilitySecs) { failTime = Time.time + availabilitySecs; gruntAvailable = true; wasLastGruntSuccessful = false; if (gruntType == GruntType.Green) { greenLight.isOn = true; } else { redLight.isOn = true; } gruntText.text = promptText; AudioManager.Instance.gruntAlert.Play(); }
public void TriggerGruntSuccess(GruntType gruntType) { wasLastGruntSuccessful = true; GameManagerScript.Instance.ShortSubmitTime(); }