コード例 #1
0
 public void GruntEffects(GruntType gruntType)
 {
     if (!nodding && !shaking)
     {
         if (gruntType == GruntType.Green)
         {
             StartCoroutine("Nod");
         }
         else if (gruntType == GruntType.Red)
         {
             StartCoroutine("Shake");
         }
     }
 }
コード例 #2
0
    private void Grunt(GruntType gruntType)
    {
        bool success = (gruntType == GruntType.Green) == greenLight.isOn;

        EndGruntOpportunity();
        if (success)
        {
            TriggerGruntSuccess(gruntType);
        }
        else
        {
            TriggerGruntFailure();
        }
    }
コード例 #3
0
    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();
    }
コード例 #4
0
 public void TriggerGruntSuccess(GruntType gruntType)
 {
     wasLastGruntSuccessful = true;
     GameManagerScript.Instance.ShortSubmitTime();
 }