public void FireBall() { GameObject fireBallAbility = poolManager.GetGameObject("FireBallAbility"); FireBallAbility a = fireBallAbility.GetComponent <FireBallAbility>(); a.SetThrower(gameObject); a.SetStartPosition(transform.position); flyingDirection.x = transform.localScale.x; a.SetDirection(flyingDirection); a.SetTargetLayerName("Player"); a.SetDamage(2); movementComponent.enemyAnim.SetBool("firing", false); //rb.bodyType = RigidbodyType2D.Dynamic; }
//疲劳状态 //public void Tired() //{ // movementComponent.enemyAnim.SetInteger("skillType", 3); //} public void FireBall() { cameraTransform.DOShakeRotation(0.5f, new Vector3(1f, 2f, 0)); for (int i = 0; i < 8; i++) { GameObject fireBallAbility = poolManager.GetGameObject("FireBallAbility"); FireBallAbility a = fireBallAbility.GetComponent <FireBallAbility>(); a.SetThrower(gameObject); a.SetStartPosition(flyingFromDirection); flyingFromDirection.x += 2f; a.SetDirection(Vector3.down); a.SetTargetLayerName("Player"); a.SetDamage(2); } flyingFromDirection.x = movementComponent.originx - 7f; }