1
This commit is contained in:
@@ -145,6 +145,10 @@ public class MonsterContral : MonoBehaviour
|
||||
{
|
||||
LoadHitEffect();
|
||||
baseMmove = isMove;
|
||||
// ⭐ isMove=true 的鱼初始放在屏幕外 (9999,9999,0),
|
||||
// 等待 MoveUpdate 根据 moveTime 算出曲线位置后自然显示
|
||||
if (isMove)
|
||||
transform.position = new Vector3(9999, 9999, 0);
|
||||
}
|
||||
public async void LoadHitEffect()
|
||||
{
|
||||
@@ -252,15 +256,7 @@ public class MonsterContral : MonoBehaviour
|
||||
|
||||
// isMove=false 的鱼不需要移动路线,直接归位到 (0,0,0)
|
||||
if (!isMove)
|
||||
{
|
||||
transform.position = Vector3.zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
// ⭐ isMove=true 的鱼刚创建时,初始位置设置成曲线的第一个点,
|
||||
// 避免在 moveTime 更新前卡在初始位置 (9999,9999,0) 中间
|
||||
transform.position = new Vector3(bezierData.start.x, bezierData.start.y, 0);
|
||||
}
|
||||
|
||||
// 路径结束后自动销毁
|
||||
//StartCoroutine(yanchi(gameObject, time, isyuzhen));
|
||||
|
||||
Reference in New Issue
Block a user