fix:调整青蛙boss吐蛋技能
This commit is contained in:
@@ -91,7 +91,6 @@ public class FrogBleepAttack : Action
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 毒液弹攻击
|
||||
/// </summary>
|
||||
@@ -204,7 +203,7 @@ public class FrogEggAttack : Action
|
||||
boss.EggAttack();
|
||||
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
|
||||
boss.aiPath.isStopped = true;
|
||||
Transform firePoint = boss.eggFirePoint; // 嘴巴
|
||||
|
||||
float step = fanAngle / (eggCount - 1);
|
||||
@@ -245,7 +244,7 @@ public class FrogEggAttack : Action
|
||||
);
|
||||
|
||||
FrogBugEnemy bug = egg.GetComponent<FrogBugEnemy>();
|
||||
bug.SetAtk(boss.Data.Atk_2);
|
||||
bug.SetAtk(boss.Data.Atk_2,boss.Data.Hp_CS2);
|
||||
|
||||
// 扇形方向
|
||||
Vector3 dir = Quaternion.Euler(0, angle, 0) * boss.transform.forward;
|
||||
@@ -290,7 +289,11 @@ public class FrogIdleMove : Action
|
||||
if (player == null)
|
||||
return TaskStatus.Running;
|
||||
if (boss.HasAnySkillReady())
|
||||
{
|
||||
boss.aiPath.isStopped = true;
|
||||
return TaskStatus.Failure;
|
||||
}
|
||||
|
||||
FaceToPlayer();
|
||||
Move();
|
||||
|
||||
|
||||
@@ -65,15 +65,15 @@ public class TortoiseSprintAttack : Action
|
||||
Vector3 targetPos = player.position + dir * sprintDistance;
|
||||
|
||||
// A* 移动
|
||||
boss.ai.maxSpeed = sprintSpeed;
|
||||
boss.ai.isStopped = false;
|
||||
boss.ai.destination = targetPos;
|
||||
boss.aiPath.maxSpeed = sprintSpeed;
|
||||
boss.aiPath.isStopped = false;
|
||||
boss.aiPath.destination = targetPos;
|
||||
|
||||
// 面向移动方向
|
||||
boss.transform.rotation = Quaternion.LookRotation(dir);
|
||||
|
||||
// 等待到达
|
||||
while (!boss.ai.reachedEndOfPath)
|
||||
while (!boss.aiPath.reachedEndOfPath)
|
||||
{
|
||||
if (boss.isDead)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ public class TortoiseSprintAttack : Action
|
||||
yield return null;
|
||||
}
|
||||
|
||||
boss.ai.isStopped = true;
|
||||
boss.aiPath.isStopped = true;
|
||||
boss.EndAttack();
|
||||
}
|
||||
|
||||
|
||||
@@ -54,17 +54,6 @@ public class Enemy : MonoBehaviour
|
||||
|
||||
public BehaviorTree behaviourTree;
|
||||
|
||||
// A* / RVO
|
||||
private IAstarAI _ai;
|
||||
public IAstarAI ai
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_ai == null) _ai = GetComponent<IAstarAI>();
|
||||
return _ai;
|
||||
}
|
||||
}
|
||||
|
||||
private AIPath _aiPath;
|
||||
public AIPath aiPath
|
||||
{
|
||||
@@ -168,6 +157,8 @@ public class Enemy : MonoBehaviour
|
||||
ColliderComponent.enabled = false;
|
||||
if(behaviourTree != null)
|
||||
behaviourTree.enabled = false;
|
||||
if(aiPath!=null)
|
||||
aiPath.enabled = false;
|
||||
StopAllCoroutines();
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@ public class FrogBoss : Enemy
|
||||
{
|
||||
clipQuadObj.transform.localPosition = new Vector3(0, -5f, 0);
|
||||
mouthBoneHit.SetDamage(Data.Atk_1P);
|
||||
bloodSlider.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
@@ -46,6 +47,7 @@ public class FrogBoss : Enemy
|
||||
CoroutineTaskManager.Instance.WaitSecondTodo(() =>
|
||||
{
|
||||
isShowEnd = true;
|
||||
bloodSlider.gameObject.SetActive(true);
|
||||
}, 2f);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -43,9 +43,11 @@ public class FrogBugEnemy : Enemy
|
||||
//蛋到达落点后 抖动两下 之后播放蛋破碎动画 播放后model打开 蛋消失 怪物切换成EnemyState.NormalAttack
|
||||
}
|
||||
|
||||
public void SetAtk(float curAtk)
|
||||
public void SetAtk(float curAtk,float maxHp)
|
||||
{
|
||||
atk = curAtk;
|
||||
maxHealth = maxHp;
|
||||
health = maxHp;
|
||||
}
|
||||
|
||||
|
||||
@@ -260,7 +262,6 @@ public class FrogBugEnemy : Enemy
|
||||
|
||||
StopAllCoroutines();
|
||||
StopAI();
|
||||
|
||||
anim.SetBool("IsDie",true);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using DragonLi.Core;
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(Rigidbody))]
|
||||
@@ -36,9 +37,9 @@ public class PoisonBall : MonoBehaviour
|
||||
|
||||
private void OnCollisionEnter(Collision collision)
|
||||
{
|
||||
if (collision.gameObject.tag == "Ground")
|
||||
if (collision.gameObject.tag == "Ground"|| collision.gameObject.tag == "Player")
|
||||
{
|
||||
GameObject ball= Instantiate(poisonPoolPrefab, transform.position, Quaternion.identity);
|
||||
GameObject ball= Instantiate(poisonPoolPrefab, transform.position.ReflectVectorXOZ(), Quaternion.identity);
|
||||
ball.GetComponent<PoisonPool>().SetDamage(poolDamage, poolTime);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user