From 735dc24edc1019695b10b1fa2a41b0cea0705861 Mon Sep 17 00:00:00 2001 From: bzx <496597135@qq.com> Date: Wed, 14 Jan 2026 14:18:01 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=B0=83=E6=95=B4=E9=9D=92?= =?UTF-8?q?=E8=9B=99boss=E6=95=B4=E4=BD=93=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.idea.FutureMen2/.idea/workspace.xml | 11 ++-- Assets/StreamingAssets/build_info | 2 +- .../Enemys/FrogBoss/FrogBoss.controller | 2 +- .../Scripts/Actions/FrogBossActions.cs | 12 ++++- .../Scripts/Enemy/FrogBoss/FrogBoss.cs | 54 +++++++++++++++++++ .../Scripts/Enemy/OctopusBoss/OctopusBoss.cs | 1 - 6 files changed, 70 insertions(+), 12 deletions(-) diff --git a/.idea/.idea.FutureMen2/.idea/workspace.xml b/.idea/.idea.FutureMen2/.idea/workspace.xml index 3d3a4384..922b9bb3 100644 --- a/.idea/.idea.FutureMen2/.idea/workspace.xml +++ b/.idea/.idea.FutureMen2/.idea/workspace.xml @@ -6,16 +6,11 @@ - - - + - - - - + diff --git a/Assets/StreamingAssets/build_info b/Assets/StreamingAssets/build_info index be533874..ce372d77 100644 --- a/Assets/StreamingAssets/build_info +++ b/Assets/StreamingAssets/build_info @@ -1 +1 @@ -Build from CHINAMI-UKDLSK3 at 2026/1/14 11:39:15 \ No newline at end of file +Build from CHINAMI-UKDLSK3 at 2026/1/14 14:14:09 \ No newline at end of file diff --git a/Assets/_FutureMen2/Prefabs/Enemys/FrogBoss/FrogBoss.controller b/Assets/_FutureMen2/Prefabs/Enemys/FrogBoss/FrogBoss.controller index 19e06281..800e9723 100644 --- a/Assets/_FutureMen2/Prefabs/Enemys/FrogBoss/FrogBoss.controller +++ b/Assets/_FutureMen2/Prefabs/Enemys/FrogBoss/FrogBoss.controller @@ -169,7 +169,7 @@ AnimatorStateTransition: m_Mute: 0 m_IsExit: 0 serializedVersion: 3 - m_TransitionDuration: 0.25 + m_TransitionDuration: 1.861544 m_TransitionOffset: 0 m_ExitTime: 0.75 m_HasExitTime: 0 diff --git a/Assets/_FutureMen2/Scripts/Actions/FrogBossActions.cs b/Assets/_FutureMen2/Scripts/Actions/FrogBossActions.cs index edd2f0d6..186da02b 100644 --- a/Assets/_FutureMen2/Scripts/Actions/FrogBossActions.cs +++ b/Assets/_FutureMen2/Scripts/Actions/FrogBossActions.cs @@ -209,7 +209,16 @@ public class FrogEggAttack : Action float step = fanAngle / (eggCount - 1); float startAngle = -fanAngle * 0.5f; - for (int i = 0; i < eggCount; i++) + int eggBugCount = boss.GetAliveTentacles().Count; + int insCount; + if (eggBugCount >= 12) + { + boss.Idle(); + isFinished = true; + yield break; + } + insCount=12-eggBugCount; + for (int i = 0; i < insCount; i++) { float angle = startAngle + step * i; @@ -291,6 +300,7 @@ public class FrogIdleMove : Action if (boss.HasAnySkillReady()) { boss.aiPath.isStopped = true; + boss.Idle(); return TaskStatus.Failure; } diff --git a/Assets/_FutureMen2/Scripts/Enemy/FrogBoss/FrogBoss.cs b/Assets/_FutureMen2/Scripts/Enemy/FrogBoss/FrogBoss.cs index de45515d..31907541 100644 --- a/Assets/_FutureMen2/Scripts/Enemy/FrogBoss/FrogBoss.cs +++ b/Assets/_FutureMen2/Scripts/Enemy/FrogBoss/FrogBoss.cs @@ -1,4 +1,5 @@ using System.Collections; +using System.Collections.Generic; using DG.Tweening; using DragonLi.Core; using UnityEngine; @@ -19,6 +20,16 @@ public class FrogBoss : Enemy public EnemyBoneHit mouthBoneHit; + public List frogBugs = new List(); + + public List GetAliveTentacles() + { + List list = new(); + foreach (var t in frogBugs) + if (t != null && !t.isDead) + list.Add(t); + return list; + } private void Start() { clipQuadObj.transform.localPosition = new Vector3(0, -5f, 0); @@ -157,5 +168,48 @@ public class FrogBoss : Enemy } + #endregion + + #region Die + + public override void Dead() + { + if (isDead) + { + return; + } + GameManager.Ins.curLevel++; + isDead = true; + if (bloodSlider != null) + bloodSlider.gameObject.SetActive(false); + if(ColliderComponent!=null) + ColliderComponent.enabled = false; + if(behaviourTree != null) + behaviourTree.enabled = false; + GameManager.Ins.PlaySound3D("1.46",transform); + foreach (var item in GetAliveTentacles()) + { + item.Dead(); + } + StartCoroutine(DeathDissolve()); + } + + IEnumerator DeathDissolve() + { + // 1️⃣ 停止行为 + behaviourTree.enabled = false; + ColliderComponent.enabled = false; + + clipQuadObj.SetActive(true); + bloodSlider.gameObject.SetActive(false); + clipQuadObj.transform.localPosition = new Vector3(0, 5f, 0); + bossAnim.SetBool("isDie",true); + yield return new WaitForSeconds(3f); + clipQuadObj.transform.DOLocalMoveY(-5f, 5); + yield return new WaitForSeconds(8f); + GameManager.Ins.CreateBoss(transform.position.ReflectVectorXOZ()); + Destroy(gameObject); + } + #endregion } diff --git a/Assets/_FutureMen2/Scripts/Enemy/OctopusBoss/OctopusBoss.cs b/Assets/_FutureMen2/Scripts/Enemy/OctopusBoss/OctopusBoss.cs index c6355882..9e88319e 100644 --- a/Assets/_FutureMen2/Scripts/Enemy/OctopusBoss/OctopusBoss.cs +++ b/Assets/_FutureMen2/Scripts/Enemy/OctopusBoss/OctopusBoss.cs @@ -82,7 +82,6 @@ public class OctopusBoss : Enemy { return; } - GameManager.Ins.curLevel++; //base.Dead(); isDead = true;