1
This commit is contained in:
Binary file not shown.
@@ -633,6 +633,7 @@ MonoBehaviour:
|
||||
- {fileID: 7718654507306445146}
|
||||
- {fileID: -2383905628683088522}
|
||||
- {fileID: -8724499595175768455}
|
||||
- {fileID: 3659031049611376463}
|
||||
m_FixedDuration: 0
|
||||
m_EditorSettings:
|
||||
m_Framerate: 60
|
||||
@@ -690,6 +691,30 @@ MonoBehaviour:
|
||||
m_Loop: 0
|
||||
m_Version: 1
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
--- !u!114 &3659031049611376463
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b46e36075dd1c124a8422c228e75e1fb, type: 3}
|
||||
m_Name: Signal Track
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 3
|
||||
m_AnimClip: {fileID: 0}
|
||||
m_Locked: 0
|
||||
m_Muted: 0
|
||||
m_CustomPlayableFullTypename:
|
||||
m_Curves: {fileID: 0}
|
||||
m_Parent: {fileID: 11400000}
|
||||
m_Children: []
|
||||
m_Clips: []
|
||||
m_Markers:
|
||||
m_Objects:
|
||||
- {fileID: 6595147364244135219}
|
||||
--- !u!114 &5704638067607179487
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -1045,6 +1070,22 @@ MonoBehaviour:
|
||||
m_Loop: 0
|
||||
m_Version: 1
|
||||
m_Rotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
--- !u!114 &6595147364244135219
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 15c38f6fa1940124db1ab7f6fe7268d1, type: 3}
|
||||
m_Name: Signal Emitter
|
||||
m_EditorClassIdentifier:
|
||||
m_Time: 69.21666666666667
|
||||
m_Retroactive: 0
|
||||
m_EmitOnce: 0
|
||||
m_Asset: {fileID: 11400000, guid: aca498d52b11314418047bc8d6c097ae, type: 2}
|
||||
--- !u!114 &6643721785732854288
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
|
||||
@@ -116,7 +116,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4078363723584466
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -125,14 +125,14 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1520778081668337}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0.21792102, y: -0.67268896, z: 0.21792102, w: 0.67268896}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 5, y: 5, z: 5}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 5402973354752257021}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -90, z: 35.9}
|
||||
--- !u!114 &2784966270829531488
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -173,6 +173,7 @@ MonoBehaviour:
|
||||
isyz: 0
|
||||
yzID:
|
||||
colliderList: []
|
||||
rotationPY: 60
|
||||
isRotate: 1
|
||||
ischild0: 1
|
||||
depthOffset: 570
|
||||
|
||||
@@ -2682,7 +2682,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1327519865101969}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0.5, w: 0.8660254}
|
||||
m_LocalPosition: {x: -460, y: 0, z: 0}
|
||||
m_LocalScale: {x: 3, y: 3, z: 3}
|
||||
m_ConstrainProportionsScale: 0
|
||||
@@ -2691,7 +2691,7 @@ Transform:
|
||||
- {fileID: 4227059737592563}
|
||||
- {fileID: 4345361177842638}
|
||||
m_Father: {fileID: 4586146062000936}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -0, z: -0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -0, z: 60}
|
||||
--- !u!111 &111479175111724085
|
||||
Animation:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -3192,6 +3192,7 @@ MonoBehaviour:
|
||||
isyz: 0
|
||||
yzID:
|
||||
colliderList: []
|
||||
rotationPY: 60
|
||||
isRotate: 1
|
||||
ischild0: 1
|
||||
depthOffset: 460
|
||||
|
||||
@@ -32,10 +32,10 @@ public class MonsterContral : MonoBehaviour
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
/// <summary>鱼阵路线 key 前缀</summary>
|
||||
private const string YzMoveLineName = "鱼阵";
|
||||
private const string YzMoveLineName = "鱼阵";
|
||||
|
||||
/// <summary>普通鱼路线 key 前缀</summary>
|
||||
private const string NormalMoveLineName = "曲线";
|
||||
private const string NormalMoveLineName = "曲线";
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// 公开字段(Inspector 可见 / 外部赋值)
|
||||
@@ -120,6 +120,8 @@ public class MonsterContral : MonoBehaviour
|
||||
public bool IsAlive => gameObject.activeInHierarchy;
|
||||
|
||||
|
||||
public int rotationPY = 60;
|
||||
|
||||
|
||||
// ================================================================
|
||||
// Unity 生命周期
|
||||
@@ -128,7 +130,7 @@ public class MonsterContral : MonoBehaviour
|
||||
public virtual void Awake()
|
||||
{
|
||||
LoadHitEffect();
|
||||
|
||||
|
||||
}
|
||||
public async void LoadHitEffect()
|
||||
{
|
||||
@@ -142,10 +144,10 @@ public class MonsterContral : MonoBehaviour
|
||||
}
|
||||
public virtual void OnEnable()
|
||||
{
|
||||
fishenum = (FishTypeEnum)monsterData.fishTypeConfig.fishType;
|
||||
fishenum = (FishTypeEnum)monsterData.fishTypeConfig.fishType;
|
||||
uirootRect = UIManager.Instance.uiRoot.GetComponent<RectTransform>();
|
||||
mainCamera = Camera.main;
|
||||
moveTime=0f;
|
||||
moveTime = 0f;
|
||||
InitAnimList();
|
||||
ChangeState(CharacterStateType.move);
|
||||
}
|
||||
@@ -154,7 +156,7 @@ public class MonsterContral : MonoBehaviour
|
||||
{
|
||||
OnUpdate(currState);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 销毁时自动从 CreateFishManager 的三个字典中移除自身,避免野指针。
|
||||
/// </summary>
|
||||
@@ -162,7 +164,7 @@ public class MonsterContral : MonoBehaviour
|
||||
{
|
||||
if (CreateFishManager.Instance == null) return;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// ================================================================
|
||||
@@ -186,8 +188,8 @@ public class MonsterContral : MonoBehaviour
|
||||
{
|
||||
// 根据是否为鱼阵选择路线 key
|
||||
string lineKey = isyuzhen
|
||||
? YzMoveLineName + pathId
|
||||
: NormalMoveLineName + pathId;
|
||||
? YzMoveLineName + pathId
|
||||
: NormalMoveLineName + pathId;
|
||||
|
||||
if (!MonsterMoveLine.dic_BezierCurveDatas.TryGetValue(lineKey, out var bezierData))
|
||||
{
|
||||
@@ -196,7 +198,7 @@ public class MonsterContral : MonoBehaviour
|
||||
}
|
||||
|
||||
monsterData.moveLine.Init(bezierData, time);
|
||||
isyz = isyuzhen;
|
||||
isyz = isyuzhen;
|
||||
this.yzID = yzID;
|
||||
|
||||
// 鱼阵特殊处理:700 系扇形阵根据起点 y 值翻转朝向
|
||||
@@ -213,11 +215,11 @@ public class MonsterContral : MonoBehaviour
|
||||
fishenum = (FishTypeEnum)monsterData.fishTypeConfig.fishType;
|
||||
|
||||
// 路径结束后自动销毁
|
||||
StartCoroutine(yanchi(gameObject,time, isyuzhen));
|
||||
StartCoroutine(yanchi(gameObject, time, isyuzhen));
|
||||
}
|
||||
public IEnumerator yanchi(GameObject obj,float time, bool isyuzhen)
|
||||
public IEnumerator yanchi(GameObject obj, float time, bool isyuzhen)
|
||||
{
|
||||
|
||||
|
||||
yield return new WaitForSeconds(time);
|
||||
CreateFishManager.Instance.Id_DieFish_NotFX(guid);
|
||||
|
||||
@@ -238,8 +240,8 @@ public class MonsterContral : MonoBehaviour
|
||||
{
|
||||
switch (stateType)
|
||||
{
|
||||
case CharacterStateType.move: OnMoveEnter(); break;
|
||||
case CharacterStateType.idle: break;
|
||||
case CharacterStateType.move: OnMoveEnter(); break;
|
||||
case CharacterStateType.idle: break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,8 +251,8 @@ public class MonsterContral : MonoBehaviour
|
||||
|
||||
switch (stateType)
|
||||
{
|
||||
case CharacterStateType.move: OnMoveUpdata(); break;
|
||||
case CharacterStateType.idle: break;
|
||||
case CharacterStateType.move: OnMoveUpdata(); break;
|
||||
case CharacterStateType.idle: break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,32 +301,32 @@ public class MonsterContral : MonoBehaviour
|
||||
// 700 / 701:直线向前移动(沿 up 方向)
|
||||
case "700":
|
||||
case "701":
|
||||
{
|
||||
var startWorld = CoordinateTransformation.CanvasToWorld(
|
||||
monsterData.moveLine.bezierCurveData.start, uirootRect, mainCamera);
|
||||
{
|
||||
var startWorld = CoordinateTransformation.CanvasToWorld(
|
||||
monsterData.moveLine.bezierCurveData.start, uirootRect, mainCamera);
|
||||
|
||||
// 700:根据起点 y 值决定正方向;701:固定向上
|
||||
bool goUp = (prefix == "701") || (monsterData.moveLine.bezierCurveData.start.y > 0);
|
||||
float dir = goUp ? -1f : 1f;
|
||||
// 700:根据起点 y 值决定正方向;701:固定向上
|
||||
bool goUp = (prefix == "701") || (monsterData.moveLine.bezierCurveData.start.y > 0);
|
||||
float dir = goUp ? -1f : 1f;
|
||||
|
||||
Vector2 pos = startWorld + (Vector3)(dir * transform.up * moveTime
|
||||
* monsterData.moveLine.moveTime);
|
||||
transform.position = pos;
|
||||
break;
|
||||
}
|
||||
Vector2 pos = startWorld + (Vector3)(dir * transform.up * moveTime
|
||||
* monsterData.moveLine.moveTime);
|
||||
transform.position = pos;
|
||||
break;
|
||||
}
|
||||
|
||||
// 702 / 710:贝塞尔曲线路径
|
||||
case "702":
|
||||
case "7007":
|
||||
case "710": // 顺序阵:每条路径逐一延迟生成
|
||||
case "704":
|
||||
{
|
||||
Vector2 next = monsterData.moveLine.GetBezierPointJob(moveTime);
|
||||
if (fishenum != FishTypeEnum.Boss鱼)
|
||||
ApplyFacingDirection(next);
|
||||
transform.position = next;
|
||||
break;
|
||||
}
|
||||
{
|
||||
Vector2 next = monsterData.moveLine.GetBezierPointJob(moveTime);
|
||||
if (fishenum != FishTypeEnum.Boss鱼)
|
||||
ApplyFacingDirection(next);
|
||||
transform.position = next;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -337,11 +339,11 @@ public class MonsterContral : MonoBehaviour
|
||||
Vector2 next = monsterData.moveLine.GetBezierPointJob(moveTime);
|
||||
|
||||
//if (fishenum != FishTypeEnum.Boss鱼)
|
||||
ApplyFacingDirection(next);
|
||||
ApplyFacingDirection(next);
|
||||
|
||||
transform.position = next;
|
||||
}
|
||||
public bool isRotate=true;
|
||||
public bool isRotate = true;
|
||||
/// <summary>
|
||||
/// 根据 forwordXYZ 字段将物体朝向目标点方向。
|
||||
/// 为空时 2D 鱼用 up,3D 鱼用 forward。
|
||||
@@ -374,16 +376,65 @@ public class MonsterContral : MonoBehaviour
|
||||
{
|
||||
Transform child = transform.GetChild(0);
|
||||
Vector3 localPos = Vector3.zero;
|
||||
|
||||
|
||||
//// 父物体朝向
|
||||
switch (forwordXYZ)
|
||||
{
|
||||
case "X": transform.GetChild(0).right = toNext.normalized; break;
|
||||
case "-X": transform.GetChild(0).right = -toNext.normalized; break;
|
||||
case "Y": transform.GetChild(0).up = toNext.normalized; break;
|
||||
case "-Y": transform.GetChild(0).up = -toNext.normalized; break;
|
||||
case "Z": transform.GetChild(0).forward = toNext.normalized; break;
|
||||
case "-Z": transform.GetChild(0).forward = -toNext.normalized; break;
|
||||
case "X":
|
||||
{
|
||||
transform.GetChild(0).right = toNext.normalized;
|
||||
var vv = transform.GetChild(0).eulerAngles;
|
||||
|
||||
vv.x = rotationPY;
|
||||
transform.GetChild(0).eulerAngles = vv;
|
||||
}
|
||||
break;
|
||||
case "-X":
|
||||
{
|
||||
transform.GetChild(0).right = -toNext.normalized;
|
||||
var vv = transform.GetChild(0).eulerAngles;
|
||||
vv.x = -rotationPY;
|
||||
transform.GetChild(0).eulerAngles = vv;
|
||||
}
|
||||
|
||||
break;
|
||||
case "Y":
|
||||
{
|
||||
|
||||
transform.GetChild(0).up = toNext.normalized;
|
||||
var vv = transform.GetChild(0).eulerAngles;
|
||||
vv.y = rotationPY;
|
||||
transform.GetChild(0).eulerAngles = vv;
|
||||
}
|
||||
break;
|
||||
case "-Y":
|
||||
{
|
||||
transform.GetChild(0).up = -toNext.normalized;
|
||||
var vv = transform.GetChild(0).eulerAngles;
|
||||
vv.y = -rotationPY;
|
||||
transform.GetChild(0).eulerAngles = vv;
|
||||
}
|
||||
|
||||
break;
|
||||
case "Z":
|
||||
{
|
||||
transform.GetChild(0).forward = toNext.normalized;
|
||||
var vv = transform.GetChild(0).eulerAngles;
|
||||
|
||||
vv.z = rotationPY * (vv.y < 180 ? -1 : 1);
|
||||
transform.GetChild(0).eulerAngles = vv;
|
||||
}
|
||||
|
||||
break;
|
||||
case "-Z":
|
||||
{
|
||||
transform.GetChild(0).forward = -toNext.normalized;
|
||||
var vv = transform.GetChild(0).eulerAngles;
|
||||
vv.z = -rotationPY * (vv.y < 180 ? -1 : 1);
|
||||
transform.GetChild(0).eulerAngles = vv;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
//// 子物体深度偏移:方向正 → 偏移正,方向负 → 偏移负
|
||||
@@ -412,7 +463,7 @@ public class MonsterContral : MonoBehaviour
|
||||
case "-Z": transform.forward = -toNext.normalized; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool ischild0 = false;
|
||||
public int depthOffset;
|
||||
// ================================================================
|
||||
|
||||
@@ -208,6 +208,9 @@ namespace Assets.MyGame.Scripts.Net
|
||||
case FrameDataType.changeTurretState:
|
||||
EventCenter.Instance.EventTrigger<SyncGameData>(ConstEventString.SyncGameData_TurretState, syncGameData);
|
||||
|
||||
break;
|
||||
case FrameDataType.changeTurret:
|
||||
EventCenter.Instance.EventTrigger<SyncGameData>(ConstEventString.SyncGameData_ChangeTurret, syncGameData);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -18,7 +18,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1762314594274149, guid: 18de46de860592b41811159997387914, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1762314594274149, guid: 18de46de860592b41811159997387914, type: 3}
|
||||
propertyPath: m_TagString
|
||||
@@ -139,8 +139,8 @@ MonoBehaviour:
|
||||
type: 3}
|
||||
currEffect_DieAward: {fileID: 0}
|
||||
isMove: 1
|
||||
is3D: 0
|
||||
forwordXYZ: -X
|
||||
is3D: 1
|
||||
forwordXYZ: Y
|
||||
fishenum: 0
|
||||
moveTime: 0
|
||||
isyz: 0
|
||||
@@ -192,7 +192,7 @@ BoxCollider2D:
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0.20550728, y: -1.5302646}
|
||||
m_Offset: {x: -0.17264056, y: -0.55926335}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
@@ -203,7 +203,7 @@ BoxCollider2D:
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 5.446969, y: 4.0605297}
|
||||
m_Size: {x: 6.95956, y: 8.126226}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!4 &1696532480895990597 stripped
|
||||
Transform:
|
||||
@@ -521,11 +521,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4145634338449909, guid: 18de46de860592b41811159997387914, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
value: 0.8660254
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4145634338449909, guid: 18de46de860592b41811159997387914, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
value: -0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4145634338449909, guid: 18de46de860592b41811159997387914, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
@@ -537,7 +537,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4145634338449909, guid: 18de46de860592b41811159997387914, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
value: -60
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4145634338449909, guid: 18de46de860592b41811159997387914, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
|
||||
@@ -486,7 +486,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4853516382776154, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: -0
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4853516382776154, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_ConstrainProportionsScale
|
||||
@@ -596,7 +596,7 @@ MonoBehaviour:
|
||||
type: 3}
|
||||
currEffect_DieAward: {fileID: 0}
|
||||
isMove: 1
|
||||
is3D: 0
|
||||
is3D: 1
|
||||
forwordXYZ: Z
|
||||
fishenum: 0
|
||||
moveTime: 0
|
||||
@@ -1055,6 +1055,22 @@ PrefabInstance:
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4629056759279012, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4629056759279012, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4629056759279012, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4629056759279012, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4853516382776154, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 1
|
||||
@@ -1081,7 +1097,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4853516382776154, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
value: 0.8660254
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4853516382776154, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
@@ -1093,7 +1109,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4853516382776154, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
value: -0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4853516382776154, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@@ -1105,7 +1121,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4853516382776154, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: -0
|
||||
value: -60
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4853516382776154, guid: bf0e0c56b3551b84ab0b2bab19b162c1, type: 3}
|
||||
propertyPath: m_ConstrainProportionsScale
|
||||
|
||||
@@ -4517,11 +4517,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4593764335355068, guid: ea90a670ee15ab0499ecc238704cc08f, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
value: 0.8660254
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4593764335355068, guid: ea90a670ee15ab0499ecc238704cc08f, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
value: -0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4593764335355068, guid: ea90a670ee15ab0499ecc238704cc08f, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
@@ -4533,15 +4533,15 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4593764335355068, guid: ea90a670ee15ab0499ecc238704cc08f, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
value: -60
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4593764335355068, guid: ea90a670ee15ab0499ecc238704cc08f, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: -0
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4593764335355068, guid: ea90a670ee15ab0499ecc238704cc08f, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: -0
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4593764335355068, guid: ea90a670ee15ab0499ecc238704cc08f, type: 3}
|
||||
propertyPath: m_ConstrainProportionsScale
|
||||
|
||||
@@ -953,7 +953,7 @@ PrefabInstance:
|
||||
- target: {fileID: 6959357695824192285, guid: d949c78be195fa54486f6a9ab25764bb,
|
||||
type: 3}
|
||||
propertyPath: m_SceneBindings.Array.size
|
||||
value: 3
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6959357695824192285, guid: d949c78be195fa54486f6a9ab25764bb,
|
||||
type: 3}
|
||||
@@ -973,6 +973,12 @@ PrefabInstance:
|
||||
value:
|
||||
objectReference: {fileID: 7834745648701911234, guid: 7d141002679607346bf9cd66712ab750,
|
||||
type: 2}
|
||||
- target: {fileID: 6959357695824192285, guid: d949c78be195fa54486f6a9ab25764bb,
|
||||
type: 3}
|
||||
propertyPath: m_SceneBindings.Array.data[3].key
|
||||
value:
|
||||
objectReference: {fileID: 3659031049611376463, guid: 7d141002679607346bf9cd66712ab750,
|
||||
type: 2}
|
||||
- target: {fileID: 6959357695824192285, guid: d949c78be195fa54486f6a9ab25764bb,
|
||||
type: 3}
|
||||
propertyPath: m_SceneBindings.Array.data[0].value
|
||||
@@ -988,6 +994,11 @@ PrefabInstance:
|
||||
propertyPath: m_SceneBindings.Array.data[2].value
|
||||
value:
|
||||
objectReference: {fileID: 3104464619094148625}
|
||||
- target: {fileID: 6959357695824192285, guid: d949c78be195fa54486f6a9ab25764bb,
|
||||
type: 3}
|
||||
propertyPath: m_SceneBindings.Array.data[3].value
|
||||
value:
|
||||
objectReference: {fileID: 8681746059678129479}
|
||||
- target: {fileID: 6999701744207023720, guid: d949c78be195fa54486f6a9ab25764bb,
|
||||
type: 3}
|
||||
propertyPath: m_Layer
|
||||
@@ -1021,6 +1032,10 @@ PrefabInstance:
|
||||
type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 9214007480714832468}
|
||||
- targetCorrespondingSourceObject: {fileID: 1025387898001180, guid: d949c78be195fa54486f6a9ab25764bb,
|
||||
type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 8681746059678129479}
|
||||
- targetCorrespondingSourceObject: {fileID: 1517759474310460, guid: d949c78be195fa54486f6a9ab25764bb,
|
||||
type: 3}
|
||||
insertIndex: -1
|
||||
@@ -1085,6 +1100,8 @@ MonoBehaviour:
|
||||
- {fileID: 328154429749789243}
|
||||
- {fileID: 327789693875266855}
|
||||
isRotate: 0
|
||||
ischild0: 0
|
||||
depthOffset: 0
|
||||
bossName:
|
||||
isToUI: 1
|
||||
tMP_CurrBossScore: {fileID: 0}
|
||||
@@ -1097,6 +1114,36 @@ MonoBehaviour:
|
||||
dieTime: 3
|
||||
v3: {x: 0, y: 0, z: 0}
|
||||
playable: {fileID: 7212436715740358004}
|
||||
--- !u!114 &8681746059678129479
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 324407181294293365}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e52de21a22b6dd44c9cc19f810c65059, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Events:
|
||||
m_Signals:
|
||||
- {fileID: 11400000, guid: aca498d52b11314418047bc8d6c097ae, type: 2}
|
||||
m_Events:
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 9214007480714832468}
|
||||
m_TargetAssemblyTypeName: FLZY_Boss_RYGZ, Assembly-CSharp
|
||||
m_MethodName: PlayEnd
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &324454349574855634 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 1006647572323771, guid: d949c78be195fa54486f6a9ab25764bb,
|
||||
|
||||
@@ -10,10 +10,14 @@ public class FLZY_Boss_RYGZ : MonsterControl_BossBase
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
playable.Play();
|
||||
playable.played += PlayEnd;
|
||||
//playable.Play();
|
||||
//playable.played += PlayEnd;
|
||||
}
|
||||
public void PlayEnd(PlayableDirector playableDirector)
|
||||
//public void PlayEnd(PlayableDirector playableDirector)
|
||||
//{
|
||||
// CreateFishManager.Instance.Id_DieFish_NotFX(guid);
|
||||
//}
|
||||
public void PlayEnd()
|
||||
{
|
||||
CreateFishManager.Instance.Id_DieFish_NotFX(guid);
|
||||
}
|
||||
@@ -28,6 +32,7 @@ public class FLZY_Boss_RYGZ : MonsterControl_BossBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DieFish(RoomKillNotice obj = null)
|
||||
{
|
||||
base.DieFish(obj);
|
||||
|
||||
@@ -183,7 +183,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
foreach (var item in GameManager.Instance.gameData.currRoomData.players)
|
||||
{
|
||||
JoinGame(item.position, item.gold, item.cannonMultiple, 0, item.userId);
|
||||
JoinGame(item.position, item.gold, item.cannonMultiple, 0, item.userId, item.cannonId);
|
||||
}
|
||||
GameManager.Instance.gameData.roomJoinNotice = v.arguments[0];
|
||||
isfirstShow = false;
|
||||
@@ -203,6 +203,9 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
}
|
||||
//// currSitData.ChangeTurret(1); — 已由 SitPosData.OnEnable 自动加载
|
||||
// 开局同步本地炮台给其他玩家
|
||||
if (currSitData.currentTurret != null)
|
||||
SyncChangeTurret(currSitData.currentTurret.turretNumber);
|
||||
currSitData.lockFX.transform.GetChild(0).gameObject.SetActive(false);
|
||||
currSitData.lockFX.transform.GetChild(1).gameObject.SetActive(true);
|
||||
if (currSitData.turretParent != null)
|
||||
@@ -211,7 +214,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
else
|
||||
{
|
||||
|
||||
JoinGame(roomJoinNotice.position, roomJoinNotice.gold, roomJoinNotice.cannonMultiple, 0, roomJoinNotice.userId);
|
||||
JoinGame(roomJoinNotice.position, roomJoinNotice.gold, roomJoinNotice.cannonMultiple, 0, roomJoinNotice.userId, roomJoinNotice.cannonId);
|
||||
|
||||
}
|
||||
|
||||
@@ -1364,7 +1367,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
WebSocketSendList.SyncGameData(sgd);
|
||||
}
|
||||
private void SyncChangeTurret(int turretNumber)
|
||||
public void SyncChangeTurret(int turretNumber)
|
||||
{
|
||||
SyncGameData sgd = new SyncGameData
|
||||
{
|
||||
@@ -1474,7 +1477,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
#region 玩家加入/退出(PlayerJoinModule)
|
||||
|
||||
public void JoinGame(int sitNum, long goldNum, long consumeGold, int currentTurretIndex, string user = null)
|
||||
public void JoinGame(int sitNum, long goldNum, long consumeGold, int currentTurretIndex, string user = null, string cannonId = null)
|
||||
{
|
||||
foreach (var sit in list_Sits)
|
||||
{
|
||||
@@ -1487,16 +1490,14 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
sit.tMP_GoldNum.text = goldNum.ToString();
|
||||
sit.tMP_TurretConsumeNum.text = consumeGold.ToString();
|
||||
|
||||
// 显式注册本地玩家座位
|
||||
if (sit.user == GameManager.Instance?.user?.id)
|
||||
SitPosData.localPlayerSit = sit;
|
||||
|
||||
sit.gameObject.SetActive(true);
|
||||
|
||||
// 兜底:确保炮台加载(OnEnable 可能因 cannonUsing 为空而跳过)
|
||||
var cannonUsing = GameManager.Instance.user?.cannonUsing;
|
||||
if (cannonUsing != null && int.TryParse(cannonUsing.number, out int num))
|
||||
sit.LoadTurret(num);
|
||||
// 用该玩家自己的 cannonId 加载炮台
|
||||
if (!string.IsNullOrEmpty(cannonId) && int.TryParse(cannonId, out int turretNum))
|
||||
sit.LoadTurret(turretNum);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -466,6 +466,8 @@ public class UIHome_BY_ItemListPanels : SubUIBase
|
||||
{
|
||||
Debug.Log($"[TurretPanel] LoadTurret: isInGame=true, localSit={SitPosData.localPlayerSit != null}, turretNum={_selectedTurretNumber}");
|
||||
SitPosData.localPlayerSit?.LoadTurret(_selectedTurretNumber);
|
||||
// 同步炮台切换给其他玩家
|
||||
CreateFishManager.Instance?.currGameType?.SyncChangeTurret(_selectedTurretNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user