1
This commit is contained in:
@@ -141,18 +141,25 @@ public class MonsterControl_BossBase : MonsterContral
|
||||
CreateFishManager.Instance.currGameType.subUIManager.ShowBoardBoss(handle.Result, bossName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (isMove)
|
||||
{
|
||||
var bezierData = MonsterMoveLine.dic_BezierCurveDatas[bossName + pathId];
|
||||
monsterData.moveLine.Init(bezierData, time);
|
||||
|
||||
// ⭐ isMove=true 的 Boss 初始位置设为曲线起点,
|
||||
// 避免在 moveTime 更新前卡在生成时的 (9999,9999,0)
|
||||
transform.position = new Vector3(bezierData.start.x, bezierData.start.y, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.position = new Vector3(0, 0, 0);
|
||||
|
||||
}
|
||||
|
||||
// ⭐ Boss 重写 Init 未调用 base.Init,需手动标记已初始化并切换到 move 状态,
|
||||
// 否则 OnMoveUpdata 不会被调用(OnUpdate 里 isInitialized=false 会 return),moveTime 不自增
|
||||
isInitialized = true;
|
||||
ChangeState(CharacterStateType.move);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user