飞机场存档2

This commit is contained in:
2026-07-28 21:11:57 +08:00
parent 2afafb8aa6
commit 149afafeff
10 changed files with 154 additions and 19 deletions
@@ -15,7 +15,7 @@ MonoBehaviour:
m_DefaultGroup: a263e71fce79f2f4cb5b5f1fa6b7291a
m_currentHash:
serializedVersion: 2
Hash: b88434f0b008f53956432ffabe051912
Hash: 00000000000000000000000000000000
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_BundleLocalCatalog: 0
@@ -46,6 +46,7 @@ MonoBehaviour:
m_GroupAssets:
- {fileID: 11400000, guid: 427f94f67624e374895487c87f881a7f, type: 2}
- {fileID: 11400000, guid: ca4eb1ed7a9a8bc4bbcc5d865fd723a4, type: 2}
- {fileID: 11400000, guid: 59a1dc2550990aa4091c8db201571a43, type: 2}
- {fileID: 11400000, guid: 9971f2f92adebd44faa29cc332720d65, type: 2}
- {fileID: 11400000, guid: ec57fb26f5bb61544b2831e9485b32fe, type: 2}
- {fileID: 11400000, guid: 39ca999e15083df459f52c7743a44f50, type: 2}
@@ -0,0 +1,25 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: LoginUIRes
m_EditorClassIdentifier:
m_GroupName: Packed Assets
m_Data:
m_SerializedData: []
m_GUID: 7205a6d30db43d84fbbb82ed27a1c905
m_SerializeEntries: []
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 3d7ea06370502a34e82011fabf822b45, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: ea6a7786f98ef0b4586293d4bcc601dd, type: 2}
- {fileID: 11400000, guid: 792bae17e9433bc479020eef05059f42, type: 2}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 59a1dc2550990aa4091c8db201571a43
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,45 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: LoginUIRes_BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 59a1dc2550990aa4091c8db201571a43, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: 2dc81615c3947e64493d7c6552a3f24d
m_LoadPath:
m_Id: 6bd5fad857b09dd439c8b71f4ae1a9d8
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_BundleNaming: 0
m_AssetLoadMode: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ea6a7786f98ef0b4586293d4bcc601dd
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: LoginUIRes_ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 59a1dc2550990aa4091c8db201571a43, type: 2}
m_StaticContent: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 792bae17e9433bc479020eef05059f42
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+24 -10
View File
@@ -159,10 +159,8 @@ public class SitPosData : MonoBehaviour
currentTurret = found;
currentTurretNumber = found.turretNumber;
Transform parent = turretParent != null ? turretParent : transform;
tra_CurrTurret = currentTurret.transform.parent != parent
? currentTurret.transform.parent
: currentTurret.transform;
// 缓存旋转节点:优先用 TurretData.tra_RotationPivot,否则回退父节点
tra_CurrTurret = GetTurretRotationPivot(currentTurret);
OnStateChange = currentTurret.ChangeState;
UpdateTurretWorldPos();
@@ -259,6 +257,24 @@ public class SitPosData : MonoBehaviour
// ==================== 炮台加载 ====================
/// <summary>
/// 获取炮台的旋转节点。
/// - 若 TurretData.tra_RotationPivot 已赋值 → 用它(精确指定旋转中心)
/// - 否则回退旧逻辑:炮台父节点(Normal 克隆的中间容器 / XJMH 子对象的父节点)
/// </summary>
private Transform GetTurretRotationPivot(TurretData turret)
{
if (turret == null) return null;
// 优先用 TurretData 上配置的旋转节点
if (turret.tra_RotationPivot != null)
return turret.tra_RotationPivot;
// 回退:用父节点(兼容旧逻辑)
Transform parent = turret.transform.parent;
return parent != null ? parent : turret.transform;
}
/// <summary>
/// 根据炮台编号加载炮台。
/// Normal 模式:从 Addressables 加载预制体并克隆到 turretParent。
@@ -319,8 +335,8 @@ public class SitPosData : MonoBehaviour
currentTurret.turretNumber = turretNumber;
// 缓存旋转节点
tra_CurrTurret = currentTurret.transform.parent;
// 缓存旋转节点:优先用 TurretData.tra_RotationPivot,否则回退父节点
tra_CurrTurret = GetTurretRotationPivot(currentTurret);
// 绑定状态机入口
OnStateChange = currentTurret.ChangeState;
@@ -384,10 +400,8 @@ public class SitPosData : MonoBehaviour
currentTurretNumber = turretNumber;
currentTurret = found;
// 炮台若挂在中间旋转容器下,用容器作为旋转节点;否则用炮台自身
tra_CurrTurret = currentTurret.transform.parent != parent
? currentTurret.transform.parent
: currentTurret.transform;
// 缓存旋转节点:优先用 TurretData.tra_RotationPivot,否则回退父节点
tra_CurrTurret = GetTurretRotationPivot(currentTurret);
OnStateChange = currentTurret.ChangeState;
UpdateTurretWorldPos();
@@ -29,6 +29,8 @@ public class TurretData : MonoBehaviour
public string turretID;
public SitPosData setPosData;
public Transform tra_BulletStartPosition;
[Tooltip("炮台旋转节点。拖入后 SitPosData.tra_CurrTurret 用此节点旋转;不拖则用炮台自身的父节点(兼容旧逻辑)")]
public Transform tra_RotationPivot;
public GameObject bulletPrefab_Two;
public GameObject bulletPrefab;
@@ -330,6 +330,7 @@ MonoBehaviour:
turretID: 4
setPosData: {fileID: 0}
tra_BulletStartPosition: {fileID: 133252951162328339}
tra_RotationPivot: {fileID: 0}
bulletPrefab_Two: {fileID: 1373092808597860, guid: 91df00438f6dea048b65ce7fba715230,
type: 3}
bulletPrefab: {fileID: 1985037619002984, guid: a59ca1da18fb6c84ba2d1cbdc12e72f5,
@@ -2429,6 +2430,7 @@ MonoBehaviour:
turretID: 3
setPosData: {fileID: 0}
tra_BulletStartPosition: {fileID: 4324141974085768278}
tra_RotationPivot: {fileID: 0}
bulletPrefab_Two: {fileID: 1049455767047195, guid: df3c50e610b026549b73a6c4889a404e,
type: 3}
bulletPrefab: {fileID: 1727303280587082, guid: cf19160f988c5a148b4f98c2ba1a8bef,
@@ -2443,10 +2445,10 @@ MonoBehaviour:
skeletonAnimation: {fileID: 0}
old_CurrAnimation: {fileID: 0}
new_CurrAnimation: {fileID: 0}
currTurretType: 0
currTurretType: 1
isFrenzy: 0
idleAnim:
attackAnim:
attackAnim: shot
frenzyAttackAnim:
laserStartAnim:
laserLoopAnim:
@@ -4849,6 +4851,7 @@ MonoBehaviour:
turretID: 1
setPosData: {fileID: 0}
tra_BulletStartPosition: {fileID: 4059331313137831612}
tra_RotationPivot: {fileID: 0}
bulletPrefab_Two: {fileID: 1177632837766673, guid: ca64d0abc6450584c839b6b8ca03910a,
type: 3}
bulletPrefab: {fileID: 1166920474713197, guid: 279ce3d544e4bc34097fc18fccb2ceac,
@@ -4863,10 +4866,10 @@ MonoBehaviour:
skeletonAnimation: {fileID: 0}
old_CurrAnimation: {fileID: 0}
new_CurrAnimation: {fileID: 0}
currTurretType: 0
currTurretType: 1
isFrenzy: 0
idleAnim:
attackAnim:
attackAnim: shot
frenzyAttackAnim:
laserStartAnim:
laserLoopAnim:
@@ -4982,6 +4985,7 @@ MonoBehaviour:
turretID: 4
setPosData: {fileID: 0}
tra_BulletStartPosition: {fileID: 490001299791756420}
tra_RotationPivot: {fileID: 2752274170600578251}
bulletPrefab_Two: {fileID: 1373092808597860, guid: 91df00438f6dea048b65ce7fba715230,
type: 3}
bulletPrefab: {fileID: 1985037619002984, guid: a59ca1da18fb6c84ba2d1cbdc12e72f5,
@@ -4996,10 +5000,10 @@ MonoBehaviour:
skeletonAnimation: {fileID: 3094521970018869135}
old_CurrAnimation: {fileID: 0}
new_CurrAnimation: {fileID: 0}
currTurretType: 0
currTurretType: 1
isFrenzy: 0
idleAnim:
attackAnim:
attackAnim: shot
frenzyAttackAnim:
laserStartAnim:
laserLoopAnim:
@@ -5362,6 +5366,7 @@ MonoBehaviour:
turretID: 3
setPosData: {fileID: 0}
tra_BulletStartPosition: {fileID: 339209509841760300}
tra_RotationPivot: {fileID: 0}
bulletPrefab_Two: {fileID: 1049455767047195, guid: df3c50e610b026549b73a6c4889a404e,
type: 3}
bulletPrefab: {fileID: 1727303280587082, guid: cf19160f988c5a148b4f98c2ba1a8bef,
@@ -6471,6 +6476,7 @@ MonoBehaviour:
turretID: 2
setPosData: {fileID: 0}
tra_BulletStartPosition: {fileID: 1909799833818190212}
tra_RotationPivot: {fileID: 0}
bulletPrefab_Two: {fileID: 1235537286137785, guid: b87e03e51ab83e744bf4b734e3b501cd,
type: 3}
bulletPrefab: {fileID: 1207119993371665, guid: 154a9136554cd844fbf3ea8599ffd24a,
@@ -6485,10 +6491,10 @@ MonoBehaviour:
skeletonAnimation: {fileID: 0}
old_CurrAnimation: {fileID: 0}
new_CurrAnimation: {fileID: 0}
currTurretType: 0
currTurretType: 1
isFrenzy: 0
idleAnim:
attackAnim:
attackAnim: shot
frenzyAttackAnim:
laserStartAnim:
laserLoopAnim:
@@ -9089,6 +9095,7 @@ MonoBehaviour:
turretID: 2
setPosData: {fileID: 0}
tra_BulletStartPosition: {fileID: 1491611132760571377}
tra_RotationPivot: {fileID: 0}
bulletPrefab_Two: {fileID: 1235537286137785, guid: b87e03e51ab83e744bf4b734e3b501cd,
type: 3}
bulletPrefab: {fileID: 1207119993371665, guid: 154a9136554cd844fbf3ea8599ffd24a,
@@ -10922,6 +10929,7 @@ MonoBehaviour:
turretID: 1
setPosData: {fileID: 0}
tra_BulletStartPosition: {fileID: 3493247331154296761}
tra_RotationPivot: {fileID: 0}
bulletPrefab_Two: {fileID: 1177632837766673, guid: ca64d0abc6450584c839b6b8ca03910a,
type: 3}
bulletPrefab: {fileID: 1166920474713197, guid: 279ce3d544e4bc34097fc18fccb2ceac,