public IEnumerator bark(float delay = 0) { antura.IsExcited = true; yield return(new WaitForSeconds(0.75f)); antura.IsExcited = false; anturaAnimator.SetTrigger("doShout"); AudioManager.I.PlaySfx(Sfx.DogBarking); yield return(new WaitForSeconds(2f)); antura.OnJumpStart(); yield return(new WaitForSeconds(0.5f)); antura.OnJumpEnded(); yield return(new WaitForSeconds(1.5f)); if (SCARED_COUNTER > 2) { SCARED_COUNTER = 0; StartCoroutine(leaveScene()); } else { yield return(new WaitForSeconds(1.5f)); anturaAnimator.SetTrigger("doShout"); AudioManager.I.PlaySfx(Sfx.DogBarking); yield return(new WaitForSeconds(2f)); antura.DoBurp(); AudioManager.I.PlaySfx(Sfx.DogBarking); yield return(new WaitForSeconds(0.5f)); antura.IsAngry = true; yield return(new WaitForSeconds(2f)); if (SCARED_COUNTER > 2) { SCARED_COUNTER = 0; StartCoroutine(leaveScene(true)); } else { charge(); } } yield return(null); }
void Update() { antura.IsAngry = angry; antura.SetWalkingSpeed(walkSpeed); if (doTransition) { doTransition = false; antura.State = targetState; } if (doBurp) { doBurp = false; antura.DoBurp(); } if (doBite) { doBite = false; antura.DoBite(); } if (doShout) { doShout = false; antura.DoShout(); } if (doSniff) { doSniff = false; antura.DoSniff(); } if (onJumpStart) { onJumpStart = false; antura.OnJumpStart(); } if (onJumpMiddle) { onJumpMiddle = false; antura.OnJumpMaximumHeightReached(); } if (onJumpGrab) { onJumpGrab = false; antura.OnJumpGrab(); } if (onJumpEnd) { onJumpEnd = false; antura.OnJumpEnded(); } if (doCharge) { doCharge = false; antura.DoCharge(null); } if (doSpitOpen) { doSpitOpen = false; antura.DoSpit(true); } if (doSpitClosed) { doSpitClosed = false; antura.DoSpit(false); } if (onSlipStart) { onSlipStart = false; antura.OnSlipStarted(); } if (onSlipEnd) { onSlipEnd = false; antura.OnSlipEnded(); } }
public IEnumerator bark(float delay = 0) { canBeScared = true; antura.IsExcited = true; yield return(new WaitForSeconds(0.75f)); antura.IsExcited = false; if (scaredCounter != 0) /*StartCoroutine(leaveScene(true));*/ yield { break; } anturaAnimator.SetTrigger("doShout"); AudioManager.I.PlaySound(Sfx.DogBarking); yield return(new WaitForSeconds(1f)); if (scaredCounter != 0) /*StartCoroutine(leaveScene(true));*/ yield { break; } yield return(new WaitForSeconds(1f)); //antura.OnJumpStart(); yield return(new WaitForSeconds(0.5f)); //antura.OnJumpEnded(); yield return(new WaitForSeconds(1.0f)); if (scaredCounter != 0) /*StartCoroutine(leaveScene(true));*/ yield { break; } yield return(new WaitForSeconds(1.0f)); if (scaredCounter != 0) /*StartCoroutine(leaveScene(true));*/ yield { break; } yield return(new WaitForSeconds(1.0f)); anturaAnimator.SetTrigger("doShout"); AudioManager.I.PlaySound(Sfx.DogBarking); yield return(new WaitForSeconds(1f)); if (scaredCounter != 0) /*StartCoroutine(leaveScene(true));*/ yield { break; } yield return(new WaitForSeconds(1f)); if (scaredCounter != 0) /*StartCoroutine(leaveScene(true));*/ yield { break; } antura.DoBurp(); AudioManager.I.PlaySound(Sfx.DogBarking); yield return(new WaitForSeconds(0.5f)); antura.IsAngry = true; yield return(new WaitForSeconds(1f)); if (scaredCounter != 0) /*StartCoroutine(leaveScene(true));*/ yield { break; } yield return(new WaitForSeconds(1f)); if (game.tut.isTutRound && game.tut.tutStep == 0) { StartCoroutine(bark()); } else { StartCoroutine(charge()); } yield return(null); }