1
This commit is contained in:
+2
-2
@@ -607,7 +607,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 15c38f6fa1940124db1ab7f6fe7268d1, type: 3}
|
||||
m_Name: Signal Emitter
|
||||
m_EditorClassIdentifier:
|
||||
m_Time: 3.6
|
||||
m_Time: 3.9166666666666665
|
||||
m_Retroactive: 0
|
||||
m_EmitOnce: 0
|
||||
m_Asset: {fileID: 11400000, guid: 344d1087c2077664ebcfebc51d6cf167, type: 2}
|
||||
@@ -934,7 +934,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 15c38f6fa1940124db1ab7f6fe7268d1, type: 3}
|
||||
m_Name: Signal Emitter
|
||||
m_EditorClassIdentifier:
|
||||
m_Time: 8.133333333333333
|
||||
m_Time: 8.6
|
||||
m_Retroactive: 0
|
||||
m_EmitOnce: 0
|
||||
m_Asset: {fileID: 11400000, guid: aca498d52b11314418047bc8d6c097ae, type: 2}
|
||||
|
||||
@@ -7080,7 +7080,7 @@ MonoBehaviour:
|
||||
spawnList: []
|
||||
isCreateFish: 0
|
||||
isFrozen: 0
|
||||
debugSpawnFishNumber: 11027
|
||||
debugSpawnFishNumber: 11035
|
||||
fishList_All: []
|
||||
fishList_Small: []
|
||||
fishList_Boss: []
|
||||
|
||||
@@ -159,6 +159,32 @@ public class MonsterContral : MonoBehaviour
|
||||
/// <summary>鱼类型枚举(缓存,避免反复类型转换)</summary>
|
||||
public FishTypeEnum fishenum;
|
||||
|
||||
/// <summary>
|
||||
/// 是否为"按路线奇偶翻转X轴朝向"的Boss(Boss本体或BossBase子类,且未配置forwordXYZ自定义朝向轴)。
|
||||
/// 这类Boss不随路线切线旋转,朝向只由路线方向决定:
|
||||
/// 路线单数=左→右(X保持预制体正向),路线双数=右→左(X取负镜像)。
|
||||
/// </summary>
|
||||
protected bool IsRouteFlipBoss =>
|
||||
(fishenum == FishTypeEnum.Boss鱼 || this is MonsterControl_BossBase)
|
||||
&& string.IsNullOrEmpty(forwordXYZ);
|
||||
|
||||
/// <summary>
|
||||
/// ⭐ Boss路线朝向:按路线编号奇偶翻转X轴。
|
||||
/// 单数路线=左→右 → X保持预制体原始值不变
|
||||
/// 双数路线=右→左 → X取预制体原始值的负数(镜像)
|
||||
/// 以预制体原始X缩放为基准绝对赋值,对象池复用后重新Init不会叠加翻转。
|
||||
/// 路线编号非数字时不翻转(保持原朝向)。
|
||||
/// </summary>
|
||||
protected void ApplyBossRouteFlip(string pathId)
|
||||
{
|
||||
if (!int.TryParse(pathId, out int routeNum)) return;
|
||||
|
||||
float dirX = routeNum % 2 == 1 ? 1f : -1f;
|
||||
var scale = transform.localScale;
|
||||
scale.x = _prefabScaleX * dirX;
|
||||
transform.localScale = scale;
|
||||
}
|
||||
|
||||
/// <summary>路径已行进的时间(秒),用于贝塞尔曲线插值;可由外部预设偏移实现同步追帧。</summary>
|
||||
public float moveTime = 0f;
|
||||
|
||||
@@ -284,10 +310,15 @@ public class MonsterContral : MonoBehaviour
|
||||
// Unity 生命周期
|
||||
// ================================================================
|
||||
public bool baseMmove;
|
||||
|
||||
/// <summary>预制体原始X缩放(Awake缓存):Boss按路线奇偶翻转X轴的基准,池复用后重新Init不会叠加翻转</summary>
|
||||
private float _prefabScaleX = 1f;
|
||||
|
||||
public virtual void Awake()
|
||||
{
|
||||
LoadHitEffect();
|
||||
baseMmove = isMove;
|
||||
_prefabScaleX = transform.localScale.x;
|
||||
}
|
||||
/// <summary>
|
||||
/// 查找受击特效子物体并强制隐藏。
|
||||
@@ -456,6 +487,10 @@ public class MonsterContral : MonoBehaviour
|
||||
if (!isMove)
|
||||
transform.position = Vector3.zero;
|
||||
|
||||
// ⭐ Boss朝向:不随路线切线旋转,按路线编号奇偶翻转X轴(单数左→右保持正向/双数右→左翻转)
|
||||
if (isMove && IsRouteFlipBoss)
|
||||
ApplyBossRouteFlip(pathId);
|
||||
|
||||
// ⭐ 创建视频启动逻辑由子类负责:
|
||||
// - MonsterControl_BossBase 在自己 Init 里启动 createVideo
|
||||
// - 普通鱼走父类 Init,但普通鱼一般不配 createVideo
|
||||
@@ -724,6 +759,11 @@ public class MonsterContral : MonoBehaviour
|
||||
// 处理未指定朝向轴的情况(默认行为)
|
||||
if (_facingAxis == FacingAxis.None)
|
||||
{
|
||||
// ⭐ Boss不随路线切线旋转(重构前旧逻辑Boss鱼本来就不参与朝向):
|
||||
// 未配置正方向(forwordXYZ)的Boss,朝向由 ApplyBossRouteFlip 按路线奇偶翻转X轴决定;
|
||||
// 配置了正方向的Boss走下方轴对齐逻辑,保持原有机制不变
|
||||
if (IsRouteFlipBoss) return;
|
||||
|
||||
if (!is3D)
|
||||
{
|
||||
float angle = Mathf.Atan2(toNext.y, toNext.x) * Mathf.Rad2Deg;
|
||||
|
||||
@@ -130,6 +130,11 @@ public class MonsterControl_BossBase : MonsterContral
|
||||
// 避免 UpdateYZMovement 里 _yzPrefix 为空导致鱼阵 Boss 不移动
|
||||
SetYzPrefix(yzID);
|
||||
|
||||
// ⭐ Boss朝向:不随路线切线旋转,按路线编号奇偶翻转X轴
|
||||
// (单数路线=左→右保持预制体正向,双数路线=右→左翻转X轴为负)
|
||||
if (isMove && IsRouteFlipBoss)
|
||||
ApplyBossRouteFlip(pathId);
|
||||
|
||||
// ⭐ 创建视频处理:配置了 createVideoClip 时通过 GameMainPanel 的播放器播放
|
||||
// 播放期间 OnMoveUpdata 会跳过移动,视频结束后才开始走路线
|
||||
_createVideoDuration = 0f;
|
||||
|
||||
@@ -63,9 +63,13 @@ public class BJBeishuEvent : BJRedPacketEvent
|
||||
{
|
||||
GameManager.Instance.StartCoroutine(yanchi());
|
||||
}
|
||||
IEnumerator yanchi()
|
||||
IEnumerator yanchi(float yanchi=1f)
|
||||
{
|
||||
yield return new WaitForSeconds(1f);
|
||||
yield return new WaitForSeconds(yanchi);
|
||||
OnScoreEnd();
|
||||
}
|
||||
public void EndBJ0(float dd)
|
||||
{
|
||||
GameManager.Instance.StartCoroutine(yanchi(dd));
|
||||
}
|
||||
}
|
||||
@@ -6107,38 +6107,44 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
bjEndUI: {fileID: 4300126860111980404, guid: 003f5ec3035359645a280eb7949422db, type: 3}
|
||||
bjEndUIOffsetY: 150
|
||||
posID: 0
|
||||
paoBei: 0
|
||||
fishScore: 0
|
||||
bJbeishu: 0
|
||||
maxScore: 0
|
||||
startOffset: {x: 0, y: 0, z: -100}
|
||||
isSelf: 0
|
||||
isScoreEnd: 0
|
||||
useScorePanel: 0
|
||||
tMP_Score: {fileID: 0}
|
||||
scorePanelPrefab: {fileID: 6116211215255876179, guid: 8034b7b676b12c34e8c527274ba6196f,
|
||||
type: 3}
|
||||
currScore: 0
|
||||
maxScore: 0
|
||||
scoreCount: 0
|
||||
posID: 0
|
||||
paoBei: 0
|
||||
fishScore: 0
|
||||
bJbeishu: 0
|
||||
bigPrizeFishMode: 0
|
||||
showDelay: 3
|
||||
moveDuration: 0.5
|
||||
moveEase: 6
|
||||
startOffset: {x: 0, y: 0, z: -100}
|
||||
bjEndUIOffsetY: 150
|
||||
coinFlyDuration: 0.5
|
||||
coinArrivalInterval: 0.1
|
||||
isSelf: 0
|
||||
showAddScoreFX: 1
|
||||
autoFinishOnScoreFull: 1
|
||||
totalBJCount: 0
|
||||
currBJCount: 0
|
||||
isEffEnd: 0
|
||||
isScoreStart: 0
|
||||
isScoreEnd: 0
|
||||
isGoldEffectStart: 0
|
||||
flxjKill:
|
||||
res: []
|
||||
beishu: {fileID: 2095228394109979171}
|
||||
beishu_UGUI: {fileID: 0}
|
||||
beishunum: 0
|
||||
chengshu: {fileID: 5606618776479132645}
|
||||
chengshu_UGUI: {fileID: 0}
|
||||
xiaoGuo_Effect: {fileID: 5077221471693894447}
|
||||
xiaoGuo_UGUI: {fileID: 0}
|
||||
beiShuRollDuration: 0.5
|
||||
flxjKill:
|
||||
res: []
|
||||
currCount: 0
|
||||
count: 0
|
||||
director: {fileID: 763068597409920085}
|
||||
@@ -6148,6 +6154,7 @@ MonoBehaviour:
|
||||
count4: 1399
|
||||
count5: 945
|
||||
count6: 491
|
||||
beiShuRollDuration: 0.5
|
||||
--- !u!114 &6616238686904323898
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -6227,9 +6234,9 @@ MonoBehaviour:
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 5124122615754557369}
|
||||
m_TargetAssemblyTypeName: FLXJEvent, Assembly-CSharp
|
||||
m_MethodName: EndBJ
|
||||
m_Mode: 1
|
||||
m_TargetAssemblyTypeName: BJBeishuEvent, Assembly-CSharp
|
||||
m_MethodName: EndBJ0
|
||||
m_Mode: 4
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
|
||||
@@ -1909,7 +1909,7 @@ MonoBehaviour:
|
||||
currEffect_DieAward: {fileID: 0}
|
||||
isMove: 1
|
||||
is3D: 0
|
||||
forwordXYZ:
|
||||
forwordXYZ: X
|
||||
fishenum: 0
|
||||
moveTime: 0
|
||||
isyz: 0
|
||||
|
||||
Reference in New Issue
Block a user