public void Execute() { if (!animator.GetCurrentAnimatorStateInfo(0).IsName("Enemy1_fall") && !animator.GetCurrentAnimatorStateInfo(0).IsName("Enemy1_damage")) { Attacc(); } if (!enemy.InMeleeRange()) { enemy.ChangeState(new IIdeal3State()); } }
private void Walk() { //goes to ideal after walk duration walkTimer += Time.deltaTime; blastTimer += Time.deltaTime; if (blastTimer > difficultyUtils.bigblastCooldown) { enemy.ChangeState(new IBlast3State()); } if (walkTimer > difficultyUtils.walkDuration) { enemy.ChangeState(new IIdeal3State()); } //check for if (enemy.InMeleeRange()) { enemy.ChangeState(new IAttack3State()); } }
public void Execute() { if (!animator.GetCurrentAnimatorStateInfo(0).IsName("Enemy1_fall") && !animator.GetCurrentAnimatorStateInfo(0).IsName("Enemy1_damage")) { if (enemy.ifELeft()) { animator.SetFloat("Velocity", 0); animator.SetBool("isblastanim", true); enemy.StartCoroutine(enemy.blast()); } } enemy.ChangeState(new IIdeal3State()); }
private void Ideal() { //goes to walking after ideal duration enemy.Animator.SetFloat("Velocity", 0); idealTimer += Time.deltaTime; if (idealTimer > difficultyUtils.idealDuration) { enemy.ChangeState(new IWalk3State()); } }