protected override IEnumerator Execute() { float delay = 3.0f; while (_enemy._statePattern is AttackState) { if (delay <= 0.0f) { _boss.SetStatePattern <IdleState>(); } else { delay -= Time.deltaTime; } yield return(null); } yield return(null); }
protected override IEnumerator Execute() { //_boss._camera.ShakeCamera(1.0f); yield return(new WaitForSeconds(0.5f)); hit = Physics2D.Raycast(_boss._player.transform.position, Vector2.down, Mathf.Infinity, LayerMask.GetMask("Ground")); _boss._transform.position = hit.point; if (_boss._warringImg != null) { _boss._warringImg.SetActive(true); } yield return(new WaitForSeconds(0.5f)); if (_boss._warringImg != null) { _boss._warringImg.SetActive(false); } _boss._isHide = false; _boss.isInvincible = false; _boss.m_collider.enabled = true; Buffer.InvincibleActive(true); Buffer.SuperArmourAcitve(false); _boss.OroraActive(true); _boss.animator.SetTrigger("Attack"); _boss._numWayPoint = Random.Range(0, _boss._wayPoints.Length); yield return(new WaitForSeconds(1.0f)); _boss.SetStatePattern <IdleState>(); yield return(null); }
protected override IEnumerator Execute() { while (_enemy._statePattern is MoveState) { if (_enemy.GoToTarget(_target.position)) { if (_boss._numPattern == 0 && _boss._numChild <= 0) { _boss.SetStatePattern <AttackState>(); } else { _enemy.SetStatePattern <IdleState>(); _enemy.SetWayPointNum(); } } yield return(new WaitForFixedUpdate()); } yield return(null); }
protected override IEnumerator Execute() { _boss.SetStatePattern <IdleState>(); yield return(null); }